Datalogger instructions, 1 crbasic, 2 edlog – Campbell Scientific SDM-CD16D 16-Channel Digital Control Port Expansion Module User Manual

Page 11

Advertising
background image

SDM-CD16D 16 Channel Digital Control Port Expansion Module

6. Datalogger Instructions

6.1 CRBasic

The SDMCD16AC instruction in CRBasic is used by our CR800, CR850,
CR1000, CR3000, and CR5000 dataloggers. With this instruction, a port on
an SDM-CD16D is enabled/disabled (turned on or off) by sending a value to it.
A non-zero value will enable the port; a zero value disables it. The values to
be sent to the SDM-CD16D are held in the Source array.

Syntax

SDMCD16AC (

,

,

)

Source Reps SDMAddress

Remarks

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-CD16D to enable/disable its ports. An
SDM-CD16D has 16 ports; therefore, the source array must be
dimensioned to 16 times the number of Repetitions (the
number of SDM-CD16D devices to be controlled). As an
example, with the array CDCtrl(32), the value held in
CDCtrl(1) will be sent to port 1, the value held in CDCtrl(2)
will be sent to port 2, etc. The value held in CDCtrl(32) would
be sent to port 16 on the second SDM-CD16D.

Reps

The Reps parameter is the number of SDM-CD16D devices
that will be controlled with this instruction.

SDMAddress The SDMAddress parameter is used to define the address of

the SDM-CD16D that will be controlled with this instruction.
Valid SDM addresses are 0 through 14. Address 15 is reserved
for the SDMTrigger instruction. If the Reps parameter is
greater than 1, the datalogger will increment the SDM address
for each subsequent device that it communicates with.

6.2 Edlog

Instruction 104 is used by the CR10/10X, CR23X, CR7 and 21X to control the
SDM-CD16D, and Instruction 29 is used by older CR7s. The Instruction
descriptions are shown below.

7

Advertising