beautypg.com

61 indirect indexed move, 62 covariance/correlation – Campbell Scientific CR10X Measurement and Control System User Manual

Page 169

background image

SECTION 10. PROCESSING INSTRUCTIONS

10-11

*** 61 INDIRECT INDEXED MOVE ***

FUNCTION
Moves input data from location X to location Y,
where X and Y are indirectly addressed (X and
Y are stored in the locations specified by
Parameters 1 and 2). If a location parameter is
specified as "indexed" (xxxx--), then the actual
input location referenced is calculated by adding
the current index counter to the value in the
specified input location. When used outside a
loop, the addressing is simply indirect because
the index counter is zero.

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

4

Input location containing
source location X

02:

4

Input location containing
destination location Y

Input locations altered: 1

*** 62 COVARIANCE/CORRELATION ***

FUNCTION
The Covariance/Correlation Instruction
(COV/CORR) for the CR10X calculates: 1)
means (M), 2) variances (V), 3) standard
deviations (SD), 4) covariances (COV), and 5)
correlation coefficients (CORR) for a set of input
values and stores the results in Input Storage.
The instruction requires the set of input values to
be located contiguously in Input Storage. The
user specifies the location of the first value and
how many total values exist. The number of
input values processed by each type of
calculation (means, variances, etc.) is
independently specified for each type. The order
of the input values determines which inputs are
processed for each type of calculation.

The instruction does not conform to the CR10X's
four instruction types. Data located in Input
Storage is processed, and the results returned to
Input Storage whenever an averaging period is
completed (Parameter 7) or the Output Flag is
set. The instruction controlling the Output Flag
must precede the COV/CORR Instruction. The
reason the calculated results are returned to Input
Storage is to allow the user access for additional
processing before storing the values in Final
Storage. Sample Instruction 70 must be used to
transfer final results from Input to Final Storage.

To accommodate cases where it is desirable to
calculate the statistical quantities over time
periods shorter than the Output Interval, an
averaging period shorter than the Output Interval

may be specified. The final values obtained at
the Output Interval are the properly weighted
average of the values calculated at the
subinterval averaging periods. This feature
allows the recording of statistical data over
longer time periods by removing the effect of
longer period frequencies in the input signals;
i.e., it provides a high pass filter. For example,
assume the variance of an input is desired. It is
determined that the averaging period should not
exceed 5 minutes due to variation in the mean
over longer time intervals. One approach is to
calculate and record the variance every 5
minutes. By specifying the subinterval averaging
period as 5 minutes and the Output Interval as 1
hour, however, the average of the 5 minute
variances are recorded every hour. The
averaging period is entered as the number of
input samples in Parameter 7 of the COV/CORR
Instruction. The number of samples for a given
period is given by:

Number of Samples =

Averaging period in seconds

Table execution interval in seconds

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

2

Number of input values
located sequentially in
input memory

02:

2

Number of means desired

03:

2

Number of variances
desired

04:

2

Number of standard
deviations desired

05:

2

Number of covariances
desired

06:

2

Number of correlations
desired

07:

FP

Number of input
samples in averaging
period

08:

4

Input storage location
of first value in
sequential input string

09:

4

First Input Storage
location to store string
of final results

If the specified number of samples in the
averaging period (Parameter 7) exceeds the actual
number of samples occurring in the Output
Interval, the Output Interval becomes the
averaging period.