Simatic Counter Instructions; Count Up, Count Up/Down, Count Down - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

9.4

SIMATIC Counter Instructions

Count Up, Count Up/Down, Count Down

L
A
D
F
B
D
S
CTU
T
L
CTUD
CTD
221
222 224
In STL, the CTD Load input is the top of stack, and the Count Down input is the
value loaded in the second stack location.
Inputs/Outputs
Cxxx
Constant
CU, CD, LD, R
Power Flow
(LAD)
CU, CD, R, LD
I, Q, M, SM, T, C, V, S, L, Power Flow
(FBD)
PV
VW, IW, QW, MW, SMW, LW, SW, AIW, AC, T, C, Constant, *VD,
*AC, *LD
S7-200 Programmable Controller System Manual
A5E00066097-02
The Count Up instruction counts up to the maximum
Cxxx
value on the rising edges of the Count Up (CU) input.
CTU
CU
When the current value (Cxxx) is greater than or equal to
the Preset Value (PV), the counter bit (Cxxx) turns on.
R
The counter is reset when the Reset (R) input turns on. It
PV
stops counting when it reaches PV.
The Count Up/Down instruction counts up on rising
Cxxx
edges of the Count Up (CU) input. It counts down on the
CTUD
CU
rising edges of the Count Down (CD) input. When the
current value (Cxxx) is greater than or equal to the
CD
Preset Value (PV), the counter bit (Cxxx) turns on. The
R
counter is reset when the Reset (R) input turns on.
PV
The Count Down Counter counts down from the preset
value on the rising edges of the Count Down (CD) input .
Cxxx
When the current value is equal to zero, the counter bit
CTD
CD
(Cxxx) turns on. The counter resets the counter bit
LD
(Cxxx) and loads the current value with the preset value
(PV) when the load input (LD) turns on. The Down
PV
Counter stops counting when it reaches zero.
Counter ranges:
Cxxx, PV
In STL, the CTU Reset input is the top of the stack value,
Cxxx, PV
while the Count Up input is the value loaded in the
second stack location.
Cxxx, PV
In STL, the CTUD Reset input is the top of the stack
value, the Count Down input is the value loaded in the
226
second stack location, and the Count Up input is the
value loaded in the third stack location.
Operands
SIMATIC Instructions
Cxxx=C0 through C255
WORD
BOOL
BOOL
INT
Data Types
9-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents