-
Notifications
You must be signed in to change notification settings - Fork 71
PLC Cycle Time 0
It's possible!
LDmicro typical workflow is:
You can exclude PLC Cycle Time handling by prescribe the PLC Cycle Time as 0.
Note: Using the loop PLC = 0 leads to incorrect operation of the timers TON, TOF, etc, which based on pre definite PLC cycle time.
Advantages: Fastest cycle time as possible. The timer (0 or 1) can be used to complete other tasks.
Disadvantages: Timers (TON, TOF, RTO, TCY) does not work correctly! The actual PLC cycle time is unknown. The actual PLC cycle time is unstable unstable PLC cycle time.avi
You can use PLC Cycle Time 0 in the simplest tasks.
PLC cycle time is 200 us
In this example, the PLC cycle time is exceeded in every third cycle.
PLC cycle time is 200 us and DELAY(200 us)
Note: You can measure the YPlcCycleDuty frequency to determine the overflow of the PLC cycle time. In normal operation, the frequency of YPlcCycleDuty should be stable ( F = 1 / PLC cycle time ).
The shortest cycle time depends on the complexity(number of rungs and elements) of your LD file.
You can experimentally determine the shortest cycle time.
- Develope the full LD program.
- Set the YPlcCycleDuty checkbox in the menu->Settings->MCU Parameters.
- Decrease the cycle time.
- Measure(view on an oscilloscope) the frequency of YPlcCycleDuty.
- Go to #3) if the PLC cycle time is stable like in the picture (see upper).
Any questions to LDmicro.GitHub@gmail.com