Siemens PLC program lost after power down

Maybe the remanence without battery that is mentioned in the text you have found is for how long the capacitor lasts (as RRobbins mentioned - didnt know that little tidbit of info either).

Anyhow, I normally experiment in order to find the truth.
As you have allready found out, Siemens tech info and help files CAN be a tad confusing to figure out.

So, you could experiment with retentivity with
RUN - STOP - RUN
RUN - Power down - RUN
RUN - Power down - Wait one week - RUN
and see how it goes.

I know for sure that Merkers and S5Timers are lost when you power down and remove the battery on the S7-400's.
 
Anyhow, I normally experiment in order to find the truth.

Probably the best idea!

I've got a 314C-2 DP lying around which isn't being used at the moment. I don't suppose you've got a convenient test program handy which I could adapt, have you? :) Or will I have to think up my own one?
 
That brings up another point. ALWAYS change the battery with the processor RUNNING. You would be suprized at how many calls I get from people that thought they were doing right, shutting down the power BEFORE changing the battery. Best case, they loose there memory variables. Worst case, they loose their program and their jobs.
 
Test program: Just set M0.0 while online (with a VAT). See if stays set.

Experiment with setting the number of retentive memory bytes (in HW setup under Controller properties ... Retentive memory tab).

Anyhow, only up to MB255 can be retentive.
 
I'll give it a go and put in a DB and a five minute timer for good measure.

I'll be off back home in half an hour or so, have a good weekend, one and all.

See you next week.

Cheers

Roy
 
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.

This worried me a bit, as I'm likely to have modules standing around for weeks, or even months at a time, not being used, so I sent e-mail off to the Siemens Hotline. According to them, (without going into further detail), there is no time limit on the retention time.

Sehr geehrter Herr Anderson,
bei den CPUs der S7-300 bleiben alle als "remanent" parametrierten Merker dauerhaft erhalten, wenn die Spannung aus- und wieder eingeschaltet wird.
Eine zeitliche Begrenzung gibt es nicht.

Further searches on the Siemens Support Site turned this up:

S7-300 storage concept:

Load memory:
Load all the blocks to their full length including the description of parameter interfaces into the CPU load memory. This is the part that also files the format definitions for the individual data of a data block for example.
The load memory with the S7-300 CPUs consists - depending on the CPU - of an internal memory, an external memory on a slot card or a combination of the two. With CPUs that have an external memory the load memory can be expanded. With CPUs with MMC the load memory is contained on the MMC and the size is the exact size of the MMC.

Note:
The executable parts of all the blocks in the load memory may not exceed the size of the RAM. Otherwise you have to do a general reset of the CPU because the RAM is not big enough.

Main memory:
The main memory only files data relevant to program execution. The main memory is integrated in the CPU and is not expandable. It has a battery powered buffer. If a CPU is used with an MMC, there is no battery for the buffer because the main CPU memory is basically remanent.

Note:
With the CPU 317 the whole user memory is no longer remanent. In this case only 256 Kbytes of 512 Kbytes of user memory are remanent. So here only max. 256 Kbytes of remanent data blocks can be loaded. The rest of the main memory can only be used for code blocks, not remanent DBs and SDBs.

System memory:
The system memory contains the storage areas for:

Process map of input and output signals (PAE, PAA)
Marker (M)
Time functions (T)
Counter functions (Z)
Local data stack (L)

Non-volatile memory:
The non-volatile memory (NV-RAM) is used as buffer space for markers, times, counters and data blocks and again does not have a buffer battery. Which areas are to be buffered is specified when setting the parameters for the CPU. One case where the non-volatile memory is used is "power off" without buffer. For S7-300 CPUs with Micro Memory Card the remanent memory is provided on the MMC and on the CPU and is available all the time. No parameters need be or can set with HW Configuration. The content of the remanent memory is retained even with "power OFF" and restart.

Expanding the memory with a memory card:
When a memory card is slotted in, the operating system orders an overall rest (STOP - LED flashes slowly). The reset is performed by holding the operating mode switch in the "MRES" position. Thereafter the executable program elements are transferred from the memory card to the main memory.

Important:
The memory card must remain slotted as long as the program is being edited. When using CPUs with MMC, the memory cannot be expanded. If more space is required, then you have to use a bigger MMC.

Reaction of the CPU after switching power ON
The CPU knows whether power ON is a buffered or unbuffered input.
If the power ON is buffered, the program section contained in the main memory is used to go on working.
If power ON is unbuffered, the executable parts are transferred from the load memory to the user memory. In this case remanent data is used for the remanent data areas; all other data areas are given the default value. Where CPUs have an MCC, no distinction is made between buffered and unbuffered power ON, because they don't have a battery. All DBs keep their actual values - the remanent markers, counters and timers keep their values. The non-remanent user data is initialized with "0".

Note:
With the CPU 317 this only applies to the remanent DBs; the non-remanent DBs are initialized again with their default values from the load memory.

Special feature of buffering with accumulator:
The accumulator only buffers the date and time. So when an accumulator is used, the CPU behaves as is it were in unbuffered mode. For CPUs with MMC, an accumulator is not needed and cannot be used for time buffering.

Important:
The storage concept of CPU 318-2DP corresponds to that of the 400 CPUs. You will find this under Entry ID 7302549

They don't explicitly say it anywhere, but I assume all the above applies to current S7 300 CPUs - how far it applies to older models, or where the changeover was, is another question.
 
I read the text as that for S7-300 with MMC all Merkers, Timers, Counters (Ms, Ts and Cs that are marked as remanent in the HW config), and all DBs keep their values from the time the CPU was shoutdown.

Maybe that super capacitor is only for keeping the hardware clock running, or .. ?

The following is confusing:
"With the CPU 317 this only applies to the remanent DBs; the non-remanent DBs are initialized again with their default values from the load memory. "
How do you set retentivity for the 317 ?
oh - answering my own question:
You have to open the properties for each DB and select "non-retain" in order for it to be non-remanent.
 
How do you set retentivity for the 317 ?
oh - answering my own question:
You have to open the properties for each DB and select "non-retain" in order for it to be non-remanent.

With the 317 only 256 of the 512kB memory is retentive. If you go over that limit further DBs are automatically non-retentive.
 
TEOWK said:
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

Ok, I have a similar problem: I'm trying to save RAM to ROM after the battery change on a hold system, and I receive the error 8702: Service non supported.
I tryied to copy RAM on Memory Card (a 512Kb is installed and only 40% used), but I receive another message that tells that this operation is allowed for a s7-400 (I have a S7-300).
The problem now id that RAM is full and i do need to move FC and DB recently modified to EPROM.
As You guys can see I do not have many experiences on Siemens, but now I'm in Guatemala (I'm european) for work and this is just one of the problem I have on this old systems.

Any help will be really appreciated.
 
The Copy ROM to RAM function only works with the MMC cards.

I am thinking that you must do three steps.
1. Compress the memory. Highlight the CPU in STEP7 and select Module Information. Under the Memory tab you will find the 'Compress' button.
2. Download the changed blocks and test the program.
3. Use the 'Download User Program to Memory Card' function to write the program to flash card.
 

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
176
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
244
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
625
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,871
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,899
Back
Top Bottom