MC_CamInfo

MC_CamInfo 1:

The MC_CamInfo function block is used to determine data on the current state and the 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.

MC_CamInfo 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 3: Inputs

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

Name

Type

Description

Execute

BOOL

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

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 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 5: Outputs

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

Name

Type

Description

Done

BOOL

Becomes TRUE, if the command was executed successfully.

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.

CamInfo

MC_CamInfoData

The CamInfo data structure contains all the data determined about the cam plate coupling