Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 110

Advertising
background image

Section 6. Data Table Declarations and Output Processing Instructions

6-16

Sample(4, Temp(1), IEEE4)
FieldNames “ IntakeT(2)”

The 4 values from the variable array Temp are stored in the output table with
IntakeT,an array of 2, and the remainder of the default array Temp:
IntakeT(1), IntakeT(2), Temp(3), and Temp(4),

Histogram (BinSelect, DataType, DisableVar, Bins, Form, WtVal, LoLim,

UpLim)

Processes input data as either a standard histogram (frequency distribution) or
a weighted value histogram.

The standard histogram counts the time that the bin select variable is within a
particular sub-range of its specified range. The count in a bin is incremented
whenever the bin select input falls within the sub-range associated with the bin.
The value that is output to the data table for each bin can either be the
accumulated total count for each bin or a relative fraction of time computed by
dividing the accumulated total in each bin by the total number of scans. This
form of output is also referred to as a frequency distribution.

The weighted value histogram does not add a constant to the bin but instead
adds the current value of a variable. That variable name is entered as the
weighted value. Each time the instruction is executed, the weighted value is
added to a bin. The sub-range that the bin select value is in determines the bin
to which the weighted value is added. When the histogram is output, the value
accumulated in each bin can be output or the totals can be divided by the
TOTAL number of input scans and then output. These values are the
contributions of the sub-ranges to the overall weighted value. A common use
of a closed form weighted value histogram is the wind speed rose. Wind speed
values (the weighted value input) are accumulated into corresponding direction
sectors (bin select input).

To obtain the average of the weighted values that occurred while the bin select
value was within a particular sub-range, the weighted value output must be
divided by the fraction of time that the bin select value was within that
particular sub-range (i.e., a standard histogram of the bin select value must also
be output; for each bin the weighted value output must be divided by the
frequency distribution output).

The frequency distribution histogram is specified by entering a constant in the
weighted value parameter. Enter 1 to have frequency output as the fraction of
the total time that the bin select value was within the bin range. Enter 100 to
have the frequency output as the percent of time. Enter a variable name for the
weighted value histogram.

At the user's option, the histogram may be either closed or open. The open
form includes all values below the lower range limit in the first bin and all
values above the upper range limit in the last bin. The closed form excludes
any values falling outside the histogram range.

Advertising