Specifications
Section 7. Measurement Instructions
SDMIO16 (Dest, Status, Address, Command, Mode Ports 16-13, Mode
Ports 12-9, Mode Ports 8-5, Mode Ports 4-1, Mult, Offset)
The SDMIO16 instruction is used to set up and measure an SDM-IO16 control
port expansion device.
The ports on the SDM-IO16 can be configured for either input or output.
When configured as input, the SDM-IO16 can measure the logical state of
each port, count pulses, and measure the frequency of and determine the duty
cycle of applied signals. The module can also be programmed to generate an
interrupt signal to the datalogger when one or more input signals change state.
When configured as an output, each port can be set to 0 or 5 V by the
datalogger. In addition to being able to drive normal logic level inputs, when
an output is set high a ‘boost’ circuit allows it to source a current of up to 100
mA, allowing direct control of low voltage valves, relays, etc.
Parameter
& Data Type
Enter
Dest
Variable
Array
The variable or variable array in which to store the results of the
measurement (Command codes 1 - 69, 91, 92, 99) or the Source value for
the Command Codes (70 - 85, 93 - 98). The variable array for this
parameter must be dimensioned to accommodate the number of values
returned (or sent) by the instruction.
Status
Variable
The variable in which to store the result of the command issued by the
instruction. If the command is successful a 0 is returned; otherwise, the
value is incremented by 1 with each failure.
SDMAddress
Constant
The SDMAddress parameter defines the address of the SDM-IO16 with
which to communicate. 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
SDM-IO16 with which it communicates.
Command
The following are valid command options:
Constant or
Variable
Command
Code
Description
1 Read port 1's accumulated counts into Dest
2 Read port 2's accumulated counts into Dest
3 Read port 3's accumulated counts into Dest
4 Read port 4's accumulated counts into Dest
5 Read port 5's accumulated counts into Dest
6 Read port 6's accumulated counts into Dest
7 Read port 7's accumulated counts into Dest
8 Read port 8's accumulated counts into Dest
9 Read port 9's accumulated counts into Dest
10 Read port 10's accumulated counts into Dest
11 Read port 11's accumulated counts into Dest
12 Read port 12's accumulated counts into Dest
13 Read port 13's accumulated counts into Dest
14 Read port 14's accumulated counts into Dest
15 Read port 15's accumulated counts into Dest
16 Read port 16's accumulated counts into Dest
7-43