1. Connect the delay memory timer TONR
1. Connect the delay memory timer TONR
1.1. Instruction Description
When the input terminal is turned on, the timer bit (Tx) is turned off, and the current value (TVx) starts timing from 0. Enable input terminal as&# 34; Disconnect&# 34; When, the timer status bit and current value remain in the last state. When the input terminal is turned on again, the current value (TVx) continues to count from the last hold value. When the accumulated current value (TVx) is greater than or equal to the preset time (SV), the timer status bit is turned on, and the current value continues to count until 32767. Txxx=T0 to T255, TVxxx=TV0 to TV255.
TON, TONR, and TOF timers have three resolutions. The resolution is determined by the timer number shown in the following figure. Each current value is a multiple of the time reference. For example, a count of 50 in a 10 millisecond timer represents 500 milliseconds.
| Timer number | Resolution | Maximum value |
|---|---|---|
| T0- T199 | 100ms | 3276.7 seconds |
| T200- T249 | 10ms | 327.67 seconds |
| T250-T255 | 1ms | 32.767 seconds |
1.1.1. Attention:
(1)TOF, TONR, and TON cannot share the same timer number. For example, there cannot be TONR TV32 D0 and TON TV32 D0.
(2)You can use TONR to accumulate multiple timing intervals.
(3)Performing a reset operation can reset the timer, that is, the timer position is 0, and the current value of the timer is set to 0.
(4)Only restore operations can be used to reset the TONR timer.
1.2. The valid operands of the instruction
| Input/Output | Data Type | operand | Description |
|---|---|---|---|
| TV | 16 bit integer | TV | Timer |
| SV | 16 bit unsigned integer | D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) | preset value |
1.3. Example
Command table:
NETWORK 000
LD X000
TONR TV251 K100 // When the timer reaches K100, T251=1 (such as K100 indicating that the timer has reached 100 * 1ms, which can also be replaced by a variable)
NETWORK 001
LD T251
OUT Y000
图1 TONR