Skip to main content

2.1.3. TaskSync

2.1.3. TaskSync

 

The TaskSync statement synchronizes between tasks. Generally, synchronization is essential for a cooperative work between two or more robots. In this case, this statement can be conveniently used when matching the synchronization start time between tasks. This statement can be useful when the main task and a subtask are conducting tasks and want to start the tasks simultaneously after waiting at a point of executing a specific statement.

When comparing it with TaskWait, TaskSync is a function used to synchronize between the main task program and a subtask program in the middle of those programs being executed and TaskWait is a function for waiting for a subtask to completely end.

 

The format of the TaskSync statement is as follows:

 

 

Item

Content

Identifier

Designate the identifier to 1–32.

It can designate multiple synchronization points in the program.

It is a variable that differentiates a synchronization point.

Number of Tasks to be Synchronized

Designate the number of tasks to be synchronized to 2–8.

It should match the number of tasks executed through the input of the TaskSync command.

Example of Use

Main task program

TaskStart SUB=1, JOB=0011

PRINT #0,”Main task”

TaskSync ID=1,NO=2

PRINT #0,”Task sync”

 

(The task ID is one, and the number of tasks to be synchronized is two)

Subtask program 1

PRINT #0,”Sub task”

DEALY 1

TaskSync ID=1,NO=2

 

(The task ID is one, and the number of tasks to be synchronized is two)