MC_CombineAxes

This function block assigns a combined setpoint curve of two axes (Master1 and Master2) to a 3rd axis (slave). The CombineMode parameter of the MC_CombineMode type specifies whether the setpoint curves are added or subtracted in the combination. In addition, ratios can be specified as weighting factors for Master1 and Master2.

VAR_IN_OUT

Variable name

Data type

Description

Master1

AXIS_REF

Reference to a logical device (name of the logical device)

See also AXIS_REF.

Master2

AXIS_REF

Reference to a logical device (name of the logical device)

See also AXIS_REF.

Slave

AXIS_REF

Reference to a logical device (name of the logical device)

See also AXIS_REF.

VAR_INPUT

Variable name

Data type

Description

Execute

BOOL

Start execution of the module.

CombineMode

MC_CombineMode

Combination of the setpoint curves:

  • mcAddAxes: Add the setpoint curves of Master1 and Master2.
  • mcSubAxes: Subtract the setpoint curve of Master2 from the setpoint curve of Master1.

GearRatioNumeratorM1

DINT

Numerator ratio Master1 – Slave

GearRatioDenominatorM1

UDINT

Denominator ratio Master1 – Slave

GearRatioNumeratorM2

DINT

Numerator ratio Master2 – Slave

GearRatioDenominatorM2

UDINT

Denominator ratio Master2 – Slave

VAR_OUTPUT

Variable name

Data type

Description

InSync

BOOL

 

Busy

BOOL

Function block is active

Active

BOOL

Function block controls the axis

CommandAborted

BOOL

The function block was canceled by another command

Error

BOOL

An error has occurred in the function block

ErrorID

MC_ErrorId

Error number

This function block can be used to overlay two curve profiles, for example. In the following trace recording you can see how two sine curves of different period durations are additively superimposed:

Blue

  Curve profile of Master1

Green

  Curve profile of Master2

Red

  Resulting curve profile of the slave axis