selli69 Posted January 2, 2018 Report Share Posted January 2, 2018 Hello everyone! I want to schedule a task, which starts at a specific time today and ends (maybe) tomorrow at a calculated time. How do I achieve this? The schedule FB seems to work only when start and end are on the same day. Do I have to calc wether the off time is on another day and use a second schedule FB in this case? Or can I use a schedule FB with a end time earlier then start time? Pls dont mention to simply try it, because I cant. Unfortunately, I have no PLC for trying right now. Thanks forward! Link to comment Share on other sites More sharing options...
NahumS Posted January 23, 2018 Report Share Posted January 23, 2018 Hello Selli69, Thank you for contacting Unitronics forum! Unfortunately you'll have to configure both days with two seperate times. For example if you want to start in Sunday 22:00 (PM) till Monday morning 3:00 (AM) you'll have to configure two times triggers: 1. Sunday, from 22:00 to 23:59. 2. Monday, from 00:00(AM) to 3:00. There is another way if you want to use the RTC and compare function. for example: Create a register for each timer section (HH,MM) 1.Compare the HH to current RTC hours. 2. Compare the MM to current RTC minutes. And if both are valid it will execute the system. If you have any more question please send us an email to support@unitronics.com Link to comment Share on other sites More sharing options...
Skout Posted May 23, 2018 Report Share Posted May 23, 2018 On 1/23/2018 at 11:39 AM, NahumS said: There is another way if you want to use the RTC and compare function. for example: Create a register for each timer section (HH,MM) 1.Compare the HH to current RTC hours. 2. Compare the MM to current RTC minutes. And if both are valid it will execute the system. Hi I would like to know how can we compare the date , i want to compare the current date with the right next one so once it doesn't equal, the program isn't executed Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted May 23, 2018 MVP 2023 Report Share Posted May 23, 2018 All of your time and date values can be found in SI 30 - SI 38. They're clearly defined and you can use them just like any 16-bit integer register for comparison purposes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now