Campbell Scientific SDM-IO16 16-Channel Input/Output Expansion Module User Manual

Page 22

Advertising
background image

SDM-IO16 16 Channel Input/Output Expansion Module

Pulse counting (1..23): these read the counts accumulated on the specified
ports since they were last read. The maximum number of counts possible is
65535. If the count has not been read before this maximum is reached, this
figure will roll over (from 65535 back to 0) at this point. The count is
incremented when there is a low to high transition on the port.

Frequency measurement (24..46): these read the average frequency on
specified ports since the last time a frequency command was called. See
Appendix A for a full discussion of the effects of sample rate on frequency of
measurement. Generally, the longer the sample rate the higher the resolution.
However, the interval between frequency commands for any one port must be
less than 15.9375 seconds.

Duty cycle measurement (47..69): Read the average duty cycle on the
specified ports since the last duty cycle command for that port. See Appendix
A for a full discussion of the effects of sample rate on duty cycle measurement.
Generally, the longer the sample rate the higher the resolution. However, the
interval between duty cycle commands for any one port must be less than
15.9375 seconds. The value output is a number between 0 and 100 that
indicates the percentage of time the port was high.

Set the port debounce time (70..85): sets the debounce filtering time in
multiples of 244

μsec from 0 to 255 on the specified port. On power-up, the

default time parameter is set to 0, i.e. no debounce filtering. If debounce
filtering is enabled using one of the command codes 86..90, this parameter is
set to 12, equivalent to a filter time of 3.17msec. See Appendix A for full
details of the operation of this filter and the timing.

Configure the ports (86..90): these let you set the configuration of each port
using parameters (3..6) that form part of the instruction. The options allow
setting of output state or input filtering and whether a port will cause the I/O
line to generate an interrupt pulse to the datalogger.

Read the port states (91..92): reads the state of all the ports into either one or
16 sequential input locations. For normal logic input a value of 0 is returned
for the low state and a value of 1 is returned for the high state, while for switch
closures 0 and 1 relate to closed and open. The current state of all ports is
read, even if some are being used for outputs or frequency inputs.

Set the port states (93..94): sets the pattern of the state of the port outputs
either from a single location or 16 sequential locations. These commands will
only change the state of ports already set to output (using one of the command
codes 86..90, 95 or 96). The pattern is stored internally, and so if a port is
subsequently changed from input to output (using command code 95 or 96) the
port will then change to match that set by an earlier call with command code
93 or 94.

Set the direction (input or output) of the ports (95..96): sets the direction of
the ports either from a single location or 16 sequential locations. A value of 1
for a port sets it to input and a value of 0 sets it to output. On power-up, ports
default to being inputs. If the direction is set to be an output immediately after
power-up the state will be low.

16

Advertising