DMC, Inc.
Siemens Solutions Partner.jpg

Siemens Simatic S7-300 – Retaining Values When Downloading a Datablock

A simple yet common problem when programming a Siemens Simatic S7-300 PLC is losing the data already stored in the PLC after downloading an updated data block.

If you are simply adding items to the end of a flat data block (not adding items to a user-defined type (udt) within the data block, for example) then to retain the values of the data block follow these quick steps.

  1. Go online with all of the blocks in Simatic Manager.
  2. Copy the online version of the data block whose values you would like to retain into your offline project.
  3. Add the items to end of the data block
  4. Download – your values will be retained.

If you need to make a more complicated change to the data block such as adding items to a udt used with the data block, a few more steps are needed. Even if you have first saved a copy of your online values prior to making the change, the values will be lost after you save the change. Therefore, follow these extra steps.

  1. Follow steps 1 and 2 above.
  2. Open the datablock and Generate Source for the data block. File -> Generate Source. This will save a version of your data block and the values in a file in the Sources folder.
  3. Make all changes that you need to the data block then Save and Close the data block.
  4. Open the Source file you created and compile it. This will set all values in the data block equal to the values you see in the Source file.
  5. Download – your values have been retained.

Learn more about DMC's expertise in Siemens S7 PLC programming.