Sunday, November 4, 2012

Cicode- SCADA


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

STRING
FUNCTION
AssGetPropertyForeground(STRING sArg, STRING sProperty)

    STRING  sResult;
    INT     iError;

    ! Enable user error checking.
    ErrSet(1);
   
    ! Get the association property from the cache.
    sResult = AssGetProperty(sArg, 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.