S7-300 Generating data block again with SCL to create new initial values

kemppioy

Member
Join Date
Oct 2005
Location
Dallas
Posts
72
Hey,

I have one data block that was created by someone else and it is used only to send values from a MMI to it so they can be used throughout the PLC program. It is not an instance data block. Since it is not an instance data block, can I generate SCL source code from it and then delete the data block, change the initial values in the SCL source code and then generate the data block again from the SCL code so that I have new initial values?

Thanks!

PK
 
Hello,

I want to have it maintain the value so when I download the project again for instance to another machine, it keeps the new value that I put in. Is it normal in S7 that if you want to do what I want to do that you need to make a place where you move the current values from MMI to the DB. I have values for some parameters that should never change and every time I download the plc, those values return to initial values. My MMI writes directly to this DB and sends all values such as setpoints, alarm setpoints, timer setpoints, etc. If i keep the initial values that were used during creation, this is kind of a stupid way to do it I would think since they will always default to initial values. How can I get around this? I am fairly new with S7.

Thanks,
PK
 
If you download to another PLC, the DB values that were saved will be downloaded, not the initial values.

Edit:

I believe the easiest way to change the initial values, would probably be to save as a source and modify those values you want and re-compile.
 
Last edited:
Hello,

OK so explain to me a couple of things because after reading everyone's posts and some more on this same issue I am sure I am just doing something wrong. Is it so that I just need to click on the block and upload it and it will have all the current values so that the next time I download the block or whole plc program, those values that were saved will be used instead of initial values? If so than that is the simple answer. I guess also it means that if the plc should fault or you need to make a memory reset for some reason and download the whole plc program, it should retain your last saved DB actual values. Well the best thing is to get a spare plc and make some tests with it to see. Thanks for your help!

PK
 
kemppioy said:
Hello,

OK so explain to me a couple of things because after reading everyone's posts and some more on this same issue I am sure I am just doing something wrong. Is it so that I just need to click on the block and upload it and it will have all the current values so that the next time I download the block or whole plc program, those values that were saved will be used instead of initial values? If so than that is the simple answer.
PK

Yes, you are correct. If you download a DB, the actual value in the plc will be set to the actual value in the offline copy.
 
If you made the changes to the DB off-line and saved it, it would download the values you entered off-line to the PLC not the initial values.

If you made the changes in a VAT table and never updated the off-line DB, then whatever was originally downloaded into the PLC will be what you have to download to anther PLC. This is not necesarily the initial values either.

If you upload from the PLC, it is OK as long as the length of the DB in the PLC is the same as the off-line file's DB length, otherwise you could lose all descriptors.

Just to be plain, it is not the initial values that are loaded into the PLC, but the current value.
 
If you want to modify the Initial Values to something useful (like current Actual Values, for example) then I find the following the easiest way to achieve this:


Highlight the DB in Simatic Manager
Copy and Paste the DB (Ctrl_C, Ctrl_V) and give the new DB an unused DB-Number.
Open both DBs in the STL Editor
Mark and copy the contents of the Source DB using Ctrl_C
Insert the data into the new DB with Cntrl_V - overwrite or delete the Place-Holder data.

Do not store the new DB yet!

Now modify the Initial Values to the values you want.
Now store the new DB

Delete the original DB
Rename the new DB to the old DB number
Download the new DB to the PLC.

Edit: You might find this Thread interesting, to clear up when the Initial values are actually used.
 
Last edited:
Thanks everyone for your help. I think I have a better picture of the initial values now and how they work now.

Sorry for the late response!

Thanks!
PK
 

Similar Topics

Im using studio 5000, in my software, Im using E300 overload protection relay to control a motor. Studio 5000 Version 32.12 E300 Version 7...
Replies
5
Views
2,856
Hey all, first time poster here. I am wondering if anyone has tried using a Keyence SR-X300 barcode scanner to a Micrologix 1400. Keyence sent...
Replies
0
Views
32
Hi Siemens guys! I am experiencing SF fault on our S7-300 (6ES7 315-2AH14-0AB0) CPU from time to time. I've checked the diagnostic buffer and...
Replies
13
Views
174
Have a system that has been running for over a year and all of a sudden getting a ExcessiveVelocityFault on one of the drives when the MSO command...
Replies
2
Views
144
Hello PLCS.Net Forum, First time posting. Let's assume I am a novice. BASIC PROBLEM: My servo/linear piston is no longer zeroed to the...
Replies
9
Views
218
Back
Top Bottom