<< Click to Display Table of Contents >>
EpmRecordedValueFunction |
Returns data from one or more variables effectively stored, as informed in the @retrievalMode parameter.
SELECT Name, Timestamp, Quality, <type_function>(Value)
FROM EpmRecordedValueFunction(<[float]@timeZoneOffset>,
<[datetime]@timestamp>, <[string]@retrievalMode>, <[string]@node>)
•<type_function>: Conversion function to define a data type for the resulting values on the Value column. Possible values are described on topic EpmReadPropertyFunction
•<[float]@timeZoneOffset>: Timezone to consider. Possible values range from -12 to 14
•<[datetime]@timestamp>: Time to consider for retrieving data. It must use a String in the format yyyy-MM-dd HH:mm:ss
•<[string]@retrievalMode>: Way to retrieve data. Possible values must be informed between single quotes and are the following:
•Previous: Defines a search for the first data before the time informed in the @timestamp parameter
•Exact: Defines a search for the current data in the exact moment informed in the @timestamp parameter
•Next: Defines a search for the first data after the time informed in the @timestamp parameter
•<[string]@node>: Variable or variables to search for
•Name: Name of a variable or variables retrieved
•Timestamp: Timestamp of data retrieved
•Quality: Quality of data retrieved
•Value: Value of data retrieved
To return a table with values found before the moment this query is executed for variables RandomTags_Random1 and RandomTags_Random10 at 10:23 of 12/07/2020, with a timezone of -3 (minus three) hours, use the next statement.
SELECT Name, Timestamp, Quality, doubleval(Value) FROM EpmRecordedValueFunction(-3,
'2020-12-07 10:23:00', 'Previous', 'RandomTags_Random1,Random_Tags_Random10')
EpmRecordedValueFunction function