Hide thumbs Also See for S7-1200:
Table of Contents
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.
7. Open the block that will use this FB.
8. Place this FB at the desired location. Doing so results in the creation of an instance data
9. Open the instance data block created when you placed the FB in the editor.
10.Under Static, locate the counter structure of interest. In the Retain column for this counter
Type shown in counter instruction (for preset
and count values)
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
count value, and the IEC_COUNTER structure appears in the FB Interface under Static.
The counter structure will change correspondingly.
block for this FB.
structure, check the box to make this structure retentive.
INT
SINT
DINT
UINT
USINT
UDINT
Corresponding structure Type shown in FB
interface
IEC_Counter
IEC_SCounter
IEC_DCounter
IEC_UCounter
IEC_USCounter
IEC_UDCounter
Basic instructions
7.3 Counter operations
225
Table of Contents
loading

Table of Contents