4 output processing instructions, Average (reps, source, datatype, disablevar) – Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 105

Advertising
background image

Section 6. Data Table Declarations and Output Processing Instructions

6-11

Parameter
& Data Type

Enter

StatusComma
nd

Constant

The StatusCommand specifies the type of information requested from the
transmitter.

Code

Description

Array Dim Required

0

Read time

4

1

Status

13

2

Last message status

14

3

Transmit random message

1

4

Read error register

10

5

Reset error register

1

6

Return transmitter to online mode

1

6.4 Output Processing Instructions

Average (Reps, Source, DataType, DisableVar)

This instruction stores the average value over the output interval for the source
variable or each element of the array specified.

Parameter
& Data Type

Enter

Reps

Constant

The number of averages to calculate. When Reps is greater than one, the source must be
an array.

Source

Variable

The name of the Variable that is to be averaged.

DataType

A code to select the data storage format.

Constant

Alpha Code

Numeric Code

Data Format

IEEE4

24

IEEE 4 byte floating point

FP2

7

Campbell Scientific 2 byte floating point

DisableVar

Constant,
Variable, or
Expression

A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs
are processed. For example, in the Average instruction, when the disable variable is

0

the current input is not included in the average. The average that is eventually stored is
the average of the inputs that occurred while the disable variable was 0.
Value

Result

0

Process current input

0

Do not process current input

Covariance (NumVals, Source, DataType, DisableVar, NumCov)

Calculates the covariance of values in an array over time. The Covariance of

X

and

Y

is calculated as:

(

)

Cov X Y

X Y

n

X

Y

n

i

i

i

n

i

i

n

i

i

n

(

, )

=

=

=

=

∑ ∑

1

1

1

2

Advertising