CTU_LINT

CTU_LINT

PROGRAM CTU_LINT_DEMO
   VAR
     BOOL1,BOOL2,BOOL3: BOOL;
    LINT1,LINT2: LINT;
  FB:CTU;
    END_VAR
    FB(CU:=BOOL1,R:=BOOL2,PV:=LINT1,Q=>BOOL3,CV=>LINT2);
END_PROGRAM

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

InputTypeDescription Default value
CU BOOLRising edge counts one up False
R BOOLSets the counter to zeroFalse
PV LINTFinal value of the counter 0
OutputTypeDescription
Q BOOLState when the counter finished counting (counting finished: q=true).
CV LINTCurrent value of the counter

  • © Energocentrum Plus, s.r.o. 2017 - 2024