Siemens PLC program lost after power down

TEOWK

Member
Join Date
Oct 2004
Location
Batu Pahat
Posts
38
Whenever I turned off the power and on back for S7-300 DP315, I will have to re-download the PLC hadrware and OB1 to get the program run. Which part have I been missing?

Thank you.

Best Regards,
Teo WK
 
Try keeping the program in a flash card. It is capable of storing data even without power or backup.
 
The older 315's used a battery to hold the program and variables values. There was a short time that the 315's came with a MMC card, but the program had to be loaded into the CPU and under the "PLC" tab, you had to "Copy RAM to ROM". The new ones do that automatically and the DB variables (not M area) get written to the MMC while in the power down phase. They are reloaded on power up. There is a "Super Cap" that holds M area variable values for about 6 days.
 
Exactly which model 315 do you have? If it's the current 315-2 DP, they have no battery and on power-down the whole program including the current state of markers, timers, counters and DB's (depending on exactly how you've configured the CPU) are saved to the MMC. On power up the contents of the MMC are read back into CPU and the program starts up again.

The only thing I can think of is that something in the OB100 is getting screwed up (if you're using it), although even then, I'm not quite sure why that should be cleared by reloading OB1.

Are there any fault LEDs on? What about posting the contents of the diagnostic buffer. There are some extremely competent people in this forum, but even they need a bit more information to go on!
 
RRobbins,
at last I know what the Copy RAM to ROM function does - thanks to you. Appears to be only relevant for S7-300's of the new generation, and then only to the earliest versions.

Roy,
what you say is correct, just not that part about the Merkers, S5Timers and Counters. They are not written to the MMC (as RRobbins also said). Sidenote: Its one of the reasons that I use shared DBs for my general programming as stated in that other thread. I dont use Merkers or unless it doesnt matter that the state is lost upon powerdown.

TEOWK,
I am guessing that you have an 315-2DP of the old generation - i.e. it has a slot for a memory card (MC not MMC) and a slot for a backup battery.
Get a battery or get a MC card (*), or both, and the program will be kept when you power down the CPU.
If it is the new generation 315-2DP - with a MMC card, then try the "Copy RAM to ROM" function.

*: You will have to use the function "Download user program to memory card".
 
Last edited:
Roy,
what you say is correct, just not that part about the Merkers, S5Timers and Counters. They are not written to the MMC (as RRobbins also said). Sidenote: Its one of the reasons that I use shared DBs for my general programming as stated in that other thread. I dont use Merkers or unless it doesnt matter that the state is lost upon powerdown.

I had a dig through the current catalogue for that info, though having read it again, for timers and counters, it's a bit ambiguous, but reading it again it could be that Timers and Counters are NOT saved. Regarding the Merker, it explicitly says that they are saved (although presumably, as in the 317 only a limited, definable, number. However, it does not explicitly say where, nor is there any mention of a time limit.

As with you I tend to use shared DBs, in my case, because I find it easier to organise things that way.
 
I am working with a old model of DP315. There is not battery and Memory card in the CPU. I guess that is why the program is lost. If the user program is battery backup, will it come a day where the battery is exhausted and program is lost again?

Thanks
 
If the user program is battery backup, will it come a day where the battery is exhausted and program is lost again?
Definitely YES. After all it is a simple battery, not a rechargeable one. I always recommend my trainees to replace all Siemens batteries once a year. I know for the S5 series Siemens recommended that too, but I'm not sure what period they recommend for the S7's. I figure it is better to replace the battery too soon than too late ;) .

Kind regards,
 
Our maintenance system generates a work order once a year to replace all Siemens S7 batteries. It's the only way to be sure.

Newer S7 300s should be specified with flash RAM.

MHO only.

Doug
 
Hi,

I don't know about the S7 series but when the battery led is on 'low battery' it means that the battery is NOT low but it's flat.
Be careful!

Rudi
 
Roy,
I believe the Merkers are only retained as long as there is power or a backup battery, meaning not on the MC or MMC card.
This is from the STEP7 online help:
X=Retentive, 0=Non retentive.
[attachment]
Notice how a cold restart means no retentivity for Merkers and S5Timers.

s7retentivity.gif
 
Interesting table Jesper, haven't come across that one before. I thought the 300 CPUs only had warm restart (apart from the 318, I assume). Is there some circumstance where they can also have a cold restart (or "wiederanlauf")?

I just had a look on the Siemens Mall and found this about the 315-2 DP (I know it's irrelevant to the original question, but the subject seems to be a bit unclear!)

Zeiten/Zähler und deren Remanenz

S7-Zähler
Anzahl
256

davon remanent ohne Batterie
einstellbar
Ja

Remanenz
einstellbar
Ja

Zählbereich
einstellbar
Ja

untere Grenze
0

obere Grenze
999

IEC-Counter
vorhanden
Ja

Art
SFB

S7-Zeiten
Anzahl
256

Remanenz
einstellbar
Ja

voreingestellt
Keine Remanenz

Zeitbereich
untere Grenze
10 ms

obere Grenze
9.990 s

IEC-Timer
vorhanden
Ja

Art
SFB

Datenbereiche und deren Remanenz
Merker
Anzahl
2.048 Byte

Remanenz einstellbar
Ja; MB 0 bis MB 2047

Anzahl Taktmerker
8; 1 Merkerbyte

Datenbausteine

Anzahl, max.
1.023; von DB 1 bis DB 1023

Grösse, max.
16 KByte; Lokaldatengröße: max. 1024 Byte pro Ablaufebene/ 510 Byte pro Baustein

Lokaldaten
je Prioritätsklasse, max.
128 Byte


So according to that, S7 Timers and counters are retentive, but not IEC timers and counters(I don't think I would have expected them to be different!). Merker are explicity stated as being retentive, but funnily enough no mention of it for the DBs!

I had a look at the 317 while I was there but funnily enough they've changed the catalogue entry since I copied it in October 2003. However, then it said without any qualification:

Wartungsfreie Datensicherung;
Alle Daten werden bei Spannungsunterbrechung automatisch durch die CPU gesichert und stehen nach Einschalten der Spannung unverändert zur Verfügung.

Note - all data, no qualifications.

Funnily enough I notice on my CD-ROM catalogue (10/2003) they say of the 315-2 DP that the SF LED indicates (amongst other things) battery failure, even though there is no battery. Obviously somebody got a bit careless while updating the catalogue.

I wonder how many of the other bits of information we take as gospel is also wrong? :(
 

Similar Topics

Hi everyone, I want to upload the program from my CPU317TF-2 DP to my PC via connecting to CP 343-1 Advanced since it has LAN ports and the CPU...
Replies
1
Views
125
Hi there! This is something so old and having machine with it....... Last time unit was powered around 3yr ago and it did not work since than...
Replies
5
Views
193
Hi, There's a problem I face with upgrading the OS from XP which has the Step 7 Lite installed to windows 10. As I can't use a cracked version of...
Replies
2
Views
540
I am used to working with Allen Bradley PLC's and their Rockwell RsLogix programming software. I have a product I'm reverse engineering that has...
Replies
15
Views
5,728
EDIT: Reworded after post #3. Original wording posted as a reply (#4) for reference I have a Siemens IPC427D running WinLC RTX F, and every...
Replies
7
Views
3,826
Back
Top Bottom