-
Notifications
You must be signed in to change notification settings - Fork 71
TON, TOF, etc. in v2.3 and v3.5.3 and later
1) v2.3
Attention! TON, TOF, RTO timers in LDmicro v2.3 are shorter than those specified in the LD file. They shorter at one PLC cycle time.
TON
TON, TOF timers in LDmicro v2.3 are shorter than those specified in the LD file.
1 ms instead 2 ms in LDmicro v2.3 !!!
Disadvantages:
- Timers are shorter than expected. When the timer delay time is set to 2 * PLC cycle time, then the actual timer delay is 1 * PLC cycle time, and the deviation is 50%.
- It is not possible to set a timer delay equal to the PLC cycle time.
Advantages:
- In some special rungs, it becomes the user-friendly effect.
2) v3.5.3
TON
2 ms TON as expected in LDmicro v3.5.3 !!!
TOF
2 ms TOF as expected in LDmicro v3.5.3 !!!
RTO
2 ms RTO as expected in LDmicro v3.5.3 !!!
LD, Proteus, pictures in x3.zip. Try to simulate.
v3.5.3 PRO
- When we make delays based on TON, TOF, RTO and when delays follow one after another (sequential on or off) (sequential rising or falling), we get the correct time delays. See the sequences Y0->Y1-Y2 on upper picture.
v3.5.3 CONTRA
- When we use TON, TOF, RTO to generate cyclic signals and use sefl-reset we should take into consideration sefl-reset cycle.
RTO
Y0 period T = RTO 4ms + PLC cycle time 1ms = 4ms + 1ms= 5ms,
Y1 frequency F = 1 / T = 1 / 5 ms = 200 Hz
TON
Y0 - output of the T0 TON 4 ms timer
Y1 - the moment of time where output of TON timer rising
Y_0 - is inverse to Y0 (wiil be inverted in next PLC cycle) and is shifted by one PLC cycle time
Y_0 - input of the T0 TON 4 ms timer
Y2 - shows the ticks of the TON timer
3) v4.3.6
Timer delay calculated as in v3.5.3 and
you can adjust the delay.
Total timer delay (ms) = Delay (ms) + Adjust * PLC cycle time (ms).
When LDmicro open LD files marked inside as LDmicro0.1, then adjust -1 is applied as in v2.3.
Advantages:
- More user-friendly in some cases.
- More backward compatibility.
Please give more special cases with timers to LDmicro.GitHub@gmail.com