SyncRobots Statement
Start the reserved robot motion.
Syntax
SyncRobots robotNumber [, robotNumber] [, ...]
SyncRobots All
Parameters
- robotNumber
- Specify the robot number to start operating as an expression or numeric value (integer).
- All
- Specify all robots that are scheduled to operate.
Description
SyncRobots is used to start the robot motion reserved with the SYNC parameter of each motion command. The robots specified by the SyncRobots start to move in the same timing. This is more useful than synchronizing the normal multi-task programs by waiting for the I/O signal event because there is no effect of switching tasks. It can synchronize the robot motion start more precisely.
If a robot number is specified whose motion is not reserved, an error occurs.
See Also
SyncRobots Function
SyncRobots Statement Example
The example below uses the SYNC parameter of a motion command and SyncRobots to start the motions of two robots simultaneously.
Function Main
Xqt Func1
Xqt Func2
Do
Wait 0.1
If (SyncRobots And &H03) = &H03 Then
Exit Do
EndIf
Loop
SyncRobots 1,2
Fend
Function Func1
Robot 1
Motor On
Go P1 SYNC
Fend
Function Func2
Robot 2
Motor On
Go P1 SYNC
Fend