AlfredoQuintero
Lifetime Supporting Member
Hello Codesys wizards, once again a cry for help from this mind with limited understanding of Codesys.
I have almost completed an application that gathers data from a number of sources. I chose Codesys to handle data storing event handling and a middleware for handling the communication with the PLCs which are the data sources. This middleware and Codesys exchange data through OPC interface and this part is working fine.
My problem is the time stamp for the data I am storing is calculated with the function SysTimeRtcConvertHighResToLocal. I got this working a few days ago and I have just realized that this function is getting the day of the month incorrectly until 08:59:59, and correctly from 09:00:00.
It sounds as though I am doing something wrong, so I have taken the screenshot below showing the program, the actual system time and an extract of yesterday's data, in the hope that a kind and more learned PLCTALK.NET colleague can illuminate my way out of this dark tunnel.
I have almost completed an application that gathers data from a number of sources. I chose Codesys to handle data storing event handling and a middleware for handling the communication with the PLCs which are the data sources. This middleware and Codesys exchange data through OPC interface and this part is working fine.
My problem is the time stamp for the data I am storing is calculated with the function SysTimeRtcConvertHighResToLocal. I got this working a few days ago and I have just realized that this function is getting the day of the month incorrectly until 08:59:59, and correctly from 09:00:00.
It sounds as though I am doing something wrong, so I have taken the screenshot below showing the program, the actual system time and an extract of yesterday's data, in the hope that a kind and more learned PLCTALK.NET colleague can illuminate my way out of this dark tunnel.