![background image](http://html1.mh-extra.com/html/campbell/sdm-sio2r/sdm-sio2r_product-manual_3760120029.webp)
6.3 Programming
The
SDMGeneric()
is used to turn the 12V and V+ terminals on and off.
NOTE:Note: Use
SequentialMode
if the
SDMGeneric()
instructions need to be inside a
conditional statement.
SDMGeneric
(Dest, SDM_addr, 7, 1, hexVar, 0, 1, 1, -0
Dest
is a variable declared to hold any incoming bytes from the SDM device.
SDM_addr
is the
SDM address of the device.
HexVar
is a 2-digit hex value that determines if a voltage is turned
on or off. The left digit controls V+; the right digit controls 12V. Sending a 1 for a digit turns the
Relay and LED on; sending a 2 for a digit turns the relay and LED off; sending a 0 will not change
the relay/LED value. For example:
SDM-SIO2R Serial Input/Output Module with Switched Sensor Power
26