Thursday, November 1, 2012

Cicode- SCADA



/* Calls TagGetProperty and forces a cached read.  The hardware alarm is suppressed if the property is not ready or pending.*/

STRING
FUNCTION
TagGetPropertyForeground(STRING sName, STRING sProperty)

    STRING  sResult;
    INT     iError;

    ! Enable user error checking.
    ErrSet(1);
   
    ! Get the tag property from the cache.
    sResult = TagGetProperty(sName, sProperty, 1);
   
    ! Check for an error.
    iError = IsError();
   
    ! Disable user error checking.
    ErrSet(0);
   
    ! Set the hardware alarm unless the property value is not ready or pending.
    IF iError <> 0 AND iError <> 423 AND iError <> 432 THEN
        ErrTrap(iError, 0);
    END
   
    RETURN sResult;

END

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.