MC_CamTableSelect

MC_CamTableSelect 1:

With the function block MC_CamTableSelect, a table can be specified and loaded into the NC. The function block creates a new table and simultaneously fills it with data provided by the PLC.

MC_CamTableSelect does not have to be used, if a table created with the TwinCAT cam plate editor is to be used. In this case, simple coupling with MC_CamIn is sufficient.

MC_CamTableSelect 2: Inputs

VAR_INPUT
   Execute        : BOOL;
   Periodic       : BOOL;
   CamTableID     : MC_CAM_ID;
END_VAR

Name

Type

Description

Execute

BOOL

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

Periodic

BOOL

Periodic is TRUE if the cam plate is cyclically repeated.

CamTableID

MC_CAM_ID

ID of the cam plate used for the coupling.

MC_CamTableSelect 3: Inputs/outputs

VAR_IN_OUT
   CamTable : MC_CAM_REF;
END_VAR

Name

Type

Description

CamTable

MC_CAM_REF

The data structure of type MC_CAM_REF describes the data storage for the cam plate in the PLC.

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_CamTableSelect 4: Outputs

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

Name

Type

Description

Done

BOOL

Becomes TRUE if the cam plate was created successfully.

Busy

BOOL

The Busy output becomes TRUE when the command is started with Execute and remains TRUE for 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.