2.11.2. Example of Teaching the Multitasking Motion
2.11.2. Example of Teaching the Multitasking Motion
As shown in the figure below, here is an explanation about an example of performing a multitasking operation with a system that consists of a robot, a robot gun, a stationary gun, and a jig axis, which totals to one robot axis and three additional axes.
The main task controls the robot axis, and each of the three subtasks controls one additional axis. In the main task, the work for the robot and the creation of subtasks are performed. When created, each subtask performs the work for the unit.
① The main program is program number 100. The main program can be programmed so that all axes can be driven by selecting unit 0. When the main program is executed, the MOVE and SPOT statements will be executed in sequence, and the statements will be executed up to step 10.
② After that, if AXISCTRL OFF T1, T2, and T3 commands are executed in the main program, the setting will be performed so that the designated axis number can be controlled in the subtask. In this way, the T1, T1, T3 additional axes will not move to the positions of T1, T2, and T3 recorded in steps 11–15 when steps 11–15 are performed in the main task.
③ Designate the program to be executed in subtasks 1, 2, and 3 using the TaskStart command. The program assigned to a subtask must be set as an independent unit, and the axis designated as a unit should not be overlapped between subtasks. For example, mechanism M1 = axis T1 should be designated for unit 1, mechanism M2 = axis T2 for unit 2, and mechanism M3 = axis T3 for unit 3 in a mutually exclusive manner.
④ Programs 0063, 0064, and 00165 assigned to subtasks by the TaskStart command will be independently executed and the main program will execute steps 11–15.
⑤ When a TaskWait command is encountered in the main program, waiting will occur until the designated subtask is completed and END is executed. Accordingly, the main program will wait until all sub tasks 1, 2, and 3 are ended.
⑥ For the main program to take back the control of the additional axis, the AXISCTRL ON command should be executed.