Campbell Scientific CR9000X Measurement and Control System User Manual
Page 264

Section 7. Measurement Instructions
7-40
Parameter
& Data Type
Enter
READIO PARAMETERS
Dest
Variable or
Array
The Variable in which to store the results of the instruction. When Reps are used the results are stored in
an array with the variable name. An array must be dimensioned to have elements for all the Reps.
PSlot
Constant
The number of the slot that holds the 9070 Counter Timer Module for the measurement.
Mask
Constant
The Mask allows the read or write to only act on certain ports. The Mask is ANDed with the value
obtained from the 9070 when reading and ANDed with the source before writing.
This instruction must NOT be placed inside a conditional
statement or in a SubScan.
TimerIO (Dest, PSlot, Edges 16–9, Edges 8–1, Function 16–9,
Function 8–1, AllDoneFlag)
The TimerIO instruction is used to measure the time between edges (state
transitions) on the digital I/O channels of the CR9070/CR9071E Counter and
Digital I/O Module as well as on the Pulse channels on the CR9071E module.
The transitions can be either on the rising edge (low to high) or falling edge
(high to low) of the signal. The states are nominally 0 V low and 5 V high.
When TimerIO is the only measurement in a scan and the time since previous
channel is measured on 4 channels, the fastest interval is approximately 140
microseconds. A single Instruction cannot rep from one module to the
next.
There are six functions that can be performed:
1. The period (msec) of the signal on a channel (CR9070 or CR9071E)
2. The frequency (hertz) of the signal (CR9071E only)
3. The time (msec) since an edge on the previous channel (1 number lower) to an
edge on the specified channel. (CR9070 or CR9071E)
4. The time (msec) from an edge on channel 1 to an edge on the specified
channel. (CR9070 or CR9071E)
5. Number of edges since last execution. (CR9071E P1-P12 only)
6. Number of edges since last edge on channel 1 (CR9071E P1-P12 only).
Only one function may be programmed per channel. The number of values
returned is determined by the number of channels for which a result is
requested.
This instruction must NOT be placed inside a conditional
statement or in a SubScan.
P1 - P12
When using the CR9071E's Pulse channels for timing measurements, the
resolution is 40 nanoseconds and the maximum measurable period is 2
seconds. If using function codes 3 or 4 (timing between edges on two
channels), the input signals on the two channels whose edges you are
NOTE
NOTE