Siemens MMC's & those damn actual values

And the Merkers ? They are probably also retained in capacitor backed RAM and not on the MMC card.

No, I had some Merker in my test as well, both Bits and Words - they were treated exactly like the DBs.

Will try duplicating your tests on the 314, but it probably won't be today, it's about time I did some work! :(
 
Mind you, it explains what Mylo has experienced.

It goes like this:
The program is created.
In the beginning the actual values = initial values.
1st time the CPU is shut down the actual values on the MMC gets stored, and they are the same as the initial values at this time.
Later the DB values gets changed away from the initial values.
As long as Mylo shuts down the CPU in the normal way, everything is OK - the actual values in RAM stays at the new meaningful values.
But as soon as a memory reset is provoked (by removing the MMC at runtime for example), then the CPU reads the program from the MMC at next powerup, including the old "bad" actual DB values.
 
Morning Jesper!

Well I've repeated your test in post 30 and can pretty well confirm the same results - with one major oddity!

I created a new DB for the test and modified my programm a bit to use more data in more places, Merker as well as DBs.

I then loaded the whole program, actually to be precise the whole Station and started it.

Once again I set a bit in OB100 so as to cause the whole program to be bypassed until I clear the bit in the VAT. So I had a look at the initial values before letting the program run through the active part and noticed that both the old and the new DB, although both created with non-zero values were initialised to zero - as was the case yesterday. At a later stage, after trying a few other things, I decided to create another new DB, in order to try reading the stored value of the original DBs from the MMC using SFC83.

Once again I initialised it with a non-zero value, then stored and downloaded it from within the STL editor and guess what, when I go back to my VAT, there's my Initial Value still there!

So I went back to Simatic Manager and highlighted the "Blocks" folder and downloaded everything another look at the VAT and sure enough, the original two DBs still zero, but the third one, initially downloaded from the editor, still has its Initial value. Try again highlighting the "Station" folder download everything again, including all the Station parameters - no change.

Net result, If I create a DB and store it after editing, then download from Simatic Manager, the Initial Value is changed to Zero. If I create a DB and download it directly from the editor, the Initial Value is preserved - for ever. Most peculiar!

One of the other things I tried was to remove one memory card while the CPU was running and then replaced it with another and copy the same program down to the new card. But it didn't matter whether I power down without stopping or go into STOP first before swapping the cards back, the CPU always notices the change of card and does a memory reset - not too surprising really, I suppose.

I think we've about covered everything here now, with one exception - I've got three weeks of holiday over Christmas, so I'll run the program before I leave and power down. When I come back three weeks later, maybe we can find out definitively whether or not the Merker are saved on the MMC or not!
 
Last edited:
You can try my method of investigating the MMC.

Here is my sequence:

A. Create a new DB. It must not be present on CPU or MMC !
Set initialval=1, set actualval=2.
save.
Download to PLC.

B. Create a VAT to look at the DB.
Set actualval=3 (online via the VAT).

C. Cycle power.
VAT reports actualval=3.

D. Set actualval=4 (online via the VAT).

E. Cycle power.
VAT reports actualval=4.

F. Set actualval=5 (online via the VAT).

G. Remove MMC with CPU in RUN.
The CPU will fault.
Power down.
Re-insert MMC.
Power up.
flip lever RUN > STOP > RUN

H. VAT reports actualval=3.


From the above can be concluded that the actual value on the MMC was stored in step C (first power cycle after the DB was created on the CPU). This because actualval is finally 3 and not another value.

I am also thinking that some kind of capacitor backup must be present in any case.
How else can the realtime clock continue to run when there is no battery to power it ?
 
I'll try duplicating that, Jesper.

In part A, how are you downloading this new DB - directly from the editor, or from Simatic Manger. If you haven't tried downloading from the manger, instead of directly out of the editor, could you try it to see if your initial values also get reset to zero like mine did.

I am also thinking that some kind of capacitor backup must be present in any case.
How else can the realtime clock continue to run when there is no battery to power it ?

Good point, and I've noticed that my clock keeps gettin reset back to 1994, so the capacitor must only be able to hold up for very few days - my three week test should be pretty definitive, in that case.
 
I download from the manager.
I will try to download from the editor to see if it makes any difference.

I was thinking about prying the CPU open and short any capacitors I can find in there. But on a 313C there are 10 taps holding the plastic casing together. Its near impossible to open this thing.

Are you going on holiday now ?
If so, have a merry christmas and a happy new year, Roy :)
 
Don't go on holiday until 20th, but that'S not too far away now (y)

I'll go and try your experiment now, But I'll download the DB direct from the editor, so as to preserve the initial and (initial) actual values.
 
Boy, this gets better!

Except for the fact that I downloaded directly from the editor, I duplicated your steps exactly and landed up in the with --- 2 in the VAT!

It must not be present on CPU or MMC

I must admit I hadn't thought about a DB already stored on the MMC, I'll repeat the process with a DB I know I've never used (haven't got the prommer available, at the moment) and try downloading from Simatic Manager this time.

See you soon!
 
I believe that the MMC stores blocks at powerdown when it sees that they are not present on the MMC. The actual values in DBs will be stored at this time.
If the blocks are present allready (*) then they do not get stored.

*: Because you used Download to memory card, or because you didnt pick an unused DB number.

Anyhow, it seems to be proved that the MMC does NOT get updated at every power down !
This is something new that I didnt know before.

It also explains the REAL idea with the Copy RAM to ROM function. I mean, why have such a function if the ROM (MMC) is updated everytime the CPU is shutdown ?
Great, this particular function allways mystified me.

It all makes sense now :)
 
It all makes sense now

Maybe not, I've discovered that the Firmware Version number has a BIG influence.

The 314 is on V1 Firmware, the 317 has V2. So I'm off to the test hall to see what happens there.

I'll be back later, but it's going to take a bit longer than I thought!

Hang in there though, I think we're in the process of creating the definitive thread for S7-CPU MMC/DB behaviour! :site:
 
RMA said:


Hang in there though, I think we're in the process of creating the definitive thread for S7-CPU MMC/DB behaviour! :site:


You mean you haven't already???

I have been keeping track of this thread, but as I haven't had the pleasure of an MMC card yet, I haven't been able to join in.

The main PLC's I use are 315-2DP's all with battery back up, we have a few of these on stock, so we haven't brought any of the 'newer' ones in yet... that is until yesterday when a brand new slimmer 315-2DP arrived, no battery back up, with an MMC card.

Great now I can join in your game! :D

I have the 'thing' installed on my office wall, sitting above it's big brother (412-2DP) ready and waiting to be 'messed' about with.

Paul

3152dp4.jpg
 
Got to say I'm sorry for starting this ,,, as in asking the question !

but I've just been watching you guys work this to the bone, I'm glad I'm not the only one who has applied logic to this and found that it dosen't hold water, & I appreciate the effort, if out of morbid curiosty you have been doing. I'm sorry I can't join in the fun as I haven't got the PLC in question on my desk but the old 312 IFm (Battery backed). I will probably visit the site next week and then play around with whats been discussed,,

Good to see Siemens haven't let us down,,,,

Nice one

Mylo
:confused:
 
Hi guys, I haven't forgotten you.

I made a mistake going over to the assembly/test hall to play with the 317 - they collared me to do some work - most inconsiderate, don't they realise I'm busy securing the future of mankind!

Anyway, I still managed to test what I wanted to, but since I want to include a couple of screen dumps, it'll have to wait till the morning to be posted.

See you tomorrow.
 

Similar Topics

Hi Does Siemens supply images for mmc's that have been accidently corrupted or formated?
Replies
1
Views
74
CPU 314-2 PN/DP, was online via laptop over ethernet, then CPU placed in STOP, MMC was removed and placed into SD card slot of an ordinary laptop...
Replies
4
Views
2,359
Hi all, I got a bunch of Siemens MMC cards that seem to be corrupted or something. I was looking for an MMC reader/prommer to format these cards...
Replies
11
Views
4,551
Is it possible to use a non Siemens memory card with a Siemens PLC? And if so how? Would thought you should be able to configure any Memory Card...
Replies
3
Views
2,485
Big hello to everyone, long time no say from me on talks, but i come only with exotics stuff :) There is maybe a new project on the way but it is...
Replies
0
Views
3,338
Back
Top Bottom