Synchronisation of axes on different PCs ("distributed axes")

(Example and quick reference guide)

This quick reference guide describes the synchronisation of NC axes in receiver PCs with an axis connected to a sending PC. The "master axis" data are cyclically transferred to the receivers via network variables. Phase differences in the real-time clocks lead to beat effects, causing individual axis information to be read twice or missed on the receiver side. If the information is used directly for operating the receiver axes, these step changes in the position or velocity lead to jerky motion. Figure 1 shows (slightly offset in y) the set and actual velocity of an NC axis directly operated in the position interface with the received values. The duration and frequency of the beat effects depends on the phase difference of the systems used.

Synchronisation of axes on different PCs ("distributed axes") 1:

 

For minimising the beat effects on the receiver side the PLC function block FB_AxisSync is used below. It uses internally the function blocks FB_TimeSync and FB_AxisExtrapolateValues.

The FB_TimeSync block initially determines the time difference between the beat effects. Subsequently a correction time is calculated and used for extrapolating the received the information into the future or calculating back into the past, in order to obtain equidistant corrected information without beat effects. The step changes in the kinematic axis variables caused by the beat effect are corrected through small changes across the complete interval between two beat effects.

 

Two techniques that differ in terms of detail are available for extrapolation of the set values. The first technique only uses the set velocity for extrapolating the set position:

AxisOut.fPosSoll:=AxisIn.fPosSoll + AxisIn.fVeloSoll * fTimeCorrection;

AxisOut.fVeloSoll:=AxisIn.fVeloSoll;

 

Furthermore, the set acceleration may also be used for extrapolating the set position and set velocity:

AxisOut.fPosSoll:=AxisIn.fPosSoll + AxisIn.fVeloSoll*fTimeCorrection+ 0.5 * AxisIn.fAccSoll *fTimeCorrection^2;
AxisOut.fVeloSoll:=AxisIn.fVeloSoll + AxisIn.fAccSoll *fTimeCorrection;

 

The second method, i.e. extrapolation taking onto account acceleration, is used as standard. If no adequately smooth acceleration value is available, application of the acceleration deactivated as described under FB_AxisExtrapolateValues.

The corrected axis information is made available as NCTOPLC_AXLESTRUCT.

Example

The example tcremotesync_sample.zip consists of the following files:

 

sample_axissync_master.tsm

System manager setup of the sending PC. An axis is simulated ("MASTER") and its information sent as network variables via RT Ethernet.

 

sample_axissync_slave.tsm

System manager setup of the receiver. The information sent by the sender is received by the RT Ethernet device and linked with the variables of the PLC project. A simulated axis ("corrected master") is linked with the PLC inputs ("Nc2PlcAxis") and outputs ("Plc2NcAxis") for external set value generation. The corrected master information is available as PLC output ("MAIN.MasterNcToPlcFeedback").

 

sample_axissync.pro

PLC project for the receiver. FB_SyncAxis is called in MAIN. Input iCycleIndex is of particularly significance, since this cyclically updated index forms the basis for the whole control system. The original master axis information is transferred with the parameter AxisIn, the modified values are available as SyncAxis.AxisOut. A rudimentary state machine for controlling the NC axis is also implemented in the project.

 

sample_axissync.scp

ScopeView template.