MC_PhasingAbsolute

MC_PhasingAbsolute 1:

The function block MC_PhasingAbsolute can be used to set a phase shift between a master axis and a slave axis. The function block executes a superimposed movement of the slave axis and thus sets a position difference "PhaseShift" between master and slave.

The dynamic values "velocity", "acceleration" and "deceleration" refer to the superimposed movement with which the phase shift is carried out. The movement is always jerk-limited, based on the constant jerk value set in the Jerk parameter. This value applies both to "Acceleration" and "Deceleration".

The phase shift can be used for a simple MC_GearIn coupling, as well as for a coupling with dynamic coupling factor. In the latter case, note that MC_GearInMultimaster is used with Options.AdvancedSlaveDynamics = TRUE (gearing) or MC_CamIn_V2 (camming).

MC_GearInDyn is not supported.

MC_PhasingAbsolute 2: Inputs

VAR_INPUT
    Execute            : BOOL;
    ContinuousUpdate   : BOOL;
    PhaseShift         : LREAL;
    Velocity           : LREAL;
    Acceleration       : LREAL;
    Deceleration       : LREAL;
    Jerk               : LREAL;
    BufferMode         : MC_BufferMode;
    Options            : ST_PhasingOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

ContinuousUpdate

BOOL

If this input is TRUE at the rising edge at the "Execute" input, the "PhaseShift", "Velocity", "Acceleration", "Deceleration" and "Jerk" inputs can be changed during the execution of the command and made effective as quickly as possible.

PhaseShift

LREAL

Phase shift to be set between master and slave axis

Velocity

LREAL

Maximum velocity that may be reached during the phase shift (>=0.01).

Acceleration

LREAL

Maximum acceleration value

Deceleration

LREAL

Maximum deceleration value

Jerk

LREAL

Maximum jerk value

BufferMode

MC_BufferMode

MC_Aborting only

Options

ST_PhasingOptions

Not implemented

MC_PhasingAbsolute 3: Inputs/outputs

VAR_IN_OUT
    Master : AXIS_REF;
    Slave  : AXIS_REF;
END_VAR

Name

Type

Description

Master

AXIS_REF

Axis data structure of the master

Slave

AXIS_REF

Axis data structure of the slave

The axis data structure of type AXIS_REF addresses an axis unambiguously within the system. Among other parameters it contains the current axis status, including position, velocity or error state.

MC_PhasingAbsolute 4: Outputs

VAR_OUTPUT
    Done               : BOOL;
    Busy               : BOOL;
    Active             : BOOL;
    CommandAborted     : BOOL;
    Error              : BOOL;
    ErrorId            : UDINT;
    AbsolutePhaseShift : LREAL;
END_VAR

Name

Type

Description

Done

BOOL

TRUE when the absolute phase shift is established.

Busy

BOOL

TRUE as soon as the command is started with Execute and as long as the phase shift occurs. If "Busy" is FALSE, the function block is ready for a new order. At the same time, one of the outputs "Done", "CommandAborted" or "Error" is set.

Active

BOOL

Indicates that the command is executed. If the command was buffered, it becomes active once a running command is completed.

CommandAborted

BOOL

TRUE if the command could not be executed completely. The axis was stopped or the current command was replaced by another Move command.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.

AbsolutePhaseShift

LREAL

Absolute phase shift

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2