Block responsible for execution of a phase difference in position between the programmed axes.
Ladder Representation

Execution Features
Program Memory Size |
78 Bytes |
Data Memory Size |
32 Bytes |
Block Structure
Variable Type |
Name |
Data Type |
Description |
VAR_IN_OUT |
Master |
BYTE |
Selection of operation master (0 - Fast digital inputs) (1 - CANopen) (2 - Encoder 1) (3 - Virtual Axis) (4 - Encoder 2) |
Slave |
BYTE |
Selection of operation slave (0 - Real axis) (1 - Virtual 1 axis) |
|
VAR_INPUT |
Execute |
BOOL |
Block enabling |
PhaseShift |
REAL |
Phase shift between master and slave |
|
Velocity |
REAL |
Speed [rpm] |
|
Acceleration |
REAL |
Acceleration [rpm / s] |
|
Deceleration |
REAL |
Deceleration [rpm / s] |
|
VAR_OUTPUT |
Done |
BOOL |
Output enabling |
Busy |
BOOL |
Flag indicating the block has not yet been ended |
|
Active |
BOOL |
Block flag with control on the axis |
|
CommandAborted |
BOOL |
Flag of aborted command |
|
Error |
BOOL |
Error in the execution flag |
|
ErrorID |
WORD |
Identifier of the occurred error |
|
VAR |
MC_GEARIN_INST_0 |
MC_GEARIN |
Instance of access to block structure |
Operation
When this block detects a leading edge on Execute, it checks the synchronism between master and slave and sends a command to motion the master axis in order to let it out-of-phase of the slave axis in the magnitude of PhaseShift.
When the MC_PhasingRelative block is executed, the drive does not change the current operating mode. In the execution of the block, the axis status will not change.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code according to the table below.
Code |
Description |
67 |
Drive in the "Disabled" or "Errorstop" status. |
71 |
P202 different from 4. |
73 |
Drive is not in the "Synchronized Motion" status. |
78 |
MC block not executed – Internal fault. |
79 |
Master axis is not in synchronism. |
96 |
MC_PhasingRelative block in execution. |
Example in Ladder



With the position synchronism of the Real Axis with the Quick Counter through the MC_GearInPos block, and with the occurrence of an up transition in PHASING_EXECUTE, the MC_PhasingRelative block is executed and a shift of 0.05 turn is applied to the master axis, resulting in a pulse in the speed. The Done output is set while the Execute input is set.
Example in ST
The example below displays the instructions for applying the example above in the ST language.
VAR GEARINPOS_EXECUTE, GEARINPOS_INSYNC, PHASING_EXECUTE, PHASING_DONE : BOOL; GEARINPOS_INST : FB_MC_GearInPos; PHASING_INST : FB_MC_PhasingRelative; END_VAR
GEARINPOS_INST.Execute := GEARINPOS_EXECUTE; GEARINPOS_INST( Master:=0, Slave:=0, RatioNumerator:=1, RatioDenominator:=1, Acceleration:=1000.0, Deceleration:=1000.0, BufferMode:=0); PHASING_DONE := GEARINPOS_INST.InSync;
PHASING_INST.Execute := PHASING_EXECUTE; PHASING_INST( Master:=0, Slave:=0, PhaseShift:=LREAL#0.05, Velocity:=GENERAL_PROFILE_VELOCITY, Acceleration:=GENERAL_PROFILE_ACCELERATION, Deceleration:=GENERAL_PROFILE_DECELERATION); PHASING_DONE := PHASING_INST.Done;
|
|---|