MC_CamInfo_V2

MC_CamInfo_V2 1:

The MC_CamInfo_V2 function block obtains data relating to the current state and current parameterization of a cam plate coupling. The command assumes that the slave axis is coupled by a cam plate. If the AtMasterPosition input is TRUE, not the current state but the state related to the specified master position is determined. The data obtained is placed into the CamInfo data structure. For multi-cam plate coupling, the CamTableId also has to be transferred explicitly. If a single cam plate is involved in the coupling, the CamTableId can be set to 0.

MC_CamInfo_V2 2:

If the coupled axis group gets into an error situation (e.g. emergency stop), the function block will return the most recent valid state of the coupling. The function block must be called before decoupling the slave. The data that has been obtained can be used to restore the coupling to the original axis position.

MC_CamInfo_V2 3: Inputs

VAR_INPUT
   Execute          : BOOL;
   CamTableId       : BOOL;
   AtMasterPosition : BOOL;
   MasterPosition   : LREAL;
END_VAR

Name

Type

Description

Execute

BOOL

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

CamTableId

BOOL

For multi-cam plate coupling, this has to be transferred explicitly, in order to identify the cam unambiguously within the system.

AtMasterPosition

BOOL

If AtMasterPosition is TRUE, the data related to the specified MasterPosition is determined. Otherwise the data refers to the current master position.

MasterPosition

LREAL

Master position to which the data that is determined refers. This input parameter is not necessary if AtMasterPosition is FALSE.

MC_CamInfo_V2 4: Inputs/outputs

VAR_IN_OUT
   Slave    : AXIS_REF;
END_VAR

Name

Type

Description

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_CamInfo_V2 5: 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.