Function BlockMC_SyncSlavesPLCopen motion icon

Description

This function block allows the application to specify what slave axes are to be synchronized and which master they follow. After this function block is executed successfully, all the slave axes specified at the SlaveList input start their slave moves (i.e. MC_GearIn, MC_CamIn, etc.) on the same servo interrupt for a synchronized slave start. When a slave move is commanded for one of the slave axes listed, the slave move is queued but the motion is held off until all of the listed slaves have queued their slave moves.

MC_SyncSlaves

Figure 8-154: MC_SyncSlaves

Arguments

For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules

Input

Execute

Description

A positive transition of this input causes the function block to execute

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

Master

Description

Master axis identifier

 

Data type

AXIS_REF

 

Range

1 - 256

 

Unit

N/A

 

Default

SlaveCount

Description

The number of slave axes listed in the SlaveList array input that are to be synchronized. This number must not be greater than the declared size of the SlaveList array. If this number is 0, the list of synchronized slaves for the specified Master axis is cleared.

 

Data type

AXIS_REF

 

Range

1-256
The AXIS_NUM element of the AXIS_REF structure must be in the range [1-256]

 

Unit

N/A

 

Default

SlaveList

Description

The list of slave axes that are to be synchronized. Each element of this array contains a unique axis number. The axis number must not be the same as the Master axis number.

 

Data type

UINT

 

Range

1-32

 

Unit

N/A

 

Default

Output

Done

Description

Indicates the synchronized slave assignments were completed without error

 

Data type

BOOL

Error

Description

Indicates an invalid input was specified

 

Data type

BOOL

ErrorID

Description

Indicates the error if Error output is set to TRUE

See table in PLCopen Function Block ErrorID Output

 

Data type

INT

Usage

Call MC_SyncSlaves to specify the slave axes to synchronize.

Call each slave move (e.g. MC_GearIn) for each slave axis. The motion is held off until all the slave moves have been queued.

After all the slave moves have been queued, the interpolation for all the slave axes begin on the same servo interrupt, providing a synchronized start.

The master axis can be in motion prior to this sequence, or the master can be commanded after all the slave moves are queued.

Related Functions

MC_GearIn

MC_GearInPos

MC_CamIn

Example

Structured Text

 

(* MC_SyncSlaves ST example *)

// Inst_MC_SyncSlaves is an instance of MC_SyncSlaves function block

Inst_MC_SyncSlaves( SyncSlaves, Axis1, SlaveCount, SlaveList );

 

Ladder Diagram

MC_SyncSlaves: LD example

Go back to the top of the page [Top]