Datalogger programming, 1 crbasic programming, 1 sdmcd16ac instruction – Campbell Scientific SDM-CD16AC 16-Channel ac/dc Relay Controller User Manual
Page 12

SDM-CD16AC 16 Channel AC/DC Controller
0
1
2
3
0
1
2
3
BA
ADDRESSES
FIGURE 6. Addressing
6. Datalogger Programming
In CRBasic, the SDMCD16AC instruction is used to control the SDM-
CD16AC. Dataloggers that are programmed with CRBasic include our 
CR800, CR850, CR1000, CR3000, and CR5000. The SDMSpeed instruction 
should also be used if the cable length is longer than 20 ft. 
Edlog Instruction 104 is used by the CR23, 21X, and CR10(X) to control the 
SDM-CD16AC, and Edlog Instruction 29 is used by the CR7. SDM-CD16AC 
outputs that are to be controlled by the datalogger must have the toggle switch 
in the AUTO position. 
6.1 CRBasic Programming
6.1.1 SDMCD16AC Instruction
Syntax 
SDMCD16AC (Source, Reps, SDMAddress) 
Remarks 
A port on an SDM-CD16AC is enabled/disabled (turned on or off) by sending 
a value to it using the SDMCD16AC instruction. A non-zero value will enable 
the port; a zero value disables it. The values to be sent to the CD16AC are held 
in the Source array. 
The SDMCD16AC instruction has the following parameters:
Source: The Source parameter is an array which holds the values that will be 
sent to the SDM-CD16AC to enable/disable its ports. An SDM-CD16AC has 
16 ports; therefore, the source array must be dimensioned to 16 times the 
number of Repetitions (the number of SDM-CD16AC devices to be 
8
