Counter instructions – Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 304

Advertising
background image

Publication 1785-UM012D-EN-P - July 2005

D-4 Instruction Set Quick Reference

Counter Instructions

Instruction

Description

Retentive Timer On
RTO

Status Bits:
EN - Enable
TT - Timer Timing
DN - Done

Timer Reset
RES

If the input conditions go true, timer T4:1 is reset. This
instruction resets timers and counters, as well as control
blocks. This is necessary to reset the RTO accumulated value.

RTO

RETENTIVE TIMER ON

Timer

Preset

T4:10

10

1.0

0

Time Base

Accum

If the input conditions go true, timer T4:10 starts incrementing i
1-second intervals as long as the rung remains true. When the
rung goes false, the timer stops. If the rung goes true again, th
timer continues. When the accumulated value is greater than o
equal to the preset (10), the timer stops and sets the timer don
bit.

Rung
Condition

EN

15

TT

14

DN

13

ACC

Value

RTO

Status

False

True

False

0

1

0

0

1

0

0

0

0

0

increase

maintains

Disabled

Timing

Disabled

True

1

0

1

>= preset

Done

T4:1

(

)

RES

Instruction

Description

Count Up
CTU

Status Bits:
CU-Count Up
CD-Count Down
DN-Count Up done
OV-Overflow
UN-Underflow

CTU

COUNT UP

Counter

Preset

C5:1

10

0

Accum

If the input conditions go true, counter C5:1 starts counting,
incrementing by 1 every time the rung goes from
false-to-true. When the accumulated value is greater than or
equal to the preset value (10), the counter sets the counter

Rung
Condition

CU

15

DN

13

OV

12

ACC

Value

CTU

Status

False

Toggle True

True

0

1

1

0

0

1

0

0

0

0

incr by 1

>= preset

Disabled

Counting

Done

True

1

1

1

>32767

Overflow

See page F-8 for a description of prescan operation for
this instruction.

Advertising