LCTU (FB)
FUNCTION_BLOCK PUBLIC LCTU
Increments a given value
(* Example declaration *)
LCTUInst : LCTU ;
(* Example in ST *)
LCTUInst(CU:= VarBOOL1, RESET:=VarBOOL2 , PV:= VarLWORD1);
VarBOOL3 := CTUInst.Q ;
VarLWORD2 := CTUInst.CV;
- InOut:
Scope
Name
Type
Comment
Input
CUBOOLRising edge: Incrementing
CVby oneRESETBOOLTRUE: ResetCVto 0PVLWORDUpper limit for incrementing
Output
QBOOLTRUEifCV >= PVCVLWORDCurrent counter value