hit counter script

Siemens SIMATIC S7 System Manual page 254

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.6 Counters
Input / output
Data type
Cxxx
WORD
CU, CD (LAD)
BOOL
CU, CD (FBD)
BOOL
R
(LAD)
BOOL
R
(FBD)
BOOL
LD (LAD)
BOOL
LD (FBD)
BOOL
PV
INT
Note
Since there is one current value for each counter, do not assign the same counter number to
more than one counter. (Up Counters, Up/Down Counters, and Down counters with the
same number access the same current value.)
When you reset a counter using the Reset instruction, the counter bit is reset and the
counter current value is set to zero. Use the counter number to reference both the current
value and the counter bit of that counter.
See also Configuring the retentive ranges - system block configuration (Page 141)
Counter operation
Type
Operation
CTU
CU increments the current value.
Current value continues to incre-
ment until it reaches 32,767.
CTD
CD decrements the current value
until the current value reaches 0.
CTUD
CU increments the current value.
CD decrements the current value.
Current value continues to incre-
ment or decrement until the coun-
ter is reset.
You can select the current value for the counter to be retentive, but not the counter bit value.
1
254
Operand
Constant (C0 to C255)
Power flow
I, Q, V, M, SM, S, T, C, L, Logic flow
Power Flow
I, Q, V, M, SM, S, T, C, L, Logic flow
Power Flow
I, Q, V, M, SM, S, T, C, L, Logic flow
IW, QW, VW, MW, SMW, SW, LW, T, C, AC, AIW, *VD, *LD, *AC, Constant
Counter bit
The counter bit is set ON when:
Current value >= Preset
The counter bit is set ON when:
Current value = 0
The counter bit is set ON when:
Current value >= Preset
Power cycle / first scan
Counter bit is OFF.
Current value can be retained
Counter bit is OFF.
Current value can be retained
Counter bit is OFF.
Current value can be retained
System Manual, V2.3, 07/2017, A5E03822230-AF
1
1
1
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents

Save PDF