Campbell Scientific CR9000X Measurement and Control System User Manual

Page 265

Advertising
background image

Section 7. Measurement Instructions

7-41

comparing should either be periodic, or have periods less than the Program

Scan rate. If neither of these conditions are met, the error in the measurement

of the time between edges on the two channels could be up to 1/2 of the Scan

rate.

If using function codes 1 or 2 (return period or frequency of signal), the time

of the last edge prior to the beginning of the scan, and the time of the last edge

of the scan are measured, with a resolution of 40 nanoseconds, and the

difference is divided by the number of edges that occurred within the scan.

This feature eliminates the issues with the resolution of pulse measurements

that are present when using the PulseCount instruction.

See Section 3.4 Pulse Count Measurements for more on the PulseCount

frequency resolution).

I/O 1 - 16

When using the I/O channels with a constant for the AllDoneFlag, the logger

will stay within the instruction until it has results for all measurements

requested. This can result in skipped scans if the input signal frequency is

slow. The resolution is approximately 10 microseconds + 15 microseconds x

the number of results requested.

Pulse channels (P1 thru P12) and I/O channels cannot be
programmed with a single instruction.

Parameter

& Data Type

Enter

TIMERIO PARAMETERS

Dest

Var. or Array

Array for results of the measurements.

Pslot

Constant

The slot that the CR9070/CR9071E module is in.

Edges

Constant

There are two Edge parameters, 8 digits each, one digit is for either each of the 16 I/O channels on the
CR9070/CR9071E Module when programmed with a 0 or a 1, or for the 12 pulse channels when
programmed with a 2, 3, 4, or 5. Each digit configures the respective channel to count a transition on the
rising edge (from <1.5V to >3.5V) or on the falling edge (from >3.5V to <1.5V).

Digit

Edge

0

Falling, IO channel, I/O 1 to I/O 16

1

Rising, IO channel, I/O 1 to I/O 16

2

Falling, high freq, CR9071E pulse channel only: P1 to P12

3

Rising, high freq, CR9071E pulse channel only: P1 to P12

4

Falling, CR9071E Pulse channels only.
P1 to P8:low level ac; P9-P12:switch closure

5

Rising, CR9071E Pulse channels only.
P1 to P8:low level ac. P9 to P12:switch closure

The first edge 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 edge 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. For
example, 00000101 in the second edge parameter means channels 1 and 3 count rising edges and
channels 2 and 4-8 are to count falling edges (this could also be specified as 101, the leading zeros do
not need to be entered). Separate instructions are required when programming both I/O and Pulse
channels for TimerIO functions. See PulseCount for description of high freq, low level ac, and switch
closure inputs.

Instruction cannot rep over to another module

.

NOTE

Advertising