Sync Group
Sync groups are an alternate way to operate synchronous control. A sync group is a predefined group of one master axis and any number of slave axes. Several functions unique to sync groups are available.
The following functions are used to control sync groups.
Defining a Sync Group
A sync group is defined using the SetSyncGroup function.
The sync group parameters are specified using the SyncGroup class.
The basic parameters are as follows.
masterAxis - The master axis of the sync group.
slaveAxisCount - The number of slave axes in the sync group.
slaveAxis - An array whose first slaveAxisCount indices are used to specify the slave axes of the sync group.
Servo On/Off Synchronization
The following parameter is used to specify whether to synchronize the servo on and servo off signals of sync group axes.
If 1 is specified for this parameter, when a servo on signal is sent to any axis in the sync group, a servo on signal is sent to the remaining axes in the sync group. When any axis in the sync group enters servo off state, a servo off signal is sent to the remaining axes in the sync group.If 0 is specified for this parameter, the servo on and servo off signals of the axes in the sync group will not be linked.
Startup Type
The following parameters are used to specify the startup type that determines how sync control is restored after being configured once.
The two available SyncGroupStartupTypes are Normal and CatchUp.Normal
The Normal startup type is the default startup type. In this startup type, sync control is started when the sync group is enabled with the EnableSyncGroup function and the slave axis servo is turned on. The sync offset is set to the difference between the master and slave command positions when the sync control is started. If useMasterFeedback is set, the master feedback position is used instead of the master command position for calculating the sync offset.
None of the other parameters above are used by this startup type.
CatchUp
The CatchUp startup type will synchronize the master and slave such that the sync offset (the difference between the master position and slave command position) is 0 so that the slave command position is equal to the master position. If the sync offset has changed from 0 offset when the slave axis servo is turned on, the slave axis will move to the 0 offset using a Trapezoidal motion profile with a velocity and an acceleration specified by catchUpVelocity and catchUpAcc. This catch up motion is executed on top of any additional motion of the slave axis from the motion of the master axis, and takes the same amount of time to complete regardless of the motion of the master axis.
The CatchUp startup type requires gantry homing to have been completed by the axes of the sync group so that the homeDone status of the SyncGroupStatus (obtained with the GetSyncGroupStatus function) is 1. Gantry homing can be started by calling the StartHome function specifying the master axis while sync control is established. For additional information, see Gantry Homing. If the homeDone status is 0, sync control will be started in the same way as the Normal startup type.
The catchUpVelocity and catchUpAcc must be a valid velocity and acceleration as described in Profile Parameters. Failing to specify a valid velocity and acceleration when the startupType is CatchUp will cause the SetSyncGroup function to return an error.
The maxCatchUpDistance parameter specifies the maximum distance that the catch up motion can cover. If the sync offset has changed greater than this distance, the catchUpError status will be set to 1 and the servos of the master and slave axes of the sync group will be turned off.
This startup type is not suitable for configurations where the master and slave axis sync offset is not zero, including:
The value of the Home Position parameter is different between the master and slave axes.
The Gantry Homing Retain Sync Offset parameter is enabled for the slave axis.
A sync gear ratio other than 1 is set with the SetSyncGearRatio function.
The value of the Single Turn Mode parameter is different between the master and slave axes.
Both the master and slave axes are single turn axes, but the product of the Single Turn Encoder Count and the Gear Ratio is different between the master and slave axes.
Sync Error Tolerance
The following parameter is used to specify the tolerance in the sync error between the master and slave axis.
The sync error tolerance determines the maximum sync error between the master and slave axis. If the sync error between the master and slave axis exceeds this tolerance, the syncError status will be set to 1 and the servos of the master and slave axes of the sync group will be turned off.If this parameter is set to 0, the sync error will not be calculated, and the syncError error will not occur.
In addition, the sync error will only be calculated if the master axis servo is on and gantry homing has been completed for the sync group (the homeDone status of SyncGroupStatus is 1).
The sync error is calculated as the difference between the following error of the master axis and slave axis, where the following error is the difference between the command position and the feedback position. If the sync offset is 0 so that the command positions of the master and the slave are aligned, the sync error is calculated as the difference between the feedback positions of the master axis and slave axis. This is shown in the following figure.

The sync error and the syncErrorTolerance parameter are calculated in user units, with the assumption that the user units of the slave axis are interchangable with the user units of the master axis.
For single turn master or slave axes, the sync error is calculated considering wraparound at the Single Turn Encoder Count.
Use Master Feedback
The following parameter is used to specify whether to use the feedback position of the master axis instead of the command position to calculate the slave command position.
This parameter is equivalent to the useMasterFeedback parameter of regular sync control.Gantry Loop Cycle Ratio
The following parameter is used to specify the ratio of communication cycles at which to update the velocity offset.
The velocity offset command is sent to the sync slave axis every communication cycle if the Sync Compensation Mode parameter is set to VelocityOffset or SymmetricVelocityOffset.If the gantryLoopCycleRatio parameter is set to 0 or 1, the velocity offset command is recalculated every communication cycle. If the gantryLoopCycleRatio parameter is set to 2 or higher, the velocity offset command is only recalculated once every gantryLoopCycleRatio communication cycles. During the intermediate communication cycles, the same velocity offset command as the previous communication cycle is sent.
Normally, this parameter should not be adjusted from the default value of 0.
Sync Group Status
The sync group statuses are contained in the SyncGroupStatus class. The GetSyncGroupStatus function can be called to obtain the current status of a sync group.
The available statuses are summarized in the table below.
Status |
Remarks |
|---|---|
This status, when set to 1, indicates that the sync group is enabled. An enabled sync group will attempt to initiate sync control whenever the slave axis is in servo on state and sync control has not been established. When this status is 0, the sync group is disabled. A sync group can be enabled or disabled by calling the EnableSyncGroup function. |
|
This status indicates whether the sync group has finished homing. When a new sync group is defined, this status is set to 0. After the StartHome function is called specifying the master axis and the homing procedure successfully completes, this status is set to 1. All master and slave axes of the sync group must be in servo on state to complete homing. The CatchUp sync group startup type will not execute catch up motion while this status is 0. The syncErrorTolerance parameter will not generate a syncError while this status is 0. This status is cleared when the sync group parameters are changed (with functions such as SetSyncGroup, AddAxisToSyncGroup, or RemoveAxisFromSyncGroup) or whenever a homing operation is started for a sync group with the StartHome function. |
|
This error status is set to 1 when the maxCatchUpDistance parameter is exceeded during the catch up motion of the CatchUp sync group startup type. Error statuses are cleared only when the ClearSyncGroupError function is called. |
|
This error status is set to 1 when the syncErrorTolerance parameter is exceeded after homing has been completed. Error statuses are cleared only when the ClearSyncGroupError function is called. |
|
This error status is set to 1 when attempting to enable a sync group with the EnableSyncGroup function, but a master axis or slave axis of the sync group is in another enabled sync group. When this error occurs, the sync group will not be enabled. Error statuses are cleared only when the ClearSyncGroupError function is called. |
|
This error status is set to 1 when attempting to enable a sync group with the EnableSyncGroup function, but the master and slave axes of the sync group span more than one interrupt (cyclic handler). When this error occurs, the sync group will not be enabled. Error statuses are cleared only when the ClearSyncGroupError function is called. |