Chapter 8 Logic Instructions
Programming Example
The variable table and program
Variable name Data type Initial value
Timing Chart:
Case 1: TOF1_PT is the set time for off delay. When TOF1_In is TRUE, TOF1_Q is TRUE. When
TOF1_In is FALSE, the timer starts to measure the time. When the value of TOF1_ET
equals the setting value of TOF1_PT, TOF1_Q is FALSE and the timer stops timing.
Case 3: When TOF1_In changes from TRUE to FALSE, the timer starts timing. When current
time (TOF1_ET) is less than the set time (TOF1_PT) and TOF1_In is set to TRUE,
TOF1_ET is reset and the state of TOF1_Q does not change.
1
TOF
EN ENO
In Q
TOF1
PT
TOF1_EN
TOF1_In
TOF1_PT
TOF1_Q
ET
TOF1_ET
TOF1_In
TOF1_Q
TOF1_ET
TOF1_PT
Case 1 Case 2
8-43