MC_Phasing

PLCopen motion icon

 Function Block - Performs a master position phase shift for the slave axis.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to queue the phase shift.

Master

AXIS_REF

1 to 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

Slave

AXIS_REF

1 to 256

N/A

No default

AXIS_REF.AXIS_NUM is the slave axis number.

See AXIS_REF Structure.

PhaseShift

LREAL

No range

User units

No default

Amount of phase shift.

Velocity

LREAL

No range

User unit/sec

No default

Velocity setpoint.

Acceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

See S-curve and Trapezoidal Acceleration / Deceleration.

Deceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration.

Jerk

LREAL

No range

User unit/sec3

No default

Trapezoidal: 0 (zero).

S-curve: Constant jerk.

See S-curve and Trapezoidal Acceleration / Deceleration.

BufferMode

SINT

0 to 5

N/A

No default

  • 0 = Abort.
  • 1 = Buffer.
  • 2 = Blend to active.
  • 3 = Blend to next.
  • 4 = Blend to low velocity.
  • 5 = Blend to high velocity.
  • See Buffer Modes.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

Indicates the phase shift has been completely applied.

Busy

BOOL

FALSE, TRUE

N/A

High from the moment the Execute input is one-shot to the time the move is ended.

Active

BOOL

FALSE, TRUE

N/A

Indicates this phase shift is the active phase shift.

CommandAborted

BOOL

FALSE, TRUE

N/A

Indicates the move was aborted.

Error

BOOL

FALSE, TRUE

N/A

Indicates either:

  • An invalid input was specified.
  • The move was terminated due to an error.

ErrorID

INT

No range

N/A

Indicates the error if Error output is TRUE.

See PLCopen Function Block ErrorIDs.

Remarks

This function block:

  • Provides a way to smoothly apply a master offset instead of writing values directly to the Master Offset Parameter 1002.
  • Is commonly used 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 features of setting the velocity, acceleration, deceleration, and jerk motion parameters.
  • 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 values.
  • The difference is the interpolated command delta is not commanded to the axis but is 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 1: MC_Phasing

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* 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 );