2 sdmspeed instruction – Campbell Scientific SDM-CD16AC 16-Channel ac/dc Relay Controller User Manual

Page 13

Advertising
background image

SDM-CD16AC 16 Channel AC/DC Controller

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-CD16AC.

If the Source parameter is defined as a Long variable, but it is dimensioned less
than 16X Reps, Source will act as a binary control for the instruction whose
bits 0…15 will specify control ports 1…16, respectively. In this situation,
Source (1) will be used for the first Rep; Source (2) will be used for the second
Rep, and so on.

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

SDMAddress: The SDMAddress parameter is used to define the address of
the CD16AC 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.

CRBasic dataloggers use base 10 when addressing SDM devices.
Edlog programmed dataloggers (e.g., CR10X, CR23X) used
base 4 for addressing (see Table 2).

NOTE

TABLE 2. Base 10 to Base 4 Reference Chart

Base 10

Base 4

Base 10

Base 4

0 0

8 20

1 1

9 21

2 2

10

22

3 3

11

23

4 10

12

30

5 11

13

31

6 12

14

32

7 13

15

33

(reserved)

6.1.2 SDMSpeed Instruction

The SDMSpeed instruction is used to change the bit period that the datalogger
uses to clock the SDM data. Slowing down the clock rate may be necessary
when long cable lengths are used to connect the datalogger and SDM devices.

The syntax of this instruction is as follows:

SDMSpeed (

BitPeriod

)

The BitPeriod argument can be an integer or a variable. If the SDMSpeed
instruction is not in the program, a default bit period is used. If 0 is used for
the argument, the minimum allowable bit period is used. Table 3 shows the

9

Advertising