retaining count value after power failure

khulez

Member
Join Date
Mar 2013
Location
Durban
Posts
6
Hi All

How do you retrieve a count value after a power failure or how do you prevent the value from clearing when the power fails.

Please Help
 
What PLC Brand? What Model? What Function are you using?

Always try and give as much information as possible so that people can help you.
 
Thanx usireland
I am using Siemens S7 313c and I am using statement list, I am using an up/down counter and the count value is transferred to a DB(is specified when you call the counter).
 
If you are using:

L Cxxx
T DBx.DBWxx

To put the counter value in the DB, then you can put in OB100:

L DBx.DBWxx
ITB
S Cxxx


If you use the following however:

LC Cxxx
T DBx.DBWxxx

You need to use the following in OB100:

L DBx.DBWxxx
S Cxxx


Using a simple L (load) you load the value as an INT.
Using the S (set preset value), the value needs to be BCD.
Hence the ITB (Int to BCD) in the first option.

Using LC (load as BCD), the value is already stored as BCD and you won't need the ITB.

Since you want to set the value after a power outage or a stop, the best way is to use OB100.
You can do it with a manually created first scan bit, but why re-invent the wheel?

NOTE: This is assuming you write the counter value to the DB continuously, ie every single scan.
 

Similar Topics

Hello PLC friends. I've been going through a saga of diagnosing and fixing an old PLC setup that I inherited. I am learning as I go. Initial...
Replies
14
Views
329
Hi everyone. I have an issue with an Allen Bradley PLC model 1769-L30ER. This PLC had a previous program with a different IP address but when I...
Replies
4
Views
509
I have an L33ERM Compact PLC that every time I go offline from it, I lose all my string values.. so if I need to make a change (IE adding an array...
Replies
10
Views
1,420
Hello, I am tasked to update a CompactLogix PLC program on a live system. The updates I need to make involve changing a user-defined data...
Replies
9
Views
2,081
HI everyone. I have a Micrologix 1400 paired with a PV Plus 7. What is the "best" or "correct" way to change setpoints and have them retained...
Replies
4
Views
2,434
Back
Top Bottom