TagMin (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Find the minimum value of a point during a given time, according to values stored in the PI Archive.
Syntax
TagMin(tagname, starttime, endtime [, pctgood])
Arguments
tagname
A tagname. This point should represent a continuous variable.
starttime
Beginning of the time range to search. Relative times are relative to endtime, if endtime is not itself a relative time.
endtime
Relative times are relative to starttime, if starttime is not itself a relative time. This time must be after starttime.
pctgood
Optional. Minimum time percentage over the given time range, that the point's archived values must good.
Returns
The point's minimum value during the given time.
Exceptions
If the point has no good values or the pctgood minimum is not reached for the given time range, returns an error value.
Notes
Note: The UnderRange digital state is not taken into account when calculating this value.
Example
TagMin('tag1', 'y', '*')
TagMin('tag1', '-1h', '*',90)
TagMin('tag1', '14-Dec-97', '+1h')