You are here: Core Reference > Coding > Logic > Historic Functions and Arguments

Historic Functions and Arguments

You need to use historic functions to specify which historic values are used by your program. Each historic function requires values for its arguments (as shown below). You have to include each argument when you use a historic function in an ST program or Function Block Diagram.

The arguments include StartTime and EndTime which define a time span, RecordIdx which is the number used to identify one historic value, and Forward which is used to instruct the program to move through a series of historic values. Forward arguments can have values of True or False (True means proceed forward to the next historic record; False means proceed backwards to the previous historic record).

You will need to use the following information when using a historic function:

Function Arguments

Returns

RawCount

StartTime, EndTime

The number of values between the StartTime and EndTime

RawValue

StartTime, EndTime, RecordIdx, Forward

Value between StartTime and EndTime at RecordIdx

RawTimeStamp

StartTime, EndTime, RecordIdx, Forward

Time value between StartTime and EndTime at RecordIdx

RawQuality

StartTime, EndTime, RecordIdx, Forward

Quality value between StartTime and EndTime at RecordIdx

RawQualityDesc

StartTime, EndTime, RecordIdx, Forward

Quality description between StartTime and EndTime at RecordIdx

RawCountRange

StartTime, Interval

The number of values between StartTime and StartTime+Interval at RecordIdx

RawValueRange

StartTime, Interval, RecordIdx, Forward

Value between StartTime and StartTime+Interval at RecordIdx

RawTimestampRange

StartTime, Interval, RecordIdx, Forward

Value between StartTime and StartTime+Interval at RecordIdx

RawQualityRange

StartTime, Interval, RecordIdx, Forward

Value between StartTime and StartTime+Interval at RecordIdx

RawQualityDescRange

StartTime, Interval, RecordIdx, Forward

Value between StartTime and StartTime+Interval at RecordIdx

ProcessedValue

StartTime, EndTime, AggregateId

Historic value between StartTime and EndTime using AggreagteId.

For a list of the historic algorithms that are available, see OPC Historic Aggregates (Algorithms) in the ClearSCADA Guide to Expressions.

Further Information

Raw Historic Values in ST Programs.

Add Raw Historic Values to Function Block Diagrams.


ClearSCADA 2015 R2