MC_CamIn

This function block performs a slave axis movement based on the cam description of the CamDescription type specified at the CamTableID input, which follows the master axis.

VAR_IN_OUT

Variable name

Data type

Description

Slave

AXIS_REF

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

See also AXIS_REF.

Master

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 function block.

CamTableID

MC_CAM_ID

Identifier of the cam description to be used (identifier of the cam description generated with the MC_CamTableSelect function block or object of type CamDescription)

StartMode

MC_START_MODE

Select the initial position of the cam profile in relation to the positions of the master and slave axes:

  • mcAbsolute
  • mcRelative
  • mcMasterRelativeSlaveRelative
  • mcMasterRelativeSlaveAbsolute
  • mcMasterAbsoluteSlaveRelative
  • mcMasterAbsoluteSlaveAbsolute

RampInMode

E_RampInMode

Select the behavior when synchronizing:

  • eDirect: Do not calculate a transition profile. The transition to the cam profile is direct. This can lead to jumps in the setpoint curve.
  • eProfileBased: Calculate the transition profile based on the dynamic values RampInVelocity, RampInAcceleration, RampInDeceleration and RampInJerk so that a continuous setpoint curve is achieved.

MasterOffset

LREAL

Shift of the cam profile in the X direction in relation to the initial position specified by MC_CamIn.StartMode

SlaveOffset

LREAL

Shift of the cam profile in the Y direction in relation to the initial position specified by MC_CamIn.StartMode

MasterScalingNumerator

DINT

Numerator of the master scaling

MasterScalingDenominator

DINT

Denominator of the master scaling

SlaveScalingNumerator

DINT

Numerator of the slave scaling

SlaveScalingDenominator

DINT

Denominator of the slave scaling

RampInVelocity

LREAL

Speed for profile-based synchronization with E_RampInMode "eProfileBased"

RampInAcceleration

LREAL

Acceleration for profile-based synchronization with E_RampInMode eProfileBased

RampInDeceleration

LREAL

Deceleration for profile-based synchronization with E_RampInMode eProfileBased

RampInJerk

LREAL

Jerk for profile-based synchronization with E_RampInMode eProfileBased

Direction

MC_DIRECTION

Modulo reference if the master or slave is a modulo axis.

BufferMode

MC_BUFFER_MODE

Select the chronological sequence of the function block.

VAR_OUTPUT

Variable name

Data type

Description

InSync

BOOL

Slave axis is synchronous to the master axis

Busy

BOOL

Function block is active

Active

BOOL

Function block controls the axis

CommandAborted

BOOL

Function block was canceled by another command

Error

BOOL

An error has occurred in the function block

ErrorID

WORD

Error number

EndOfProfile

BOOL

PLC cycle in which the right (when the master axis moves in the positive direction) or left (when the master axis moves in the negative direction) curve limit is crossed.