NumOfChanges
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Return the number of changes in value for an attribute within a specified time range.
Syntax
NumOfChanges(attname, starttime, endtime)
Arguments
-
attname
The name of an attribute
-
starttime
A time expression that specifies the start of a time range, or a time span (such as '-3h') that specifies the start time relative to endtime; entries must be enclosed in single quotation marks
-
endtime
A time expression that specifies the end of a time range, or a time span (such as '+3h') that specifies the end time relative to startime; entries must be enclosed in single quotation marks
Returns
The count of changes in value for attname in the specified time range excluding bad values
Example
-
NumOfChanges('att1', 't', '*')
[Return the number of times the value of 'att1' changed since midnight until now]