CTD

CTD (Count Down)

 

CTD instruction counts downward by one. When disabled, the CTD instruction retains its ACC value.

 

 

C

Counter device address to set

V

Preset value

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

Error

Zero

Carry

CTD

C

-

-

-

-

-

-

-

o

-

-

-

-

-

3

-

-

-

V

-

-

-

-

-

-

-

-

-

-

o

-

o

 

When enabled, CTD instruction decrements the counter by one. Even if the CTD instruction is disabled, it retains its ACC value. When ACC value reaches 0, counter bit is set.

The range of preset (v) : 0 ~ 65535

In order to assign preset value to counter device, reset must be set at first after the ladder program downloaded to PLC.

 

Example)

Whenever M00 is ON, the CTD instruction decrements the counter by one. When ACC value reaches 0, C10 and Y15 will be set.

 

 

 

When ACC value reaches 0, C10 and Y15 will be set.

 

 

 

When M01 is ON, the current value goes back to preset value 5.

 

 

 

 

*Notice : In order to assign preset value 5 to C10, reset (M01) must be set at first after the ladder program downloaded to PLC.

 

  • Before

 

 

  • After