Step7 DB download

TomTom

Member
Join Date
Oct 2009
Location
The Hague
Posts
18
Hi all,

I have an annoying problem. Once I've downloaded a DB to the PLC (Simatic ET200S IM151-8 PN/DP) I can't change the initial values. Except when I Clear/Reset the PLC in the Hardware Configurator, delete all the blocks in the online view and download configuration and blocks again (this time with the right inital values). Only in this way I could get my new values downloaded to the PLC.
Is there a 'short cut' that I do not know of?

Thanks in advance for any replies.

Cheers, Tom
 
You have no influence over the initial values after they are downloaded to the CPU. On the other hand, the initial values are only used by the CPU at the very 1st startup after a download, or if a memory error is detected at startup.

Maybe you are really thinking about the actual values.

What is it that you want to achieve ?
 
I use a few DB's as tables to read values from and I thought I had set the initial values in decimals, but of coarse step7 sees these as hexadecimals. So I had to reset the initial values, this time in the proper hexadecimal format. That's where the problem rose.

I have 5 tables with each 90 words (180 bytes). This means 900 bytes of space. Is there a better way to deal with tables of fixed data?
 
To me out sounds as if you have messed up the type declaration, not the initial values. You have set the types to WORD where it should have been INT. If you change the types from WORD to INT, the timestamp of the offline DB is renewed and you can no longer see the values online. That was the problem, nothing to do with the inital values.
 
Well, I didn't change the WORD-type, only changed the initial value from, for example W#16#2048 (2048 was thought to be decimal, but of course is hexadecimal :oops:) to W#16#800. Then downloaded to the PLC, but these changes were not taken over by the PLC. It kept reading W#16#2048...?
Any more ideas? Did I miss a box to tick or untick?

Thanks so far for your replies.
 
Last edited:
Use Edit>Initialise to copy the initial values to the actual values. Save and download.

(You must be in Data View)
 
Aha, I think I see the light!:D
Correct me if I'm wrong:
The edited initial values ARE downloaded to the PLC, but not taken over by the program, UNLESS I do an Edit>Initialise. Then the new values are used by the program. Or after an error and warm start. Then the PLC also looks at the initial values as a starting point.

So the program only uses the initial values at start up of the PLC. After that it keeps track of the values, which are the actual values.

Is this correct?

Thanks for all replies. I hope I now have a better insight in the workings of PLC's.
 
To be absolutely correct:
If you create a shared DB from scratch, you can set both initial and actual values manually.
If you create an instance-DB, then the actual values are generated from the set initial values of the associated FBs declaration.
It is the actual values that are active, even after the 1st startup after a download.
The initial values are also downloaded to the CPU, but will only ever be used if the program memory is corrupted.
 
To be absolutely correct:
If you create a shared DB from scratch, you can set both initial and actual values manually.
If you create an instance-DB, then the actual values are generated from the set initial values of the associated FBs declaration.
It is the actual values that are active, even after the 1st startup after a download.
The initial values are also downloaded to the CPU, but will only ever be used if the program memory is corrupted.

Jesper, Can you link to where you read this as it does not agree with my Help

pot.jpg
 
I havent read it anywhere, but I have experienced that a PLC was reset to the initial values. It happened at a customer where a PSU was having problems. So I conclude that that is how it works.

A sidenote:
There are several things that Siemens says about memory and the MMC card that I cannot confirm. For example, Siemens claim that the actual values are written to the MMC card upon powerdown ("maintenance free" as they call it because of the lack of a backup battery).
But try to
1. Set some actual values - by a HMI for example, or a VAT.
2. Power down the CPU.
3. Remove MMC card.
4. Power up the CPU.
5. Allow the CPU to reach the final state with BF.
6. Power down the CPU.
7. Insert MMC card.
8. Power up the CPU.
9. Allow the CPU to startup, and manually switch it to RUN.
10. Check the DB values, they have now been set to the initial values, or the actual values that were active when a RAM-to-ROM was performed.
Viola, proof that the actual values are not written to the MMC card.

Btw, because of the above finding, I always do a RAM-to-ROM before I leave a plant.
 
Last edited:
My take on this is that the retained DB data is stored in a separate flash memory chip during power down. These chips store the data for around 100 years and you can write 256kbyte in under 15ms up to 100000 times so this is practical. As Jesper notes, the retained DB data is not written to the MMC.

If you power up the CPU with the MMC removed a memory reset is performed and you lose the retained DB data.
 

Similar Topics

While trying to download an FC to a Siemens plc CPU315-2DP , we are getting the following error . What does it mean ? How to solve this problem ...
Replies
8
Views
3,034
If I change the hardware configuration of a Simatic S7-400 PLC and perform a download in order to add new slaves to the profbus, does this...
Replies
1
Views
4,378
Hi all, just have a theory question here. Using step7 5.5. I upload the hardware configuration from a dp or pn network that i do not have the...
Replies
3
Views
3,131
Hello, I have Step 7 v 5.5 and WinCC flexible 2008 on my laptop, and we have a customer (MP377) on the internet with a fixed IP address. I...
Replies
14
Views
9,228
Hi there, I would be pleased if anybody recommend some tool that let me download an STEP7 project to a S7-300 PLC without using STEP7. Thanks,
Replies
5
Views
2,390
Back
Top Bottom