Siemens S7-1200 System Manual page 100

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

PLC concepts
4.1 Execution of the user program
Retentive memory
You can avoid data loss after power failure by marking certain data as retentive. The CPU
allows you to configure the following data as retentive:
● Bit memory (M): You can define the precise width of the memory for bit memory in the
PLC tag table or in the assignment list. Retentive bit memory always starts at MB0 and
runs consecutively up through a specified number of bytes. Specify this value from the
PLC tag table or in the assignment list by clicking the "Retain" toolbar icon. Enter the
number of M bytes to retain starting at MB0.
● Tags of a function block (FB): If an FB was created with "Optimized" selected, then the
interface editor for this FB includes a "Retain" column. In this column, you can select
either "Retentive", "Non-retentive", or "Set in IDB" individually for each tag. An instance
DB that was created when this FB is placed in the program editor shows this retain
column as well. You can only change the retentive state of a tag from within the instance
DB interface editor if you selected "Set in IDB" (Set in instance data block) in the Retain
selection for the tag in the optimized FB.
If an FB was created with "Standard - compatible with S7-300/400" selected, then the
interface editor for this FB does not include a "Retain" column. An instance DB created
when this FB is inserted in the program editor shows a "Retain" column which is available
for edit. In this case, selecting the "Retain" option for any tag results in all tags being
selected. Similarly, deselecting the option for any tag results in all tags being deselected.
For an FB that was configured to be "Standard - compatible with S7-300/400", you can
change the retentive state from within the instance DB editor, but all tags are set to the
same retentive state together.
After you create the FB, you cannot change the option for "Standard - compatible with
S7-300/400". You can only select this option when you create the FB. To determine
whether an existing FB was configured for "Optimized" or "Standard - compatible with S7-
300/400", right-click the FB in the Project tree, select "Properties", and then select
"Attributes". The check box "Optimized block access" when selected shows you whether
a block is optimized. Otherwise, it is standard and compatible with S7-300/400 CPUs.
● Tags of a global data block: The behavior of a global DB with regard to retentive state
assignment is similar to that of an FB. Depending on the block access setting you can
define the retentive state either for individual tags or for all tags of a global data block.
– If you select "Optimized" when you create the DB, you can set the retentive state for
– If you select "Standard - compatible with S7-300/400" when you create the DB, the
100
each individual tag.
retentive-state setting applies to all tags of the DB; either all tags are retentive or no
tag is retentive.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents