24 calibration, 25 read ports – Campbell Scientific CR23X Micrologger User Manual
Page 150

SECTION 9. INPUT/OUTPUT INSTRUCTIONS
9-16
3 - CS I/O port
76,800 baud to
SM192/716
5 - CS I/O port
38.4 K
6 - RS-232 port
38.4 K
D
Measurement
0 - Differential
measurement
1 - Single-ended
measurement
05:
FP
Scan interval (ms,
minimum 0.6666 x
reps, limited to 25 ms)
06:
FP
Number of scans (units
of 1000)
07:
4
Number of samples
saved before trigger (not
used with serial output)
08:
FP
Trigger limit (mV,
unscaled measurement)
09:
4
Excitation voltage (mV)
10:
4
1st input location in
which to store data
11:
FP
Multiplier (not used with
serial output)
12:
FP
Offset (not used with
serial output)
Input locations altered: number of scans plus
number of samples saved before trigger
*** 24 CALIBRATION ***
Calibrate and put calibration values into input
locations if desired. Calibration takes place only
when Instruction 24 is executed. Automatic
calibration is disabled if Instruction 24 is in a
program table. See Section 13.7 for help on
when to use Instruction 24.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
2
Option (0 for most
applications)
02:
4
Beginning input
location (Option 0 does
not alter any input
locations)
Input Locations Used: 0 to 31 depending on
option and what is being used in the program.
TABLE 9-7
Option
Description
0
Calibrate only the active components;
do not store the results
1
Calibrate only the active components;
store the active components
2
Calibrate all components; store the
results
3
Do not calibrate; store active
components
*** 25 READ PORTS ***
FUNCTION
The status of a group of ports selected by a
mask is read and placed in an input location.
The status is a base 2 representation of the
ports converted to base 10. Port 1 is the least
significant bit. For example, if all ports are read,
and the port status is as follows:
PORT
C8
C7
C6
C5 C4 C3
C2 C1
VALUE
128
64
32
16
8
4
2
1
STATUS
0
0
1
1
0
0
1
0
(0=low,
1=high)
Base 10 equivalent: 32 + 16 + 2 = 50
50 will be stored in the input location.
The mask is also base 2 representation; 1
indicates the port is to be read, 0 results in a 0
for the port regardless of the status of the port
(AND operation). For example, if 50 (see above
example) is entered for the mask, ports 2, 5,
and 6 are read. If only ports 4 and 5 are high,
the status will be 16 (port 4 is not read).
NOTE: Voltages in excess of 16 volts
applied to a control port can cause the
CR23X to malfunction.
PARAM.
DATA
NUM.
TYPE
DESCRIPTION
01:
4
MASK (0-255)
02:
4
INPUT LOCATION TO
STORE RESULT
Input locations altered: 1