Object status indicators can be used with IF/THEN/ELSE commands to determine the status of an object. When a object is at a specific status, a certain action is taken

Example

This example uses an L2SL object to explain the methodology of testing object status. The object name is LIGHTS and its function is to control the lights for a large conference room.

The configuration for an L2SL object uses two addresses:

  • The first address controls an ON/OFF switch.
  • The second address monitors a proof condition. Use of this address is optional.

To verify that the lights are ON in the conference room, you could use the following test:

740  IF (LIGHTS.EQ.ON) THEN ...

When this line of code is executed, the status of LIGHTS is checked to see if it is ON. If the object status equals ON, then a particular action occurs. If the object status does not equal ON, an alternate action occurs.