Chapter 7 Program
7.1.3 Run Time of the Program
The execution time (scan time) of each task program is calculated as follows. It means the time required from the start of each
control cycle to the time when the motion control execution is done, that is, the time required to complete the task.
1) Run time of the main task
It means the time from the start of the main task cycle to the time when the motion control execution is done.
Output
data
refresh
Input
Data
refresh
Processing
program
Perform
motion
control
Main task period
Performance time of main task
If the main task is not completed for one cycle, just measure the time from the start of the main task cycle to the time when the
main task is completed as shown below.
I/O
refresh
Program
Motion
control
Main task period
Main task period
Perform
main task
Performance time of periodic task
2) Run time of the periodic task
It means the time from the start of the periodic task cycle to the time when the periodic task program is done. The periodic task
can be executed in several main task cycles because it runs after the main task is completed.
I/O
refresh
Program
Motion
control
Program
I/O
refresh
Program
Motion
control
Program
Main task period Main task period
Periodic task period
Perf orm
main task
Perf orm
periodic task
WaitingWaiting
Performance time of periodic task
3) How to check the task run time
The task run time of the motion controller can be checked by using XG5000 or the flag as follows.