Posted 16 Aug 2016 (edited) Hi , I am trying to transfer and reset a few counters at 23:59:59 everyday.... it works in simulation but on the unit itself... DOESN'T... Here I changed the time but same thing ! Thanks Edited 16 Aug 2016 by Scopic88 Share this post Link to post Share on other sites
Posted 16 Aug 2016 I haven't tried this myself but what if you change your comparison to a range instead? Share this post Link to post Share on other sites
Posted 16 Aug 2016 Thanks..... I never even think about it !!! not Enough Coffee I guess ! Worked... Thanks Share this post Link to post Share on other sites
Posted 17 Aug 2016 Thanks for posting back. I'm not sure what the resolution is for the TOD. If it were 1 microsecond than your 'Equals To' would only be true for 1 microsecond. This would be much faster than the scan of your program therefore would miss quite frequently. Share this post Link to post Share on other sites
Posted 17 Aug 2016 That's exactly what I figured out ... I haven't done PLC programming for some time so I was a bit rusted ! instead of my '' = '' I inserted a GT 23:59:58 and a LT 23:59:59 this gives 1 second for the PLC to process the commands ! and it works fine... Thanks again ! Share this post Link to post Share on other sites
Posted 24 Aug 2016 So I guess you caught that the PLC clock variable you entered was wrong? CURRENT_TIME must be something you created, as the PLC clock is stored to _CurrentTime I have done this using theDtToDateStruct and then do a compare with the hour equal to zero and a rising edge trigger. Share this post Link to post Share on other sites