Display Trend in Local Time

Stevie
2020-07-16
2020-07-17
  • Stevie

    Stevie - 2020-07-16

    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
  • Stevie

    Stevie - 2020-07-16

    And where I can extract the trend raw data?

    Thanks

     
  • Morberis

    Morberis - 2020-07-16

    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

     
    πŸ‘
    1

    Last edit: Morberis 2020-07-16
  • i-campbell

    i-campbell - 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.

     
    πŸ‘
    2
  • Morberis

    Morberis - 2020-07-16

    There you go. Thanks for the info @i-campbell.

     
  • Stevie

    Stevie - 2020-07-17

    Thanks for the guidance @i-campbell and @Morberis. I wonder where I can find the datalog manager?

     
  • i-campbell

    i-campbell - 2020-07-17
     
    πŸ‘
    1

    Last edit: i-campbell 2020-07-17
    • Morberis

      Morberis - 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.

       

Log in to post a comment.