Chapter 4 Motion Control Operation
The following describes tasks of the motion controller.
4.3.1 Types of Tasks
There are 3 types of motion control tasks: main task, periodic task and initialization task.
The main task completes the motion within the period set by the user, and it performs I/O refresh, program process,
motion control and processes EtherCAT synchronous communication. The set period of the main task is 1/2/4ms, and it
can be set in the basic parameter of the motion controller.
The period of the periodic task can be set in multiples of the main task’s period set by the user, and the periodic task is
processed in the remaining time after the main task is completed during the period of each task.
Therefore, the periodic task can be performed over a number of main task periods.
The initialization task is only performed once at the beginning when the motion controller is entering the RUN mode,
and it is normally used for setting the initial data of the system and the parameter.
. It performs I/O refresh, processing of programs assigned to main task and
motion control.
. It performs the above tasks at a time for each of the established control
period (main task cycle).
. It has higher priority than periodic task.
. It uses programs that require synchronized control and high-speed
operation processing through allocation since it is possible to process
program fast.
. Period possible to be set: 1ms, 2ms, 4ms
. It performs processing of programs assigned to main task.
. It is performed for the remaining time after implementation of main task
operation within the control period, and can be performed over multiple
cycles.
. Since it has lower priority than main task in the execution of motion control
commands within main task program, the motion control commands
executed in the main task program are processed first.
. It uses programs of processing other monitoring data and control of device
that doesn’t require high-speed processing through allocation.
. Period possible to be set: 1ms ~ 100ms (Set to a multiple of the main task
cycle)
. It performs processing of programs assigned to the initialization task after
implementing I/O refresh.
. It is performed only once at the time of entering the RUN mode.
. It is executed first when entering RUN mode. If the initial task completion
(_INIT_DONE) flag is set by the initialization task program, the task is
completed, and the execution of the main task and periodic task program
starts.