Function: The CTUD instruction is used to increment or decrement the input. When the
RESET terminal and the LOAD terminal are both FALSE , the counting is allowed : if a rising edge
occurs at the CU input terminal, the CV terminal is incremented by one; if a rising edge occurs at
the CD input terminal, the CV terminal is decremented by one; when CV=PV , then QU=1, the
CTUD function block stops counting up ; if CV=0 , then QD=1, the CTUD function block stops
counting down. When the RESET terminal is TRUE , the counter stops incrementing and counting
down, and the CV terminal is cleared . When the LOAD terminal is TRUE , the counter stops
incrementing and counting down, and the PV value is assigned to the CV terminal.
CTUD_1 ( CU:=var1 , CD:=var2,
RESET:= var3, LOAD:=var4,
PV:=var5 ) ;
Note : IL, ST language programming needs to insert the variable val ~ var8 or use constants in
the variable worksheet of the current POU