Specifications
Section 7. Measurement Instructions
Parameter
& Data Type
Enter
90 Set port 16-1 from Mode parameters
91 Read state of ports 1-16 into one variable (Dest). The result
is a 16 bit decimal representation from 0-65535.
92 Read state of ports 1-16 into 16 separate variables (Dest
must be dimensioned to 16). Dest(1) holds the state of port
1, Dest(2) port 2, etc. State is represented by 0 or 1.
93 Set state of ports 1-16 from a single variable (Dest). Dest
should be a 16 bit decimal representation from 0-65535.
94 Set state of ports 1-16 from 16 separate variables (Dest must
be dimensioned to 16). Dest(1) sets the state of port 1,
Dest(2) port 2, etc. State is represented by 0 or 1.
95 Set direction of ports 1-16 from a single variable (Dest).
Dest should be a 16 bit decimal representation from 0-
65535.
96 Set direction of ports 1-16 from 16 separate variables (Dest
must be dimensioned to 16). Dest(1) sets the direction of
port 1, Dest(2) port 2, etc. Direction is represented by 0 or
1.
97 Set interrupt mask of ports 1-16 from a single variable
(Dest). Dest should be a 16 bit decimal representation from
0-65535.
98 Set interrupt mask of ports 1-16 from 16 separate variables
(Dest should be dimensioned to 16). Dest(1) sets port 1,
Dest(2) port 2, etc. The mask is represented by 0 or 1.
99 Read the OS signature, OS version and counters for
watchdog resets and communication errors into 4 separate
variables (Dest must be dimensioned to 4). Using this
command also resets the counters.
Mode
Constant or
Variable
The Mode parameter configures a bank of four ports when a Command code
86 through 90 is used (if any other Command Code is used, enter 0 for the
Mode). Mode is entered as four digits, where each digit 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.
7-46