bernie_carlton
Lifetime Supporting Member + Moderator
And now that everyone has their DST changeover code all working the US Congress is working to change the start and stop dates to make it even longer. Oh boy, job security.
This type routine could be called at PLC startup and then once at the start of each hour after that (OSR of seconds = 0).
Thanks that makes sense.I think the one shot is required because the scan rate is faster than one second.
When they differ, then it's a new day.
Actually I'm not too woried about DST.I would not rely on a counter to maintain day of the week
Originally posted by gbradley:
I tried it without the one shot, and it still works, but skips the 0. I don't completely understand why.
Also, on the newer OS Versions of SLC (5/04 for sure), bit S:53 is the day of week I believe 0=Sunday.
kamenges said:Ron B. probably has a real explanation for this but my quess is it's the way the SLC firmware handles the counter reset. If the count up input is asserted when the reset is asserted and released the counter probably 'sees' a leading edge on the trailing edge of the reset. Just a guess. But if I'm right you are probably looking at a firmware bug.
Keith
You can test this by toggling the .CU bit while a counter rung is still true . . .
gbradley said:I don't need the one shot when I use the NEQ because that is only true for one scan anyhow.
Thanks again.