Delta — 4.6.17. CTU

4. Motion Control Instructions 4.6.17. CTU Explanation of the instruction: CTU is used to achieve the function of upcounter. When EN is on, R is off and the count-up input CU turns off -> on, the current value EV of the counter is increased by 1; as the value of EV is greater than or equal to the preset value PV, the output CTU is on; as EV reaches the maximum 4294967295, the counter stops counting. As R is on, CTU is reset and the current value EV of the counter is cleared as 0. Explanation of input and output parameter of the instruction:

DVP-MC operating manual 4-115 API Up counter Controller CTU 144 10MC11T Parameter Data Available Explanation name type device EN The execution condition of this instruction. “CTU” instruction is executed as “EN” turns on; CTU and EV value keep unchanged as “EN” turns off. BOOL M,I,Q,constant CU Once “CU” turns off -> on, the current value of the counter is added by 1. BOOL M,I,Q,constant R When “R” turns on, the current value “EV” is cleared to 0 and “CTU” is reset. BOOL M,I,Q,constant PV The preset value of the counter. UDINT Constant, D CTU When “EN” is on and the current value of “EV” is greater than or equal to that of “PV”, “CTU” turns on. BOOL M,Q EV The current value of the counter.

When “EN” turns on , “R” is off and the count-up input CU turns off -> on, the current value is added by 1; as the value of “EV” is up to the maximum 4294967295, the counter stops counting. UDINT D