Table of Contents

CTD_UDINT

Block name

CTD_UDINT

ST call

PROGRAM CTD_UDINT_DEMO
  VAR
     BOOL1,BOOL2,BOOL3: BOOL;
    UDINT1,UDINT2: UDINT;
   FB:CTD_UDINT;
  END_VAR
    FB(CD:=BOOL1,LD:=BOOL2,PV:=UDINT1,Q=>BOOL3,CV=>UDINT2);
END_PROGRAM

Description

The block acts as a counter counting down to zero from the preset value pv.

Inputs

InputType Description Default value
CD BOOL Rising edge counts one down False
LD BOOL Sets the counter to its initial value pvFalse
PV UDINTInitial value of the counter 0

Outputs

OutputType Description
Q BOOL State when the counter finished counting (counting finished: q=true).
CV UDINTCurrent value of the counter

Application example