Chapter 8 Logic Instructions
Programming Example
The variable table and program
Variable name Data type Initial value
Timing Chart:
Case 1: TP1_PT sets the time for off delay. When TP1_In is TRUE, the timer starts to measure time
and TP1_Q is TRUE. When the value of TP1_ET equals the setting value of TP1_PT,
TP1_Q is FALSE. When TP1_In is FALSE, TP1_ET is reset.
Case 2: TP1_PT sets the time for off delay. When TP1_In is TRUE and the timer starts to measure
time, TP1_Q is TRUE. When TP1_In is FALSE and the value of TP1_ET is less than the
setting value of TP1_PT, TP1_ET keeps timing and TP1_Q keeps TRUE state. When the
value of TP1_ET equals the setting value of TP1_PT, TP1_ET and TP1_Q are both reset.
1
TP
EN ENO
In Q
T 1
PT
TP1_EN
TP1_In
TP1_PT
TP1_Q
ET
TP1_ET
P
TP1_In
TP1_ET
TP1_Q
TP1_PT
Case 1 Case 2
8-45