Skip to content
LDmicroGitHub edited this page Feb 20, 2020 · 9 revisions

It's possible!
LDmicro typical workflow is:
plctime0
You can exclude PLC Cycle Time handling by prescribe the PLC Cycle Time as 0.
default
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.
image
plctimeIs0.png
PLC cycle time is 200 us
plctime200us.png

In this example, the PLC cycle time is exceeded in every third cycle.
PLC cycle time is 200 us and DELAY(200 us)
default
plctime200us_delay200us.png
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.

  1. Develope the full LD program.
  2. Set the YPlcCycleDuty checkbox in the menu->Settings->MCU Parameters.
  3. Decrease the cycle time.
  4. Measure(view on an oscilloscope) the frequency of YPlcCycleDuty.
  5. Go to #3) if the PLC cycle time is stable like in the picture (see upper).

Any questions to LDmicro.GitHub@gmail.com

Clone this wiki locally