beautypg.com

Count down (ctd), Programming, Using status bits – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 117

background image

Using Basic Instructions

6–19

Count Down (CTD)

The CTD is a retentive output instruction that counts false-to-true rung transitions.
Rung transitions can be caused by events occurring in the program such as parts
traveling past a detector or actuating a limit switch.

When rung conditions for a CTD instruction have made a false-to-true transition,
the accumulated value is decremented by one count, provided that the rung
containing the CTD instruction is evaluated between these transitions.

The accumulated counts are retained when the rung conditions again become false.
The accumulated count is retained until cleared by a reset (RES) instruction that has
the same address as the counter reset.

Using Status Bits

This Bit

Is Set When

And Remains Set Until One

of the Following

Count Down Underflow Bit UN
(bit 11)

accumulated value wraps
around to +32,768 (from
–32,767) and continues
counting down from there

a RES instruction having the
same address as the CTD
instruction is enabled. OR
the count is incremented
greater than or equal to
+32,767 with a CTU
instruction

Done Bit DN (bit 13)

accumulated value is equal
to or greater than the preset
value

the accumulated value
becomes less than the preset

Count Down Enable Bit CD
(bit 14)

rung conditions are true

rung conditions go false OR
a RES instruction having the
same address as the CTD
instruction is enabled

The accumulated value is retained after the CTD instruction goes false, or when
power is removed from and then restored to the controller. Also, the on or off status
of counter done, overflow, and underflow bits is retentive. The accumulated value
and control bits are reset when the appropriate RES instruction is executed. The CD
bits are always set prior to entering the REM Run or REM Test modes.

Programming

Execution Times

(

µ

sec) when:

True

False

32.19

27.22

(CD)

(DN)

CTD

COUNT DOWN
Counter
Preset
Accum