Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 41306542, Entry date: 02/18/2010

How can you avoid overwriting the flags that are allocated for system and clock memory bits in the user program?

  • Entry
  • Associated product(s)

When you enable the "system memory bits" or the "clock memory bits" as shown in figure 01, the assigned flags are not automatically allocated in the "PLC tags." Therefore, these flags might be mistakenly used elsewhere in your program.
To prevent an accidental overwriting of memory, the assigned flags need to be named in the "PLC tags" table. You can do this either manually, or you can use the attached global library file. In this file, you will find two already prepared PLC tag tables. Drag and drop them into the "PLC tags" folder of your CPU, and the "PLC tags" table is filled in automatically.


Adding the library "S7-1200_PLC_tags_Mem_Bits"
Download the attached library, and unzip it. Open the task card "Libraries". Click the button "Open global library". The dialog window "Open global library" opens. Browse for the library folder "PLC_tags_Mem_Bits," and open the file "PLC_tags_Mem_Bits.al10". Now, the library is displayed in the "Global libraries" pane in the "Libraries" task card.


Using the library "S7-1200_PLC_tags_Mem_Bits"
Click and hold the library you want to add and drag it into any tag folder of your S7-1200 PLC. Double-click the item "PLC tags" to view the list of PLC tags.
Figure 03 is showing how you can add the library "Clock_Mem_bits" to your "PLC_tags" folder.

Bits to be Tagged Name of Library Item Memory Area
Clock memory bits Clock_Mem_Bits MB0
System memory bits Sys_Mem_Bits MB1
Table 01


  • The library is designed to match the default settings of the memory bits. A customized setup requires an adjustment of the PLC tags to fit your preset memory area.
  • After you added the tags to your tag table and there exists duplicates, the address field is highlighted.


  S7-1200_PLC_tags_Mem_Bits.zip ( 221 KB )  

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit