Specifications

Section 6. Data Table Declarations and Output Processing Instructions
LevelCrossing (Source, DataType, DisableVar, NumLevels, SecondDim,
CrossingArray, 2ndArray, Hysteresis, Option)
Parameter
& Data Type
Enter
Source
Variable or
Array
The variable that is tested to determine if it crosses the specified levels. If a two
dimensional level crossing is selected, the source must be an array. The second
element of the array (or the next element beyond the one specified for the
source) is the variable that is tested to determine the second dimension of the
histogram.
DataType
A code to select the data storage format.
Constant
Alpha
Code
Data Format
IEEE4 IEEE 4 byte floating point
FP2 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, when the disable variable is 0 the current input is
not included in the histogram. The histogram that is eventually stored includes the
inputs that occurred while the disable variable was 0.
Value Result
0 Process current input
0
Do not process current input
NumLevels
Constant
The number levels on which to count crossings. This is the number of bins in which to
store the number of crossings for the associated level. The actual levels are input in the
Crossing Array. A count is added to a bin when the Source goes from less than the
associated level to greater than the associated level (Rising edge or positive polarity).
Or if Falling edge or negative polarity is selected, a count occurs if the source goes from
greater than the level to less than the level.
SecondDim
Constant
The second dimension of the histogram. The total number of bins output =
NumLevels*2ndDim. Enter 1 for a one dimensional histogram consisting only of the
number of level crossings. If 2ndDim is greater than 1, the element of the source array
following the one tested for level crossing is used to determine the second dimension.
Crossing
Array
Array
The name of the Array that contains the Crossing levels to check. Because it does not
make sense to change the levels while the program is running, the program should be
written to load the values into the array once before entering the scan.
SecondArray
Array
The name of the Array that contains the levels that determine the second dimension.
Because it does not make sense to change the levels while the program is running, the
program should be written to load the values into the array once before entering the scan.
Hysteresis
Constant
The minimum change in the source that must occur for a crossing to be counted.
Option
Constant
The Option code is 3 digits - ABC
Code Form
A = 0
Count on falling edge (source goes form > level to <level)
A = 1
Count on rising edge (source goes from < level to >level)
B = 0
Reset histogram counts to 0 after each output.
B = 1
Do not reset histogram; continue to accumulate counts.
C = 0
Divide count in each bin by total number of counts in all bins.
C = 1
Output total counts in each bin.
101 means: Count on rising edge, reset count to 0 after each output, output
counts.
Processes data with the Level Crossing counting algorithm. The output is a
two dimensional Level Crossing Histogram. One dimension is the levels
crossed; the second dimension, if used, is the value of a second input at the
time the crossings were detected.
The total number of bins output =
6-21