MC_SetCamOnlineChangeMode

MC_SetCamOnlineChangeMode 1:

The function block MC_SetCamOnlineChangeMode specifies the mode for write access to cam plate data.

Cam plates can be modified at runtime via the PLC (see MC_WriteMotionFunction, MC_WriteMotionFunctionPoint). The function block MC_SetCamOnlineChangeMode is used to specify when and how these changes take effect. The set mode affects all subsequent write operations. It is therefore not necessary to call the function block before each write access.

This function specifies the activation mode for modifications but does not affect a change or changeover of cam plates.

MC_SetCamOnlineChangeMode 2: Inputs

VAR_INPUT
   Execute            : BOOL;
   ActivationMode     : MC_CamActivationMode;
   ActivationPosition : LREAL;
   MasterScalingMode  : MC_CamScalingMode;
   SlaveScalingMode   : MC_CamScalingMode;
   CamTableID         : MC_CAM_ID;
   Options            : ST_SetOnlineChangeModeOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge at Execute input.

ActivationMode

MC_CamActivationMode

Defines when and how scaling takes place. (MC_CamActivationMode)

ActivationPosition

LREAL

Optional master position at which scaling is performed (depending on ActivationMode).
If the ActivationMode MC_CAMACTIVATION_ATMASTERCAMPOS is used, the position refers to the unscaled cam plate. If the position in the application refers to the scaled cam plate, it can be divided by the MasterScaling before the function block is called.

MasterScalingMode

MC_CamScalingMode

Type of master scaling. (MC_CamScalingMode)

SlaveScalingMode

MC_CamScalingMode

Type of slave scaling. (MC_CamScalingMode)

CamTableID

MC_CAM_ID

Table ID.

Options

ST_SetOnlineChangeModeOptions

Data structure with additional options:

SynchronousAccess

Writing takes place via synchronous access without a time delay. Should only be used for applications that are extremely time-critical.

MC_SetCamOnlineChangeMode 3: Outputs

VAR_OUTPUT
   Done          : BOOL;
   Busy          : BOOL;
   Error         : BOOL;
   ErrorID       : UDINT;
END_VAR

Name

Type

Description

Done

BOOL

Becomes TRUE when the function has been successfully executed.

Busy

BOOL

The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, Done or Error, is set.

Error

BOOL

Becomes TRUE, as soon as an error occurs.

ErrorID

UDINT

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