MC_SyncSlaves
Description
-
- This function block starts a motion-related action and therefore stores data for calculations and error checking. Please see Calling Function Blocks Multiple Times in the Same Cycle if you are using a dual-core controller.
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 |
|
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
|
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
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