Example of pre-emptive multitasking, 4plc functionality – Lenze E94AxPExxxx User Manual
Page 71

Lenze · 9400 Servo PLC· Reference manual · DMS 4.0 EN · 11/2013 · TD05/06
71
4
PLC functionality
4.8
Appendix
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Example of pre-emptive multitasking
In the following example, three interval-controlled user tasks share the available 350 μs of
computing time per millisecond.
• The respective task cycle will not be used completely by the tasks so that a small amount of
calculating time remains after the lower-priority task 3.
• In the grey areas, processing in the respective task is frozen since either a higher-priority task,
the system part, or the basic motion control functions are being processed.
[4-5]
Example "pre-emptive multitasking"
Tip!
The example in illustration
shows that, e.g. for task 3 with the lowest priority, not the
total 1400 μs calculating time (4 task cycles * 350 μs per millisecond) is available but only
the part of the time that remains after processing the higher-priority task 1 and task 2.
Task 1
Task 2
Task 3
Free calculating time
8VHU3/&
8VHU3/&
8VHU3/&
8VHU3/&
PV
PV
PV
PV
PV
n
User task
Priority
Task interval
Task 1
1
1 ms
Task 2
2
2 ms
Task 3
3
4 ms