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 - CU- BOOL- Rising edge: Incrementing - CVby one- RESET- BOOL- TRUE: Reset- CVto 0- PV- LWORD- Upper limit for incrementing - Output - Q- BOOL- TRUEif- CV >= PV- CV- LWORD- Current counter value 
