Siemens SIMATIC S7 System Manual page 182

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

100BBasic instructions
7.3 Counters
This option depends upon whether the FB was created as symbolic access only. Once the
FB has been created, you cannot change the checkbox for "Symbolic access only"; it must
be chosen correctly when the FB is created, on the first screen after selecting "Add new
block" from the tree. To see how this box is configured for an existing FB, right-click on the
FB in the Project tree, choose properties, and then choose attributes.
If the FB was created with the "Symbolic access only" box checked:
1. Open the FB for edit.
2. Place the counter instruction at the desired location in the FB.
3. When the Call options dialog appears, click on the Multi instance icon. The Multi Instance
4. In the Call options dialog, rename the counter if desired.
5. Click OK. The counter instruction appears in the editor with type INT for the preset and
6. If desired, change the type in the counter instruction from INT to one of the other types.
Type shown in counter instruction (for preset
and count values)
1. If necessary, open the FB interface editor (may have to click on the small arrow to
2. Under Static, locate the counter structure that was just created for you.
3. In the Retain column for this counter structure, change the selection to "Retain".
If the FB was created with the "Symbolic access only" box
1. Open the FB for edit.
2. Place the counter instruction at the desired location in the FB.
3. When the Call options dialog appears, click on the multi instance icon. The multi instance
4. In the Call options dialog, rename the counter if desired.
5. Click OK. The counter instruction appears in the editor with type INT for the preset and
6. If desired, change the type in the counter instruction from INT to one of the other types.
182
option is only available if the instruction is being placed into an FB.
count values, and the IEC_COUNTER structure appears in the FB Interface under Static.
The counter structure will change correspondingly.
INT
SINT
DINT
UINT
USINT
UDINT
expand the view).
Whenever this FB is called later from another program block, an instance DB will be
created with this interface definition which contains the counter structure marked as
retentive.
option is only available if the instruction is being placed into an FB.
count value, and the IEC_COUNTER structure appears in the FB Interface under Static.
The counter structure will change correspondingly.
Corresponding structure Type shown in FB
interface
IEC_Counter
IEC_SCounter
IEC_DCounter
IEC_UCounter
IEC_USCounter
IEC_UDCounter
not
checked:
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents