Installation guide

Programming Commands 135
OUT I/O Function
ACTION: Sets or returns the condition of a specified digital output.
PROGRAM SYNTAX: OUT(bnn)=expression
OUT(bnn,len)=expression
OUT(bnn) - used in an expression
OUT(bnn,len) - used in an expression
REMARKS: bnn is the board and Output number.
board 1 board 2 board 3 board 4
101-124 201-224 301-324 401-424
The expression specifies the output state’s.
The len specifies the number of Output points (1-24) involved in the in-
struction.
Outputs b01-b16 are physical outputs and b17-b24 are internal flags
which can be set or cleared and can be read just like the physical out-
puts.
OUT(bnn)=expression
Specifies one output state. If the expression is non-zero the output is on.
If the expression is zero the output state is off.
OUT(bnn,len)=expression
Specifies multiple output states (len) and the starting output point (bnn).
The expression is evaluated and converted to an integer value. The least
significant len bits of the binary representation are then used to set out-
puts bnn to (bnn+len-1) respectively.
OUT(bnn) - used in an expression
Return the state of the specified output point (bnn).
OUT(bnn,len) - used in an expression
Return the state of the designated outputs (bnn to (bnn+len-1)). Evalu-
ates to a number corresponding to the last output commanded (0 or 1)
for these output pins. The returned number is the binary weighted sum
of the commanded outputs (bnn to(bnn+len-1)) respectively.
EXAMPLES: OUT(107)=1
Digital I/O board 1 output 7 is set to a 1.
OUT(101,6)=48
digital I/O board 1 outputs 1-4 are set to a 0 and outputs 5 and 6 are
set to a 1.
x=OUT(107)
A 1 is returned to variable x since output 7 is set to a 1.
x=OUT(101,7)
A 112 is returned to variable x since outputs 1-4 are 0 and output 5-7
are 1.