Chapter 8 Logic Instructions
Programming Example
The variable table and program
Variable name Data type Initial value
Timing Chart:
Case 1: TON1_PT is the set time. When TON1_In is TRUE, the timer starts to measure the time.
When the value of TON1_ET equals the setting value of TON1_PT, TON1_Q is TRUE.
When the timer stops measuring time, TON1_In is reset to FALSE and TON1_ET and
TON1_Q are both reset.
Case 2: When the currently measured time of the timer TON1_ET is less than the set time
TON1_PT and TON1_In is reset to FALSE, TON1_ET is reset and the state of TON1_Q
does not change.
1
TON
EN ENO
In Q
TON1
PT
TON1_EN
TON1_ In
TON1_PT
TON1_Q
ET
TON1_ET
TON1_In
TON1_ET
TON1_ Q
TON1_PT
Case 1
Case 2
8-41