LCTD (FB)
FUNCTION_BLOCK PUBLIC LCTD
Decrements a given value
(* Example declaration *)
LCTDInst : LCTD ;
(* Example in ST *)
LCTDInst(CD:= VarBOOL1, LOAD:=VarBOOL2 , PV:= VarLWORD1);
VarBOOL3 := CTDInst.Q ;
VarLWORD2 := CTDInst.CV;
- InOut:
Scope
Name
Type
Comment
Input
CDBOOLRising edge: Decrementing
CVby oneLOADBOOLTRUE: SetCVto the start valuePVPVLWORDStart value for decrementing
Output
QBOOLTRUEifCV = 0CVLWORDCurrent counter value