Campbell Scientific CR10X Measurement and Control System User Manual
Page 144

SECTION 9. INPUT/OUTPUT INSTRUCTIONS
9-12
Five trigger options are available for the second
digit in Parameter 4: 0 trigger immediately,
start saving or sending data with the first
measurement made; 1 trigger if the
measurement is greater than the limit entered
or if the digital trigger is high; 2 trigger if the
measurement is less than the limit or if the
digital trigger is low; 3 trigger on rising edge;
i.e., when the measurement goes from below to
above the limit or when the digital trigger goes
from low to high; 4 trigger on falling edge; i.e.,
trigger when measurement goes from above the
limit to below it or when the digital trigger goes
from high to low. When triggering on the rising
or falling edge, the input must make the
specified transition to trigger. For example,
when triggering on the rising edge, if the input
starts out high, it must go low and then high
again to trigger.
DATA SENT TO INPUT STORAGE
When the measurements are sent to Input
Storage, Parameter 6 is used to specify the
number of scans made on the channels being
measured (the CR10X multiplies the number
entered by 1000). The measurements from
each channel are stored contiguously. For
example: Parameter 1 specifies 4 channels are
to be measured, Parameter 6 specifies 250
scans (0.250 entered), and Parameter 10
specifies 1 as the first input location to store
data. The measurements from the first channel
will be stored in input locations 1-250, those
from the second channel in locations 251-500,
etc. If insufficient locations are allocated to
Input Storage (
∗A) to accommodate the number
of locations called for by Parameter 6 multiplied
by Parameter 1 (e.g., 250 x 4 = 1000), an error
code, E 60, will be displayed when the program
is compiled.
The number of scans determines how many
samples will be saved, and hence, when
Instruction 23 will be completed and execution
will pass on to the next instruction.
Measurements before and/or after the trigger
can be saved. Parameter 7 determines how
many scans that occurred prior to the trigger
are saved. For example, if 250 scans are
specified, and an offset of 20 is entered for
Parameter 7, then the trigger measurement will
be stored in location 21. Locations 1-20 will
contain the measurements that preceded the
trigger and 22-250 will contain the
measurements following the trigger. If only 10
measurements are made before the trigger,
then they will be stored in locations 11-20 while
the value -99999. will be stored in locations 1-10
for which no measurements were made.
DATA SENT TO SERIAL PORT
When the raw A/D data is sent out the serial
port, the measurement data is not buffered and
hence, only the trigger and subsequent
measurements can be sent. The number of
measurements is determined by Parameters 1
and 6. Because the total number of
measurements are limited only by the storage of
the receiving computer, this can be a very large
number. Parameter 6 is the number of
measurements per channel to send in units of
1000 (e.g., 0.001 represents 1 measurement).
If 0 is entered for Parameter 6, the CR10X will
continue to send data until the Instruction is
aborted by pressing any key on the CR10KD
Keyboard Display.
Raw A/D data may be sent to a maximum of 8
SM192 or SM716 Solid State Storage Modules
(SM's) at 76.8K baud (Parameter 4, Destination
Option C = 3). All SM's connected should be
set to Fill and Stop and have consecutive
addresses. The Burst data will be sent to the
first available (lowest address) Storage Module,
followed by the next lowest addressed, and so
on. If the data is retrieved from the SM's using
SMCOM.COM, a Storage Module
communications program contained in the
PC208 Datalogger Support Software, the data
collection format must be "A as stored 8 bit".
This will transfer the raw A/D data to a
computer file. The raw A/D data can be
converted to ASCII using SPLIT, a general
purpose data reduction program also contained
in PC208.
If SPLIT is not available for converting the raw
A/D, the following A/D format information is
provided for decoding purposes. At the start of
the series of measurements, the CR10X makes
a self-calibration measurement. The calibration
data is sent at the start of the measurement
data. The serial data is sent as a series of
signed 2 byte integers (most significant byte
sent first; i.e., Integer = 256
∗ byte 1 + byte 2):
I1...In. The first integer, I1 is a start of output
identifier, FCxx (hex), where the first byte is
always FC (never seen in the data), and the
second byte is a number less than 100
(decimal, 64 hex), which is the Instruction
Location Number of Instruction 23 in the
program table. I2 divided by I3 is the multiplier