Chapter 8 Logic Instructions
Precautions for Correct Use
While Reset is TRUE, the counter will not count up.
When CV equals PV, the counter stops counting.
Programming Example
The variable table and program
CTU1_EN
BOOL
FALSE
CTU1_PV
UDINT 4
Timing Chart:
Case 1: If CTU counts up normally, the value of CTU1_CV is increased by 1 whenever
CTU1_CU is triggered once.
Case 2: When CTU1_CV equals CTU1_PV, CTU1_Q is TRUE and CTU stops counting.
Case 3: When CTU1_Reset is TRUE, CTU1_CV is cleared to 0, CTU1_Q is FALSE. And the
counter will not count when CTU1_CU is triggered.
1
CTU
EN ENO
Q
CTU1
CU
Reset
CV
PV
CTU1_EN
CTU1_CU
CTU1_Reset
CTU1_PV
CTU1_Q
CTU1_CV
CTU1_CU
CTU1_Reset
CTU1_CV
CTU1_Q
CTU1_PV
Case 1 Case 2
Case 3
8-47