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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
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
Great. Thanks very much for the help. This is exactly what I am looking for.