User guide
Chapter 17
Timer and Counter Instructions
17–7
Count Up, Count Down CTU, CTD Output Instructions
(CTU) (CTD)
(CU)
(DN)
CTU
COUNT UP
Counter C5:0
Preset 120
Accum 0
(CU)
(DN)
CTD
COUNT DOWN
Counter C5:1
Preset 120
Accum 0
HHT Ladder Displays:
HHT Zoom Displays:
Ladder Diagrams and APS Displays:
F1 F2 F3 F4 F5
ZOOM on CTU –(CTU)– 2.3.0.0.2
NAME: COUNT UP
COUNTER: C5:0
PRESET: 120
ACCUM: 0
CU CD DN OV UN
0 0 0 0 0
EDT_DAT
F1 F2 F3 F4 F5
ZOOM on CTD –(CTD)– 2.4.0.0.2
NAME: COUNT DOWN
COUNTER: C5:1
PRESET: 120
ACCUM: 0
CU CD DN OV UN
0 0 0 0 0
EDT_DAT
(online monitor mode)
CTU and CTD instructions are retentive. Count up and count down
instructions count false-to-true rung transitions. These rung transitions could
be caused by events occurring in the program such as parts traveling past a
detector or actuating a limit switch.
Each count is retained when the rung conditions again become false. The
count is retained until an RES instruction having the same address as the
counter instruction is enabled.
Each counter instruction has a preset and accumulated value and a control
word associated with it. The accumulated value is retained after the CTU or
CTD instruction goes false, and when power is removed from and then
restored to the processor. Also, the on or off status of counter done,
overflow, and underflow bits is retentive.
Count Up (CTU) and Count
Down (CTD)