Initial values commisioning problems -> S7300, ET200S

naturephoenix

Member
Join Date
Jan 2015
Location
Vienn
Posts
181
I'm working usually with s7-300 cpu or ET200S. Going on commisioning for hydropower plants.

Let's say program is quite huge. A lot of DBs.Initial values causes me 2 problems:

1. Last day on the commisioning I'm spending entering Initial values equal to actual values. I open DB, make a pic of the actual values and then I make sure every actual value is also initial value. That's quite long and boring process since there is a lot of DBs in controll program(Ok I can solve this by better organization of my program, but still maybe there are other ways).

2. Problem number 2 is more important. After I leave commisioning site, and in few days or in few months there is always a need to change something via HMI. (Maybe new nominal value of some sensor or who knows) . Local people on the Hydropower plant do that, since I'm not on the commisioning site. Sometimes I have local connection with OVPN sometimes not. When local people make this change they do it only on ACTUAL VALUES and INITIAL VALUE remains unchanged. Next time PLC lose supply they will have to enter new values again.

I was thinking to recognize/diagnostic somehow PLC lose supply and store the DB data somewhere(I dont know how to do this, was just thinking about it) and then during PLC starup inside OB100 I would move stored data to the original DBs. This is just what I was thinking, but is there any better solutions, ideas,

examples, tips.
 
Hardware config > CPU-properties > Startup > Warm Restart

Your CPU is configured for Cold restart, this will cause ALL DB's to re-initialize and use initial values in stead of actual values.

On a warm restart, it doesn't re-initialize DB's.
 
I think you have set the DBs in question to "non-retain".

From STEP7 online help:
Non-Retain:
This option allows you to define the retentive behavior of data blocks.
The option is only effective if the CPU supports the retention properties of the DBs. A data block with the "Non-Retain" property in such a CPU (e.g. CPU 317 V2.1) is not saved in the retentive memory and is therefore reset to the load value after every power OFF and power ON and after every STOP-RUN transition of the CPU.

Apart from that, I suggest you make a feature to save all important DBs with the SFC84 WRIT_DBL. With this SFC you can copy the actual values in RAM to ROM (= MMC flashcard).
This is particularly useful for processes that cannot be shut down in order to make a RAM-to-ROM.
SFC84 can be used during normal run of the program, but the values shouldnt be changed when you run SFC84, so you have to make a sequence where you copy the source DB to a buffer DB, then copy the buffer DB to the MMC card with SFC84,
 
Hardware config > CPU-properties > Startup > Warm Restart

Your CPU is configured for Cold restart, this will cause ALL DB's to re-initialize and use initial values in stead of actual values.

On a warm restart, it doesn't re-initialize DB's.
S7-300 CPUs cannot be changed to cold restart. They always do a warm restart.

The DBs gets initialised only if the memory has been corrupted.
 
The one I was just working on, the one I checked, is a 318, which can be changed to cold restart.
But yeah, it seems most 300's can't.
Learn something new everyday.
 
I think you have set the DBs in question to "non-retain".

From STEP7 online help:


Apart from that, I suggest you make a feature to save all important DBs with the SFC84 WRIT_DBL. With this SFC you can copy the actual values in RAM to ROM (= MMC flashcard).
This is particularly useful for processes that cannot be shut down in order to make a RAM-to-ROM.
SFC84 can be used during normal run of the program, but the values shouldnt be changed when you run SFC84, so you have to make a sequence where you copy the source DB to a buffer DB, then copy the buffer DB to the MMC card with SFC84,

Thx all on quick replays, This seems to me like a good solutions, now I am looking this function then I will give a try. I'm also not sure when I need to trigger this function. Would be good if this function can be called everytime some parameter has been changed, or before a plc lose of supply
 
I think you have set the DBs in question to "non-retain".

From STEP7 online help:


Apart from that, I suggest you make a feature to save all important DBs with the SFC84 WRIT_DBL. With this SFC you can copy the actual values in RAM to ROM (= MMC flashcard).
This is particularly useful for processes that cannot be shut down in order to make a RAM-to-ROM.
SFC84 can be used during normal run of the program, but the values shouldnt be changed when you run SFC84, so you have to make a sequence where you copy the source DB to a buffer DB, then copy the buffer DB to the MMC card with SFC84,

Was thinking to make only 1 buffer DB, and after this function finish with 1 DB then I copy next DB to the buffer DB. How much time this function needs to do so? 1 cycle or more?
 
I think you should investigate the non-retain property i mentioned before.

SFC84 takes several cycles to complete.
It should not be done very frequently. The MMC card isnt supposed to be written to with a high frequency.
Let SFC84 be started by a button on the HMI.
 
If a may hook on here.

Is there an easy way to copy actual DB values from the PLC and store them as initial values in your project?
 
The one I was just working on, the one I checked, is a 318, which can be changed to cold restart.
But yeah, it seems most 300's can't.
Learn something new everyday.

From what I understand, the 318 is kind of a weird beast:it is an S7-400 in the box of an S7-300. 400's optionally support cold & hot restarts, 300's only support warm. I think the 318 stopped being available awhile ago, in part because it confused people. Ironically, the current 319 uses a part number that begins 318, for reasons that were never explained to me.
 
If a may hook on here.

Is there an easy way to copy actual DB values from the PLC and store them as initial values in your project?

If you're using Portal, there is a "snapshot" function, that lets you read the current values. You can then assign the snapshot values to the initial values. If you have some tags in a DB marked as set points, then you can choose to only do it for the setpoints. I think that feature was introduced in V12 or V12 SP1. As of V13 SP1, I think you can right click on the blocks folder to do it for all DBs (or just all setpoints) at once, which can be huge timesaver.

If you're using Simatic Manager, then the best way I know to do it is to open up the PLC online, and drag it into your offline folder. I haven't played with this too much, but it's a best practice I've been told. [Edit: Jesper says below that this doesn't work the way I thought it did]
 
Last edited:
Jeebs said:
The one I was just working on, the one I checked, is a 318, which can be changed to cold restart.
A 318 is actually an S7-400 CPU in an S7-300 housing.

boneless said:
Is there an easy way to copy actual DB values from the PLC and store them as initial values in your project?
Not really any easy way. I know only of a way to upload, then convert to source STL code, manipulate the source STL code, generate the DB, then download.
In TIA there should be a more streamlined method to do it. I havent tried it though. Also I do not know if it only works with S7-1500 CPUs, or also with S7-300.
But maybe you just need to do a copy RAM-to-ROM. The copying of the initial values to the actual values should only happen in the rare case that the memory has become corrupted. Usually the problem is that the latest actual values are lost, so that they get reset to the original actual values (which are typically the same as the initial values).
 
If you're using Simatic Manager, then the best way I know to do it is to open up the PLC online, and drag it into your offline folder. I haven't played with this too much, but it's a best practice I've been told.
That will copy the current online actual values, to the actual values in the offline folder. It wont set the initial values.

I have also found that this works most of the times, but not 100%. Sometimes you loose the definitions and you only see STAT0, STAT1 etc. in the offfline DB.
That even if the timestamp hasnt changed.
 

Similar Topics

I'm getting frustrated creating arrays of variables in Machine edition. I need to make 2 variable arrays that are 102x2 in size, with varying...
Replies
3
Views
126
Hi everyone, I have a DL06 I'm trying to get some historical info off of. I don't have access to the actual PLC, but I have the program. I'm...
Replies
0
Views
1,165
Hi there, Interesting problem today... I have been using the same code for sometime and all of a sudden my initial values are not being...
Replies
0
Views
1,036
Hi, What do you guys do when you have situation like this: After leaving commisioning some variables(Tags inside DBs) I want to be fixed even...
Replies
5
Views
2,085
Hi all. I have an array of tags (10) that I store number of seconds in to get an average but I cant work out how to store a default value in them...
Replies
4
Views
1,891
Back
Top Bottom