Count down CTD

Takes 1 away each time the rung turns on.

TagAfter two scans
StockPRE 0 ACC 9 CU 0 CD 1 DN 1 OV 0 UN 0

How it works

Subtracts 1 from ACC on each false-to-true rung change; holding the rung true does not count again. DN is 1 while ACC is at or above PRE.

How it's used

Use CTD to count down what is left, such as parts in a feeder.

TagValue
PickEye1
StockPRE 2 ACC 1 CU 0 CD 1 DN 0 OV 0 UN 0
Reorder1

Two picks took Stock from 3 to 1. ACC is below PRE, so Reorder is on.

Operands

OperandData typeRead or write
CounterCOUNTERReads and writes

Inside a COUNTER tag

MemberTypeMeaning
.PREDINTYou can write it
.ACCDINTRead only
.CUBOOLRead only
.CDBOOLRead only
.DNBOOLRead only
.OVBOOLRead only
.UNBOOLRead only

Common mistakes

  • Expecting DN when the count runs outDN is on while ACC is at or above PRE. It turns off when the count drops below PRE.

Learn it in a lesson

Related