S7 DB Actual Value -> Initial Value

On a working machine DB has different values then the inital ones I want to add more varaibles to the end of the DB. I want to add another multiple instance FB call at the end of the DB without changing the current ones to keep the program form same and I want to keep the last values.
 
Here's one possibility:

Original FBx,DBx

Copy FBx and rename to FBy

Modify FBy to add new instance (must be on the end of the stat area)

Add call to new FBy using new instance DBy, disable this call using an M bit. Use the same M bit inverted to keep the call enabled to the original FBx

Add some one shot enabled copy code that copies DBx to DBy after the call to FBx but before the call to FBy.

Add some one shot logic that you can trigger that will cause the following to happen:

1. Disable the call to FBx
2. Copy DBx to DBy (must be done once)
3. Enable the call to FBy

Download all new/modified blocks

Initiate the trigger to disable the call to Fbx, copy the instance data from Dbx to Dby and enable the call to Fby

Remove blocks/tidy up afterwards.
 
Interesting never thought of something like that before because I thought SIMATIC has a option to copy Actual DB values to initial values but I thought I dont know that but it seems that there is no pratic solution for copying RAM values to ROM for DBs.

The last time I had to do that I had to copy values one by one after copying all of them to excel but if a case like this occurs next time I can use this method.

Thank you LD.
 

Similar Topics

I am current connecting a Schneider pm5100 Digital Power Meter to a PLC using modbus connection, my prime objective is to get the actual Value of...
Replies
6
Views
1,589
hi,, how r u can anyone explain this network to me the network enter analog value and then convert this value to the actual value but i want to...
Replies
10
Views
2,629
Hi There, I have a 1746-NI16I analogue card. (In the field device I have 5mA and in the channel scaling ladder it measures zero value. Just...
Replies
5
Views
2,933
Hi all, I've got a project running on a S7-318-2 with several DB's, where in some shared DB's I've added some new data types and changed the...
Replies
1
Views
3,753
Why is the configuration IP different from the actual IP address still able to run normally?
Replies
6
Views
835
Back
Top Bottom