Writeio (pslot, mask, source), 7 serial sensors – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 266

Section 7. Measurement Instructions
7-42
Parameter
& Data Type
Enter
TIMERIO PARAMETERS
Function
Two parameters, 8 digits each, one digit to program results for each channel.
Constant
Digit
Results
0
None
1
Period (msec)
2
Frequency (CR9071E P1 to P12 only)
3
time since previous channel (msec)
4
time since channel 1 (msec)
5
count since last execution (CR9071E Pulse Channels only)
6
count since channel 1 (CR9071E Pulse Channels only)
The digits correspond to the channels using the same layout outlined for the edge parameter. The first
Function parameter is either for I/O channels 16 to 9 or for Pulse channels 12 to 9 (descending order)
depending on the edge code used. The second Function parameter is either for I/O channels 8 to 1 or for
Pulse channels 8 to 1. The digits represent the channels in descending order left to right.
Example 1: 00000211 in the second Function parameter sets up the module to return 3 values:
1. The period of the input signal on channel 1
2. The period of the input signal on channel 2
3. The frequency of the input signal on channel 3.
This could also be specified as 211 (the leading zeros do not need to be entered).
Example 2: 00004301 in the second Function parameter sets up the module to return 3 values:
1. The period for channel 1
2. The time between an edge on channel 2 and an edge on channel 3
3. The time between an edge on channel 1 and an edge on channel 4.
The values are returned in the sequence of the channels, 1 to 16.
Note: The destination array must be dimensioned large enough to hold all the functions requested.
AllDoneFlag
Constant or
Variable
If a variable is entered for the AllDoneFlag parameter, the variable will be set to True (-1.0)
when all the functions have a value. This allows a user program to test when its experiment is
complete. If a constant rather than a variable is entered, then the task sequencer will stay in
this instruction until values can be returned for all channels.
WriteIO (PSlot, Mask, Source)
WriteIO is used to set the status of selected digital I/O channels (ports) on the
CR9070/CR9071E Counter - Timer / Digital I/O Module or the CR9060’s
control ports.
See the WriteIO topic in Section 9.2 Data Logger Status/Control for more
complete info on this instruction.
See the PortSet topic in Section 9.2 Data Logger Status/Control for setting
the Output channels on the CR9060.
7.7 Serial Sensors
SerialInput(Dest, MaxValues, TerminateChar, FilterString)
The SerialIn instruction is used to set up the RS232 port for receiving
incoming serial data. This instruction has limited functionality and has never
been fully implemented. Campbell Scientific recommends that a SDM-SIO4
be utilized when measuring serial sensors with the CR9000X.