TS5050 | TwinCAT NC Camming

FUNCTION_BLOCK MC_CamTableSelect

MC_CamTableSelect 1:

With the function block MC_CamTableSelect, a table can be specified and loaded into the NC. The 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.

VAR_INPUT

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

Execute : The command is executed with rising edge.

Periodic : TRUE = periodic execution, FALSE = no periodic execution

MasterAbsolute : TRUE = master absolute, FALSE = master relative

SlaveAbsolute : TRUE = slave absolute, FALSE = slave relative.

CamTableID : ID of the loaded table.

VAR_OUTPUT

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

Done : Becomes TRUE, if the function was executed successfully.

Error : Becomes TRUE, as soon as an error occurs.

ErrorID : Supplies the error number when the Error output is set

VAR_IN_OUT

VAR_IN_OUT
        Master :                NCTOPLC_AXLESTRUCT;
        Slave :                 NCTOPLC_AXLESTRUCT;
        CamTable :      MC_CAM_REF;
ND_VAR

Master : Axis structure of the master.

Slave : Axis structure of the slave.

CamTable : Reference to the table (structure).

Development Environment Target System PLC Libraries to include
TwinCAT v2.9 PC (i386) TcNcCamming.Lib