Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Time of day? TOD

leifjoh
2016-03-20
2016-04-09
  • leifjoh - 2016-03-20

    Hello,

    I'm a beginner with Codesys and i hope someone can guide me in the right direction.
    I want a program to run once a day at a specific time. E.g. at midnight a sequence will execute on the PLC.
    The sequence that is activated will either be a SFC or a ST Case statement.
    I have tried to google how I can use TOD to trigger this, but I am not really sure how to use it.
    Can someone maybe guide me in the right direction.

    Thank you.

     
  • Anonymous - 2016-03-21

    Originally created by: scott_cunningham

    Check your system libraries for retrieving the current hour. Check for when the hour rolls over. The function call to get the system clock can vary depending on your hardware platform. You may need to check your hardware system libraries.

     
  • eschwellinger

    eschwellinger - 2016-03-21

    Hi,
    I would recommend to check this example using OSCAT libraries & calender and Timer_2 FB:

    l viewtopic.php?f=23&t=6247&p=12387#p12396 l

    BR
    Edwin

     
  • leifjoh - 2016-04-09

    Great. Thanks very much for the help. This is exactly what I am looking for.

     

Log in to post a comment.