MC_Phasing
Usage
This function block:
- Performs a master position phase shift for the slave axis.
- Provides a way to smoothly apply a master offset instead of writing values directly to the Master Offset Parameter 1002.
- Is commonly used along with MC_TouchProbe for performing position corrections on the slave axis in a Mark to Mark registration application.
-
- MC_Phasing performs a similar function to adjusting the MasterOffset input in the MC_CamIn function block.
It has the additional feature of setting the velocity, acceleration, deceleration, and jerk In physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time motion parameters.
Description
- The distance entered at the PhaseShift input is iterated into the Slave axis’s Master Offset.
- This distance is iterated like a MC_MoveRelative move using the specified Velocity, Acceleration, Deceleration, and Jerk In physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time values.
- The difference is that the interpolated command delta is not commanded to the axis but is, instead, added to the Slave axis’s Master Offset.
- This shifts the Master axis’s position as viewed by the Slave axis, causing a change in the Slave axis’s physical position.
- This only affects the Slave axis if it is executing a slave move.
- Subsequent calls to MC_Phasing can abort or blend to an executing MC_Phasing command.
Figure 7-153: MC_Phasing
-
- This function block starts a motion-related action and therefore stores data for calculations and error checking.
See Call Function Blocks Multiple Times in the Same Cycle if using a dual-core controller.
Arguments
See Function Blocks - General Rules for more information about how inputs and outputs work.
Input
Execute | Description | Requests to queue the phase shift |
Data type | BOOL | |
Range | 0, 1 | |
Unit | N/A | |
Default | — | |
Master | Description | Name of a declared instance of the AXIS_REF library function. For more details,Axis Name and Number) |
Data type | AXIS_REF | |
Range | [1,256] | |
Unit | N/A | |
Default | — | |
Slave | Description | AXIS_REF AXIS_NUM is the slave axis number |
Data type | AXIS_REF | |
Range | [1,256] | |
Unit | N/A | |
Default | — | |
PhaseShift | Description | Amount of phase shift |
Data type | LREAL | |
Range | — | |
Unit | User unit | |
Default | — | |
Velocity | Description | Velocity setpoint Setpoint is the target value that an automatic control system, for example PID controller, will aim to reach |
Data type | LREAL | |
Range | — | |
Unit | User unit/sec | |
Default | — | |
Acceleration | Description | Trapezoidal: Acceleration rate S-curve: Maximum acceleration |
Data type | LREAL | |
Range | — | |
Unit | User unit/sec2 | |
Default | — | |
Deceleration | Description | Trapezoidal: Deceleration rate S-curve: Unused |
Data type | LREAL | |
Range | — | |
Unit | User unit/sec2 | |
Default | — | |
Jerk | Description | Trapezoidal: 0 S-curve: Constant jerk |
Data type | LREAL | |
Range | — | |
Unit | User unit/sec3 | |
Default | — | |
BufferMode | Description |
|
Data type | SINT | |
Range | [0,5] | |
Unit | N/A | |
Default | — |
Output
Done | Description | Indicates the phase shift has been completely applied |
Data type | BOOL | |
Busy | Description | High from the moment the Execute input is one-shot to the time the move is ended |
Data type | BOOL | |
Active | Description | Indicates this phase shift is the active phase shift |
Data type | BOOL | |
CommandAborted | Description | Indicates the move was aborted |
Data type | BOOL | |
Error | Description | Indicates an invalid input was specified or the move was terminated due to an error |
Data type | BOOL | |
ErrorID | Description | Indicates the error if Error output is set to TRUE |
Data type | INT |
Example
Structured Text
(* MC_Phasing ST example *) //Inst_MC_Phasing is an instance of MC_Phasing function block
Inst_MC_Phasing(PhasingAxis1, Axis2, Axis1, 1000.0,100.0, 200.0, 200.0, 0, 0 );
See Main on how this function is used in the Hole punch project.