Datalogger instructions – Campbell Scientific SDM-CD8S 8 Channel Solid State DC Control Module User Manual

Page 12

Advertising
background image

SDM-CD8S 8 Channel Solid State DC Control Module

6. Datalogger Instructions

6.1 CRBasic Dataloggers (CR800, CR850, CR1000, CR3000,

CR5000, CR9000(X))

The SDMCD16AC instruction is used to control the SDM-CD8S and all
versions of the SDM-CD16.

SDMCD16AC (Source, Reps, SDMAddress)

Remarks

A port on an SDM-CD8S 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 16 values to be sent are held in the
Source array or long integer. The SDM-CD8S only uses the first 8 values to
set its 8 ports.

The SDMCD16AC instruction has the following parameters:

Source

The Source parameter is an array (dimensioned as Float,
Long, or Boolean) or a single long integer which holds the
values that will be sent to the SDM-CD8S to enable/disable
its ports. An SDM-CD8S has 8 ports; therefore, in most
instances the source array should be dimensioned to 8 times
the number of Repetitions (the number of SDM-CD8S
devices to be controlled). As an example, with the array
CDCtrl(16), 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 8 on the
second SDM-CD8S.

If the Source parameter is defined as a Long variable, but it
is dimensioned less than 16 * Reps, Source will act as a
binary control for the instruction whose bits 0..15 will
specify control ports 1..16, respectively. In this instance,
Source(1) will be used for the first rep, Source(2) will be
used for the second, and so on. The SDM-CD8S only
responds to the first 8 bits sent.

Reps

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

SDMAddress

The SDMAddress parameter is used to define the address of
the SDM-CD8S 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

Advertising