EasyManuals Logo

Siemens Simatic S7-200 CPU 210 User Manual

Siemens Simatic S7-200 CPU 210
140 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #92 background imageLoading...
Page #92 background image
5-8
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
5.5 Counter Instructions
The Up/Down Counter counts up each time the count-up input transitions from off to on, and
counts down each time the count-down input transitions from off to on. The counter resets
when the reset input turns on. Upon reaching maximum value (32,767), the next rising edge
at the count-up input will cause the current count to wrap around to the minimum value
(-32,768). Likewise on reaching the minimum value (-32,768), the next rising edge at the
count-down input will cause the current count to wrap around to the maximum value
(32,767).
The Up/Down counter has a current value that maintains the current count. Use the counter
number to reference the current value. Since there is one current value for each counter, do
not assign the same number to more than one counter.
Up/Down Counter
The Up/Down Counter instruction counts up on rising edges of
the Count Up (CU) input. It counts down on the rising edges of
the Count Down (CD) input. The counter resets when the Reset
(R) input turns on
In STL, the Reset input is the top of the stack value, the Count
Down input is the value loaded in the second stack location,
and the Count Up input is the value loaded in the third stack
location.
Operands: Cx: C0 to C3
PV: 0 (preset value is not used)
Counter Example
I0.3 Up
Network
LD I0.3 //Count Up Clock
LD I0.2 //Count Down Clock
LD I0.1 //Reset
CTUD C1, 0
Network
LDW>= C1, 4
= Q0.2
Timing Diagram
LAD STL
I0.2 Down
I0.3
I0.2
0
I0.1
I0.1 Reset
0
1
2
3
4
5
4
3
4
5
C1 Current
Q0.2
Q0.2
C1
>=I
+4
C1
CTUD
CU
R
PV
CD
Figure 5-5 Example of the Counter Instruction
Instruction Set
L
A
D
S
T
L
CTUD Cx, PV
Cx
CTUD
CU
R
PV
CD

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7-200 CPU 210 and is the answer not in the manual?

Siemens Simatic S7-200 CPU 210 Specifications

General IconGeneral
Digital Inputs6
Digital Outputs4
Program Memory2 KB
Data Memory1 KB
Timers128
Counters128
Analog Inputs0
Analog Outputs0
Communication Ports1 x RS-485
Power Supply24 V DC
TypeCPU

Related product manuals