You can find the raw data @ ....PlcPrg\Visu
You will find an sqlite file with the name <application>.<trendname>.sqlite</trendname></application>
If you want something thats a little easier try the datalog manager.
I don't know of a way to get the trend to display local time. The closest that I know of is to write the local time as the UTC time. You'd need to do that when daylight savings time changes occur.
You can do that with the function blocks RTCLK.GetDateAndTime and RTCLK.SetDateAndTime. From the Oscat Basic library you can use the DST function to get whether it is daylight savings time or not.
It is part of the free version and included with a normal Codesys install.
As far as I'm aware it does not allow you to specify a location to save the logs to though. I normally see it log to PlcPrg/ac_datalog. You can use the CAA_File library to copy and paste that file to something like removable storage. However it is still using write cycles on where ever it is initially storing that data.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
I hope everyone is well and healthy. I'm kind of new to CODESYS and also to this forum.
I wonder how to change the trend to display in local time?
Thank you so much in advance for any advice.
Best regards,
Steven
Last edit: Stevie 2020-07-16
more posts ...
And where I can extract the trend raw data?
Thanks
You can find the raw data @ ....PlcPrg\Visu
You will find an sqlite file with the name <application>.<trendname>.sqlite</trendname></application>
If you want something thats a little easier try the datalog manager.
I don't know of a way to get the trend to display local time. The closest that I know of is to write the local time as the UTC time. You'd need to do that when daylight savings time changes occur.
You can do that with the function blocks RTCLK.GetDateAndTime and RTCLK.SetDateAndTime. From the Oscat Basic library you can use the DST function to get whether it is daylight savings time or not.
https://store.codesys.com/oscat-basic.html
Last edit: Morberis 2020-07-16
The trend should be displaying the local time of the PLC's operating system. So adjusting the operating system timezone should sort it.
There you go. Thanks for the info @i-campbell.
Thanks for the guidance @i-campbell and @Morberis. I wonder where I can find the datalog manager?
It is a subset of the (free version of) Application Composer.
https://help.codesys.com/webapp/f_application_composer_datalog_manager;product=core_Application_Composer;version=3.5.16.0
Last edit: i-campbell 2020-07-17
It is part of the free version and included with a normal Codesys install.
As far as I'm aware it does not allow you to specify a location to save the logs to though. I normally see it log to PlcPrg/ac_datalog. You can use the CAA_File library to copy and paste that file to something like removable storage. However it is still using write cycles on where ever it is initially storing that data.