32.7.1.1 Explanation of the ON Delay Timer (TON) and OFF Delay
Timer (TOF) Instructions
Timer variables used in TON and TOF instructions are structure
variables. The following table lists the internal structures.
Timer Variable
Timer Variable
|
Variables Settings
|
Description
|
VariableName.TI
|
Bit Variable
|
Turns ON when the timer begins.
|
VariableName.Q
|
Bit Variable
|
Turns ON upon completion of the timer.
|
VariableName.PT
|
Integer Variable
|
The value set on the timer
|
VariableName.ET
|
Integer Variable
|
The current value on the timer
|
Double-click the timer instruction to display the following
dialog box. Enter the preset time in this dialog box.
Enter the setup value and units.
For time-based settings, double-click the timer instruction to
display the setup dialog box.
Time base
|
Description
|
PT value/ET value
|
msec
|
Specify the time in units of 1 millisecond.
|
The PT value is specified and displayed in
millisecond units.
The ET value is displayed in millisecond
units.
Setting range = 0 to 214748364 x 1
millisecond
|
10msec
|
Specify the time in units of 10
milliseconds.
|
The PT value is set and displayed in units of
10 milliseconds.
The ET value is displayed in units of 10
milliseconds.
Setting range = 0 to 21474836 x 10
milliseconds
|
0.1sec
|
Specify the time in units of 0.1 s.
|
The PT value is specified and displayed in
units of 0.1 s.
The ET value is displayed in units of 0.1
s.
Setting range = 0 to 2147483 x 100
milliseconds
|
sec
|
Specify the time in units of 1 s.
|
The PT value is specified and displayed in
units of 1 s.
The ET value is displayed in units of 1 s.
Setting range = 0 to 214748 x 1s
|
Program Example
TON
-
When start measurement is on (turned on), the
elapsed time .ET will increase by the specified time-based units
because the TON instruction is triggered.
The timer measurement bit .TI turns ON.
The timer output bit .Q turns OFF.
-
When the elapsed time .ET increases to equal the
preset time .PT, the elapsed time .ET keeps the current value.
The timer measurement bit .TI turns OFF.
The timer output bit .Q turns ON and allows power to pass.
-
When start measurement is off (turned off), the
elapsed time .ET will be reset to 0.
The timer measurement bit .TI turns OFF.
The timer output bit .Q turns OFF.
TOF
-
When start measurement is on (turned on), the
elapsed time .ET will be reset to 0 because the TOF instruction is
triggered.
The timer measurement bit .TI turns OFF.
The timer output bit .Q turns ON and allows power to pass.
-
When the TOF instruction is triggered and the
measurement start bit is turned OFF, the elapsed time .ET will
increase by the specified time-based units.
The timer measurement bit .TI turns ON.
The timer output bit .Q remains ON.
-
When the elapsed time .ET increases to equal the
preset time .PT, the elapsed time .ET keeps the current value.
The timer measurement bit .TI turns OFF.
|