In fact the TS value uses a higher resolution seconds. The trend recording encodes all values into a column of integral type and therefore real/lreal values cannot be directly interpreted from that column. To convert that values the value has to be put into a 8 byte binary value and then reinterpreted as real/lreal (respecting the byteorder of the recording device).
The documented way of reading a trenddatabase would be using the according API from the library VisuTrendStorageAccess. An according example can be found with the CODESYS Store: https://store.codesys.com/trend-api-example.html
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Edwin Schwellinger hat geschrieben:
The documented way of reading a trenddatabase would be using the according API from the library VisuTrendStorageAccess. An according example can be found with the CODESYS Store: https://store.codesys.com/trend-api-example.html
Hi Edwin,
The API example is a simple implementation of the ITrendStorageReaderConsumer interface, but where I can found the documentation for it? There is no information about the VisuTrendStorageAccess library in the Library Manager or Online Help. How to use those instruments more efficiently? At least to understand what methods in which order are called...
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For instance it has a value of 1076546816 for something that should be between 2 and 4 degrees C.
How should I go about converting this?
Here is the SQlite file.
Hi,
In fact the TS value uses a higher resolution seconds. The trend recording encodes all values into a column of integral type and therefore real/lreal values cannot be directly interpreted from that column. To convert that values the value has to be put into a 8 byte binary value and then reinterpreted as real/lreal (respecting the byteorder of the recording device).
The documented way of reading a trenddatabase would be using the according API from the library VisuTrendStorageAccess. An according example can be found with the CODESYS Store: https://store.codesys.com/trend-api-example.html
BR
Edwin
Ah, thanks Edwin.
Hi Edwin,
The API example is a simple implementation of the ITrendStorageReaderConsumer interface, but where I can found the documentation for it? There is no information about the VisuTrendStorageAccess library in the Library Manager or Online Help. How to use those instruments more efficiently? At least to understand what methods in which order are called...
Thanks!