MC_Phasing
The MC_Phasing FB is used to achieve an offset of the slave axis with respect to the master axis. Accordingly, a phase offset of the master axis is specified from the viewpoint of the slave axis and the slave axis tries to eliminate this offset by accelerating or decelerating. The motion is always executed jerk-limited with the constant set input "Jerk”. This value is valid for both "Acceleration" and "Deceleration".
If the optional parameters “Acceleration, “Deceleration” and “Jerk” are not specified or set to <= 0, the dynamic values are taken from the corresponding axis list.
The mechanical analogy is to release the coupling of the master and slave axes for a limited period.
With camming, this FB results in a change in the "apparent" master position from the slave's viewpoint. With gearing, a phase offset is produced between the master and slave by commanding a superimposed motion in the slave. Therefore with gearing, MC_Phasing has the same effect as MC_MoveSuperImposed (to which it is actually converted in the control system).
The dynamic values: With camming, "Velocity", "Acceleration" and "Deceleration" refer to the change in the "apparent" master position from the viewpoint of the slave; but with gearing, they refer to the superimposed motion of the slave axis itself.
Block diagram
FB parameters
VAR_IN_OUT | ||||
Variable name | Data type | Description | ||
Master | AXIS_REF | Axis reference of the master axis. | ||
Slave | AXIS_REF | Axis reference of the slave axis | ||
VAR_INPUT | ||||
Variable name | Data type | Description | ||
Execute | BOOL | Starts the command on the rising edge. | ||
PhaseShift | LREAL | Phase shift between master axis and slave axis, as “seen” by the slave axis. The calculated phase shift is transferred to the slave axis as the master axis position. Value range [-2147483648.0, 2147483647.0] | ||
Velocity | LREAL | Maximum velocity value which may be reached when phasing is generated. This value must be always be specified positive. The velocity is not necessarily achieved. Value range [0.0, 2147483647.0] | ||
Acceleration | LREAL | Maximum acceleration value. This value must be always be specified positive. Value range [0.0, 2147483647.0] | ||
Deceleration | LREAL | Maximum deceleration value. This value must be always be specified positive. Value range [0.0, 2147483647.0] | ||
Jerk | LREAL | Maximum jerk value. This value must be always be specified positive. Value range [0.0, 2147483647.0] | ||
VAR_OUTPUT | ||||
Variable name | Data type | Description | ||
Done | BOOL | Commanded phase offset reached. | ||
CommandAborted | BOOL | TRUE indicates that the command was aborted by another command. | ||
Error | BOOL | Is TRUE if an error occurs in the FB. | ||
ErrorID | WORD | Error identifier |
Behaviour of the FB:
- Phase offset can only be commanded when the slave axis is in the “Synchronised Motion” state.
- If this is not the case, the “Error” output is set to FALSE and “ErrorID” indicates an error value that designates the state the axis is currently in.
- The value range of the “PhaseShift”, “Velocity”, “Acceleration”, “Deceleration” and “Jerk” input variables is monitored and, if it is exceeded, an error number referring to the variable is output at the “ErrorID” output and “Error” is set to TRUE.
- Values for jerk are practical when they correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s. The limit transition to non-jerk-limited velocity control lies at the minimum ramp time of TA. With a value of 0, the maximum ramp time from the axis MDS is used to determine the jerk.
- The function block is retriggerable, i.e. it can send a command when it is in the active state.