Control/CompactLogix internal clock reset instruction

Sounds like you're getting the picture, but just to clarify as you requested...

All data in an AB PLC is retentive. If you power down the PLC, whatever values were in each tag at the moment you power it down is still there when you power it back up. So, let's say you have some logic that keeps track of the current date and time. If your PLC shuts down at 1/1/2019, 12:34am, then when it starts back up - no matter how much time passes in between - the tags that stored those date and time values will still read 1/1/2019 12:34am. All you need to do is write some code so that on first scan, you copy those tags to a holding register, called, say "Shutdown_DateTime". The important thing is that this copy happens before the code that updates the PLC's date and time.

So you'd have three rungs in the PLC, each preceded by an S:FS instruction, and in the following order:

1. Copy the current date/time to a "Shutdown_DateTime" tag
2. Update "Current_DateTime" from the controller's internal clock
3. Calculate the time difference between Shutdown_DateTime and Current_DateTime

You could put them all on one rung with just one S:FS bit, with the three steps on three different branches. As long as they're in that order, it'll work. And then the whole task is in the same place and you can put a rung comment explaining what's going on.
 

Similar Topics

Hey guys, On my system, i got prop valve controling cylinder on the left and right to adjust the center of a lumber before it get in a woodmill...
Replies
8
Views
933
I currently have a setup in Siemens S7 using I-Device connections over PROFINET and I am trying to investigate an equivalent setup using Rockwell...
Replies
7
Views
1,128
Good Evening, I'm loading a recipe into a Rockwell ControlLogix or CompactLogix CPU via Excel, this is all working fine. Is there anyway I can...
Replies
7
Views
2,048
Hello everyone, It's been a while I haven't dive into PLC programming (more than 5 years) and I wasn't doing it alot as programmer. I am now...
Replies
1
Views
1,842
Dear All. I need comm between Compactlogix/Controllogix with PNOZ m1p ETH. What we need the communication option? or can be connect direct? many...
Replies
0
Views
1,181
Back
Top Bottom