Campbell SDM-IO16 User Manual page 23

16 channel input/output expansion module
Table of Contents

Advertisement

User Guide
Frequency measurement (24..46): these read the average frequency on specified
ports since the last time a frequency command was called. See Appendix B 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.17 msec. See Appendix B 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.
Set the interrupt mask (97..98): these commands set a binary mask across the
ports to define whether a change of state on the port (which must also be
configured as an input) will generate an interrupt signal to the datalogger. When
the appropriate mask bit representing the port is set to 1 an interrupt will be
generated whenever the port changes state. The interrupt is generated by pulsing
the I/O line on the SDM-IO16 until the datalogger responds by reading the port
states of the SDM-IO16 in question using the SDM-IO16 command. The I/O line
would normally be connected to a control port on the datalogger that activates an
interrupt subroutine. When the I/O line is not pulsing, it switches to a high
impedance state, which means that several similar I/O lines can be connected in
parallel to the same control port on the datalogger.
13

Advertisement

Table of Contents
loading

Table of Contents