The following examples show you how to set the output pin using the
SerialOutBlock()
instruction.
CRBasic example for setting the output pin
SerialOutBlock
(32, 1, 0)
'This will set the spare output pin high
SerialOutBlock
(32, 0, 0)
'This will set the spare output pin low
The preceding two example lines of code will set the output pin on the SDM-SIO1A high then low
respectively on the SDM-SIO1A device set to address 0 on its rotary switch.
Any value greater than 1 will set the output pin high, but usually the number 1 is used, as this will
improve the readability of the code.
Value of SerialOutBlock
SerialExpression variable
Voltage on the output line
1
+12V
1
0
–12V
1
1
Approximate voltage; do not drive relays or high current loads
directly from this pin.
SDM-SIO1A and SDM-SIO4A Serial Input/Output Modules
34