Diunit – Visara Master Console Center Scripting Guide User Manual
Page 93

Chapter 5 Script Commands
Scripting Guide
93
DIUNIT
Syntax:
DIUNIT( %Port) ==> %Status
Description:
Check the status of a device connected to a DI unit.
Action:
Set the value of the specified variable to the status of the DI unit
connected to the specified port.
Parameters:
%Port. Numeric expression. The assigned DI port number to which
the device is connected. Refer to Ports on page 24 for more
information.
Returns:
Numeric value, the value of the DI status.
Value
Meaning
0
OFF
1
ON
Note: Depending on the type of connected device, the values can have
other meanings.
Notes:
1. Refer to Manifest Constants on page 42 for the constants reference
list.
2. This function is not commonly used.
Example:
%Status := DIUNIT( 3)
IF %Status == ON
LOG( LOG_FLT, “DI #3 is on”)
ENDIF
See Also: