Table of Contents
Previous Chapter CIRBUF keeps a circular buffer of length NSAM. Each time the record is processed, it gets the data referenced by INP and puts it into the circular buffer referenced by VAL. Note that when INP refers to a scalar, VAL is just a time ordered circular buffer of values obtained from INP.
If AVERAGE is chosen, then VAL refers to an array of length NSAM that contains an element by element time average of values taken from the array referenced by INP. N successive samples of INP are averaged in order to compute VAL.
If NTO1LOW, NTO1HIGH, or NTO1AVE are chosen, then VAL is a circular buffer of length NSAM. The actual algorithm depends on whether INP references a scalar or an array. If INP refers to a scalar, then N successive time ordered samples of INP are taken. After the Nth sample is obtained a new value, determined by the algorithm (LOW, HIGH, or AVE), is written to the circular buffer referenced by VAL. If INP refers to an array, then each time the record is processed, the array referenced by INP is obtained, divided into sub-arrays each of length N, and the algorithm applied to each sub-array. The result obtained from each subarray is written to the circular buffer referenced by VAL.
--------------------------------------------------------------
Field Type DCT Initial Access Modify Rec Proc PP
Monitor
--------------------------------------------------------------
VAL DOUBLE No 0 Yes Yes Yes Yes
INP INLINK Yes 0 No No N/A No
RES SHORT No 0 Yes Yes No No
ALG RECCHOICE Yes 0 Yes No No No
NSAM ULONG Yes 1 Yes No No No
N ULONG Yes 1 Yes No No No
ILIL FLOAT Yes 0 Yes Yes No No
IHIL FLOAT Yes 0 Yes Yes No No
HOPR FLOAT Yes 0 Yes Yes No No
LOPR FLOAT Yes 0 Yes Yes No No
PREC SHORT Yes 0 Yes Yes No No
EGU STRING Yes null Yes Yes No No
OFF ULONG No 0 Yes No No No
NUSE ULONG No 0 Yes No No No
BPTR NOACCESS No 0 No No No
SPTR NOACCESS No 0 No No No
WPTR NOACCESS No 0 No No No
CVB DOUBLE No 0 Yes No No No
INX ULONG No 0 Yes No No No
--------------------------------------------------------------
--------------------------------------------------------------------------------------------
Name Summary Description
--------------------------------------------------------------------------------------------
VAL Value Field This field is determined as a result of record processing. It
is a double precision array of length NSAM.
INP Input Link INP can be a constant, a database link, or a channel access
link. Unless it is a database link, ALG is meaningless.
RES Reset Setting this field causes the algorithm to start over from
the beginning.
ALG Algorithm CIRBUF, AVERAGE, NTO1LOW, NTO1HIGH, or
NTO1AVE.
NSAM Number in Sample Number of elements in VAL.
N Number Value of N for AVERAGE and NTO1xxx algorithms.
ILIL Initial Low Applies to NTO1xxx applied to INP arrays.
Interest Value
IHIL Initial High Interest
Value
HOPR High Operating These fields determine the upper and lower display limits
Range for graphics displays and the upper and lower control
limits for control displays. The fields are used by record
support to honor calls to get_graphic_double or
get_control_double.
LOPR Low Operating
Range
PREC Display Precision Precision with which to display VAL. This field is used by
record support to supply a value when get_precision
is called.
EGU Engineering Units ASCII string describing Engineering units. This field is
used by record support to supply a units description string
when get_units is called.
OFF Current Offset
NUSE Number Used Number of elements currently stored.
BPTR Buffer Pointer Holds array referenced by VAL
SPTR Summing Buffer For array averages.
Pointer
WPTR Work Buffer For dbGetLinks.
Pointer
CVB Compress Value
Buffer
INX Current Index of
1,...,N
--------------------------------------------------------------------------------------------
Table of Contents
Next Chapter