MC_SyncSlaves

PLCopen motion icon

 Function Block - Allows the application to specify what slave axes are to be synchronized and which master they follow.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to queue the synchronization of a list of slave axes.

Master

AXIS_REF

1 to 256

N/A

No default

Master axis identifier.

SlaveCount

AXIS_REF

1 to 256

N/A

No default

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 (zero), the list of synchronized slaves for the specified Master axis is cleared.
  • The AXIS_NUM element of the AXIS_REF structure must be in the range.

SlaveList

UINT

1 to 32

N/A

No default

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.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

Indicates the synchronized slave assignments were completed without error.

Error

BOOL

FALSE, TRUE

N/A

Indicates an invalid input was specified.

ErrorID

INT

 

 

Indicates the error if the Error output is set to TRUE.

See PLCopen Function Block ErrorIDs.

Remarks

  • See Function Blocks - General Rules about how inputs and outputs work.
  • After this function block is executed successfully, all the slave axes specified at the SlaveList input start their slave moves (i.e., MC_CamIn, MC_GearIn, 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.

Figure 1: MC_SyncSlaves

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.

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_SyncSlaves ST example *) 
// Inst_MC_SyncSlaves is an instance of MC_SyncSlaves function block
Inst_MC_SyncSlaves( SyncSlaves, Axis1, SlaveCount, SlaveList );

See Also