Sync Compensation
Sync compensation can improve synchronization performance by compensating for the slave axis lagging behind or moving farther ahead of the master axis.
Three parameters in the SyncParam class affect sync compensation: Sync Compensation Mode, Sync Gain, and In Sync Width.
These three parameters should be set for the sync slave axis, and not the master axis. One of several functions, such as SetParam and SetSyncParam can be called to set these parameters.
When the Sync Compensation Mode is set to None, no sync compensation is performed and the Sync Gain and In Sync Width parameters have no effect.
When the Sync Compensation Mode is set to VelocityOffset, a velocity offset is applied to the sync axis while the sync error (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) becomes equal to or greater than the value of In Sync Width. The velocity offset is set equal to the sync error multiplied by the Sync Gain. The servo must support velocity offset inputs and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.
When the Sync Compensation Mode is set to SymmetricVelocityOffset, a velocity offset is applied to the slave axis and a negative velocity offset is applied to the master axis. In this mode, the velocity offset for the slave axis is calculated in the same manner as VelocityOffset. The negative velocity offset for the master axis is calculated using the Sync Gain and In Sync Width parameters of the master axis. This mode cannot be used when performing sync control with more than one slave axis. The servo must support velocity offset inputs and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.
If the sync offset is 0 so that the command positions of the master and the slave are aligned, the sync error equals the difference between the master and salve feedback positions. For such case, the velocity offset is calculated using the following formula.
Velocity Offset = (Slave Feedback Position - Master Feedback Position) * Sync Gain
Below is a visual explanation of how a Velocity Offset is applied.

When operating sync control using sync groups (see SetSyncGroup), there is one additional parameter that affects sync compensation. If the Gantry Loop Cycle Ratio is set, the velocity offset is not calculated every communication cycle. Instead, the velocity offset is only updated once every Gantry Loop Cycle Ratio number of cycles. For the in between cycles, the velocity offset is set equal to the last calculated velocity offset.
The Axis Sync Mode status returned by the GetStatus function contains the current sync compensation that is applied to the axis.
NoSync The axis is not in sync, or is not a slave axis.
NoOffset The axis is a slave axis, but either the Sync Compensation Mode parameter is set to None or the Sync Gain parameter is set to 0.
VelocityOffset The axis is a slave axis, the Sync Gain parameter is set to a value greater than 0, and the Sync Compensation Mode parameter is set to VelocityOffset. The servo must support velocity offset inputs and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.
SymmetricVelocityOffset The axis is a slave axis, the Sync Gain parameter is set to a value greater than 0, and the Sync Compensation Mode parameter is set to SymmetricVelocityOffset. The servo must support velocity offset inputs and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.