Data clearing to Zero after cold reboot

consys

Member
Join Date
Jul 2006
Location
melbourne
Posts
208
We had a situation arise the other day where certain data (pid setpoints etc) which are stored in an Seimens S7 Databalock were somehow set to zero. At this stage the only thing thjat occured was that one of the on-site electricians "re-booted" the PLC. My questions are..

1. Is it normal for data stored in a datablock to be cleared when either a cold or a warm reboot is preformed on the CPU ?

2. If so how do you guys overcome the issue of losing your setpoints etc. when the CPU is rebooted ?

3. If not what could cause the databalocks to be zero'ed ?
 
The DB's don't lose their data.

The only ways I can think of, off the top of my head, is one, that the data was modified in the PLC but never backed up to the project file. But this would require your tech to have reloaded. The other is for there to be initialisation software on start-up.

I'd be interested to hear of other ways that DB's are cleared.

EDIT: EEPROM, if you've stored in EEPROM and this is not up to date, I'm not sure if the whole EEPROM is re-loaded back on start up??

There is an option for NVRAM if you use EEPROM.
 
Last edited:
I think you must download the program to the memory card instead of the CPU RAM

In step-7 Select the PLC menu -> download user program to memory card.
(don't just use the download icon. download from the menu)
am I right or what?
 
AMAZINGAHMED said:
I think you must download the program to the memory card instead of the CPU RAM

In step-7 Select the PLC menu -> download user program to memory card.
(don't just use the download icon. download from the menu)
am I right or what?


That only works if you have a memory card inserted. If its a RAM card then the same problem exists. If the battery is OK it should maintain the last data as DB's are retentative.

You can manually make the datablock revert to original values (not zero but original values in all cases).
 
If your PLC is S7-400.
Current values of DB can be overwritten by their initial values during PLC startup. If you want current values not to be reverted (initialized) check type of PLC restart after power up
, and set it to warm restart. Cold restart initializes also data blocks.
 
consys said:
1. Is it normal for data stored in a datablock to be cleared when either a cold or a warm reboot is preformed on the CPU ?

2. If so how do you guys overcome the issue of losing your setpoints etc. when the CPU is rebooted ?

3. If not what could cause the databalocks to be zero'ed ?

1. No. Warm restart doesn't change DB actual values. But cold restart resets DB to initial values.
2. I select in HW config Startup after power on -> Warm restart.
3. Backup battery dead or cold restart selected.
 
on some CPUs you can opt-out of retention....

S7_non-retain_DB.PNG
 
Siemens PID may clear setpoints at startup

Hi consys,
You could have a problem where Siemens PID is clearing your
setpoint. I have encountered this problem
I now use Siemens Modular PID but from memory it is the same story for their lesser PID products.
Siemens will recommend you have the following code in OB100 Restart

Call "F31L2T_Loop" // one of my PID loops
COM_RST = TRUE
CYCLE = T#1s

If you do this then at restart your PID controller will be reset
and for example your setpoint will revert to either its initial value or perhaps zero. (I can't remember which)

Don't get confused by the call that is required say every
second and usually in an FC called from say OB32 Cyclic Interupt
one second. The call looks like:
Call "F31L2T_Loop" // one of my PID loops
COM_RST = FALSE
CYCLE = T#1s

If you have the Restart call in OB100 then I suggest you
comment it out and do a complete restart and you should find your setpoint has not been corrupted.
 
What controller type? I am having a similar problem with WinAC RTX. I think I have a fix using SFC82 SFC83 SFC84 to backup DB data to the hard drive. These commands can also be used to backup data to memory cards. I have a tech brief from Siemens for WinAC. I'll post if you think it will help.
 
Thanks for all your input, I believe what occured was the elect. actually did a cold reboot, have suggested that in future they only do cold reboots when absolutely necessary. I would be interested in hearing how others prevent loss of data when a cold reboot occurs.

CharlesM , your solution would only be available in WinAC would it not ? In a "new" project I could structure the tags/data so that at a particular time all tags in a datablock are saved to hard disk (via SCADA system) and then operator would have the ability to "restore last saved settings" from SCADA but I was wondering if anyone had any other idea's on how to ensure that data isn't lost due to reboot's or downloads etc.
 
SCADA Job Setup

Hi consys,
I use S7-400 PLC's with up to 64 PID loops.
What I do is to have a Job Setup function in
my Citect SCADA system where I store the setpoints as well as other data for many jobs.
The operator or rather supervisor can update the Job Settup data
at any time.
Using this facility the Job Information including setpoints can
readily be recalled if a Cold Start should be required.
 
CharlesM , your solution would only be available in WinAC would it not ?

These FC's are not just for WinAC. They are used by regular plc's to back up to memory cards. My guess is they would work with any processor that has a memory card slot.

"restore last saved settings"

My plan (if it works) is to save the data when the operator saves data to the recipe. Then reload the data in OB100 on start up. In WinAC all DB's are saved to a file when the controller is shut down. However when the controller is not shut down properly a cold start is done and default values are loaded.
 
Confused again

What do y'all mean by warm restart and cold boot? I am not familiar with any situation that can zero retentive data.

Please talk slow, I ain't too bright.
 

Similar Topics

Hey guys, I'm still pretty new to PLC's in general. For a program on RSLogix 500 with a micro1400 and pvp400, we are currently logging data for...
Replies
9
Views
2,784
I am currently working in RSLogix 5000. I have a large data structure with the following general structure: UDT[0] Dataset1 Min Max Avg Data[90]...
Replies
14
Views
4,330
so im trying to figure out a way around a little dilemma here with an RFID reader. I have older logic from another setup that works with all of...
Replies
8
Views
2,848
RSlogix5000 - Here is what I would like to accomplish and what I am running into. Currently this is a scanner ASCII gateway to PLC set up. A)...
Replies
9
Views
3,927
I want to clear out a chunk of data. Will this code work and is there an easier way? I have to do this 8 times for different areas (each with a...
Replies
3
Views
1,607
Back
Top Bottom