Command Codes - Campbell SDM-IO16 User Manual

16 channel input/output expansion module
Table of Contents

Advertisement

SDM-IO16 16 Channel Input/Output Expansion Module

6.4 Command Codes

12
Available modes are:
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.
For example parameter 3 for ports 16-13 could be 9213 which from the list below
would set port 16 = no change in operation, port 15 = digital input,
port 14 = output logic 1 and port 13 = switch closure input.
Parameter 07 specifies the input location number to hold a counter to indicate
errors in communicating with the SDM-IO16. All communication between the
SDM-IO16 and the datalogger is error checked. If, for any reason, there is an error
then the datalogger will retry the instruction 3 times before continuing with the
next instruction. If, after 3 retries, the communication was not successful, then the
number in this location will increment. If later communication is successful then
this location will be reset to zero. This counter is used normally only to diagnose
problems with SDM communications which may require more careful wiring of
the SDM bus or reduction of the SDM-bus speed if the cables are long (see details
of P115 in the datalogger manual).
Parameter 08 specifies the number of the input location where data is either read
from or written to, depending on the command being used. This may be the first
location in a series of locations.
Parameter 09 is a multiplier that is applied to data read to and from input
locations. Normally you would set this to 1.000, unless applying a calibration
factor to data being read from the SDM-IO16.
Parameter 10 is an offset that is applied to data read to and from input locations.
Normally you would set this to 0.000, unless applying a calibration factor to data
being read from the SDM-IO16.
See programming examples in Appendix A.
The same command codes are used for all datalogger types that support the SDM-
IO16 instruction, therefore this section applies to both forms of instruction.
There are approximately 100 command codes; the full list is tabulated in
Appendix C. The reason there are so many codes is that each type of action is
generally possible for either a single or block of ports of various sizes, as
discussed in Section 6.1 above. A summary table of common command codes is
shown in Table 2, below. There are only a relatively small number of different
types of action that allows the commands to be grouped, as follows:
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.

Advertisement

Table of Contents
loading

Table of Contents