Data clearing to Zero after cold reboot

John Gaunt, thanks that what figured I would probably need to do problem I have is this project has grown very large (and dis-jointed) over the years, Citect tag count is approx. 18,000 and any fuction would have to reference every tag by name

CharlesM, thanks also, I will investigate using those functions to "save" parameters to memory card at some pre-defined time interval. I think this would be "less messy" than writing some cicode to save them all

rsdoran, there are probably people here that can provide a better explantion but my half-@#%^ed explanantion it may lead you astray but form my understanding if I move the Program/Run switch from off to program to run once that's a warm reboot if I do it twice it's a cold reboot, cold reboot is also done on power-up. This is something that not all plc's can do.
 
Hope this helps

Here is the doc from Siemens. The project file was to large to post here (1 meg) but if you want it, I bet we can find a way to get it to you.
 
rsdoran said:
Please talk slow, I ain't too bright.

I don't believe that at all.


With Siemens you can stipulate how the PLC starts up. The different methods do different things to the data held in the PLC and initiates one of three start up blocks. These start up blocks run on a once only basis before the main cyclic blocik starts, here you can set up the system (reset sequences etc) before the main program runs.

extract from siemens help [EDIT: Just noticed there are a few blanks, as I searched warm and cold, those words were highlighted and disappeared when cut and paste]

STARTUP Mode



Before the CPU can start processing the user program, a startup program must first be executed. By programming startup OBs in your startup program, you can specify certain settings for your cyclic program.


There are three types of startup: warm restart, cold restart, and hot restart. A hot restart is only possible on S7-400 CPUs. This must be set explicitly in the parameter set for the CPU using STEP 7.


The features of the STARTUP mode are as follows:

  • The program in the startup OB is processed (OB100 for warm restart, OB101 for hot restart, OB102 for cold restart).
  • No time-driven or interrupt driven program execution is possible.
  • Timers are updated.
  • Runtime meters start running.
  • Disabled digital outputs on signal modules (can be set by direct access).
Warm Restart


A warm restart is always permitted unless the system has requested a memory reset. A warm restart is the only possible option after:

  • Memory reset
  • Downloading the user program with the CPU in STOP mode
  • I stack/B stack overflow
  • Warm restart aborted (due to a power outage or changing the mode selector setting)
  • When the interruption before a hot restart exceeds the selected time limit.
Manual Warm Restart


A manual warm restart can be triggered by the following:

  • The mode selector
(the CRST/WRST switch - if available - must be set to CRST)

  • The corresponding command on the programming device or by communication functions
(if the mode selector is set to RUN or RUN­P)


Automatic Warm Restart


An automatic warm restart can be triggered following power up in the following situations:

  • The CPU was not in STOP mode when the power outage occurred.
  • The mode selector is set to RUN or RUN­P.
  • No automatic hot restart is programmed following power up.
  • The CPU was interrupted by a power outage during a warm restart (regardless of the programmed type of restart).
The CRST/WRST switch has no effect on an automatic warm restart.


Automatic Warm Restart Without a Backup Battery


If you operate your CPU without a backup battery (if maintenance­free operation is necessary), the CPU memory is automatically reset and a warm restart executed after the power is turned on or when power returns following a power outage. The user program must be located on a flash EPROM (memory card).


Hot Restart


Following a power outage in RUN mode followed by a return of power, S7-400 CPUs run through an initialization routine and then automatically execute a hot restart. During a hot restart, the user program is resumed at the point at which its execution was interrupted. The section of user program that had not been executed before the power outage is known as the remaining cycle. The remaining cycle can also contain time-driven and interrupt driven program sections.


A hot restart is only permitted when the user program was not modified in STOP mode (for example, by reloading a modified block) and when there are no other reasons for a warm restart. Both a manual and automatic hot restart are possible.


Manual Hot Restart


A manual hot restart is only possible with the appropriate parameter settings in the parameter set of the CPU and when the STOP resulted from the following causes:

  • The mode selector was changed from RUN to STOP.
  • User-programmed STOPs, STOPs after calling OBs that are not loaded.
  • The STOP mode was the result of a command from the programming device or a communication function.
A manual hot restart can be triggered by the following:

  • The mode selector
The CRST/WRST must be set to WRST.

  • The corresponding command on the programming device or by communication functions (mode selector set to RUN or RUN­P).
  • When a manual hot restart is set in the parameter set of the CPU.
Automatic Hot Restart


An automatic hot restart can be triggered following power up in the following situations:

  • The CPU was not in STOP or HOLD mode when the power outage occurred.
  • The mode selector is set to RUN or RUN­P.
  • Automatic hot restart following power up is set in the parameter set of the CPU.
The CRST/WRST switch has no effect on an automatic hot restart.
 
Last edited:
CharlesM said:
Here is the doc from Siemens. The project file was to large to post here (1 meg) but if you want it, I bet we can find a way to get it to you.

We have a tray sorter here, where there are 70 drop off destinations, so they created a single master DB in the program which contains all the status and control words/bits for a single destination (quite large) and then in the start-up sequence create 70 copies by generating the DB's with the blocks you describe.

The problem with these then, is the fact that there is no documented blocks to use to read and monitor the words/bits.
 
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 ?

Hey there I had the same problem and questions a while back. Here you go:

1. On a COLD REBOOT, yes, it is normal for data stored in a datablock to be cleared (or if the DB is set not to be retentive in new models), but never in a warm reboot. What happens is if power is lost sometimes those DBs can get corrupt and are then replaced by default values (you actually have a cold reboot then)

2. You can overcome this issue by "backing up" setpoints' DBs by calling SFC84 or by pointing to PLC>Copy RAM to ROM on Simatic Manager (you have to have desired DBs selected). This way even if you have a cold reboot being performed your backed up DBs will be reset to the most current values (the values you had when performed the copy. You could call SFC84 once a week, for example.

Hope this helps
 

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,805
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,365
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,882
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,979
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,624
Back
Top Bottom