IFSTALE
- Last UpdatedMar 03, 2025
- 1 minute read
The IFSTALE() function replaces values from the input stream that are older than a specified interval with an alternative value.
Syntax
|
Format |
Stream = IFSTALE( Stream, Interval, AltValue ) |
|
Arguments |
Stream - A stream of values Interval - Values older than this time interval are replaced AltValue - A replacement value |
|
Description |
Replaces every value in the input stream older than Interval with AltValue. |
|
Format |
Stream = IFSTALE( Stream, Interval, AltStream ) |
|
Arguments |
Stream - A stream of values Interval - Values older than this time interval are replaced AltStream - A stream of alternative values |
|
Description |
Replaces every value in the input stream older than Interval with the value from AltStream at the corresponding time. |
Example 1
The following expression replaces every value in the input stream older than 40 minutes with the value -1.
IFSTALE(SysTimeHour, 40 minute, -1)
Example 2
The following expression replaces every value in the input stream H100.TotalFlow older than 40 minutes with the value from the alternative stream Pump1.FlowRate + Pump2.FlowRate at the corresponding time.
IFSTALE(H100.TotalFlow, 1 hour, Pump1.FlowRate + Pump2.FlowRate)