2 sdmcd16ac instruction, 3 sdmspeed instruction – Campbell Scientific SDM-IO16 16-Channel Input/Output Expansion Module User Manual

Page 17

Advertising
background image

SDM-IO16 16 Channel Input/Output Expansion Module

Mode is entered as a four digit parameter, where each
parameter indicates the setting for a port. Ports are represented
from the highest port number to the lowest, from left to right
(e.g., 16 15 14 13; 12 11 10 9; 8 7 6 5; 4 3 2 1). There is a
Mode for Ports 16 - 13, 12 - 9, 8 - 5, and 4 - 1. The valid codes
are:

Code Description
0

Output logic low

1

Output logic high

2

Input digital, no debounce filter

3

Input switch closure 3.17 msec debounce filter

4

Input digital interrupt enabled, no debounce filter

5

Input switch closure interrupt enabled 3.17 msec,
debounce filter

6 Undefined
7 Undefined
8 Undefined
9 No

change

Mult, Offset

The Mult and Offset parameters are each a constant, variable,
array, or expression by which to scale the results of the
measurement.

6.2.2 SDMCD16AC Instruction

All but the oldest versions of the CR5000 operating system also support the
SDMCD16AC instruction that can be used to control the SDM-IO16 for output
mode only. This instruction should only be used if backward compatibility is
required, as only the IO16 instruction supports error detection on
communication between the peripheral and the datalogger.

6.2.3 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 2 shows the
default, minimum allowable, and maximum bit period for each of our CRBasic
dataloggers.

11

Advertising