MC_PhasingRelative

MC_PhasingRelative 1:

This function block commands a relative phase shift in the master position of a synchronized slave axis. It is only valid for camming synchronization. The master axis is not aware of the phase shift.

Syntax

Definition:

FUNCTION_BLOCK MC_PhasingRelative
VAR_INPUT
    Master            : Type_Master1D;
    Slave             : Type_Phasing1D;
    Execute           : BOOL;
    PhaseShift        : LREAL;
    Velocity          : LREAL;
    Acceleration      : LREAL;
    Deceleration      : LREAL;
    Jerk              : LREAL;
END_VAR
VAR_OUTPUT
    Done              : BOOL;
    Busy              : BOOL;
    Active            : BOOL;
    CommandAborted    : BOOL;
    Error             : BOOL;
    ErrorId           : UDINT;
    CoveredPhaseShift : LREAL;
END_VAR

MC_PhasingRelative 2: Inputs

Name

Type

Default

Description

Master

Type_Master1D

 

Reference to the master axis

Slave

Type_Phasing1D

 

Reference to the slave axis

Execute

BOOL

 

Trigger the command with rising edge.

PhaseShift

LREAL

#Invalid

Additional phase difference in master position of the slave axis ([PosUnit])

Velocity

LREAL

#Invalid

Maximum velocity ([PosUnit]/s, positive)

Acceleration

LREAL

#Invalid

Maximum acceleration ([PosUnit]/s^2, positive)

Deceleration

LREAL

#Invalid

Maximum deceleration ([PosUnit]/s^2, positive)

Jerk

LREAL

#Invalid

Maximum jerk ([PosUnit]/s^3, positive)

MC_PhasingRelative 3: Outputs

Name

Type

Description

Done

BOOL

Commanded phasing reached

Busy

BOOL

Function block is not finished and new output values are to be expected.

Active

BOOL

Function block has active control on the axis.

CommandAborted

BOOL

Command is aborted by another command.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

CoveredPhaseShift

LREAL

Accumulated relative phase shift applied so far.

Possible error codes

For this function block, the following values, among others, are possible for the ErrorId output:

Error(Hex)

Error(Dec)

Error type

Description

0x8145

33093

Function Block

Mapping of cyclic interface between NC and PLC is missing (e.g., AXIS_REF, AXES_GROUP_REF, ...). A reference used by the function block (e.g., to an axis, group, mover or other motion object) is not linked to the corresponding NC object, or its cyclic mapping is incomplete.

0x8146

33094

Function Block

Invalid velocity value. The velocity was not set or the entered value is invalid.

0x8151

33105

State

Command is not allowed in current axis state. If the axis has no controller enable, is in error or has been added to a group, some commands are not permitted.

0x81a9

33193

Parameter

Invalid acceleration value. The supplied acceleration value is invalid (e.g. not a finite number, negative or outside the permitted range).

0x81aa

33194

Parameter

Invalid deceleration value. The supplied deceleration value is invalid (e.g. not a finite number, negative or outside the permitted range).

0x81ab

33195

Parameter

Invalid jerk value. The jerk value used for the motion is invalid (e.g., negative, zero, or outside the permitted range of the mover or axis).

An overview of all NC error codes can be found here:

Version information

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6