MC_CamTableSelect
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.
Inputs
VAR_INPUT
Execute : BOOL;
Periodic : BOOL;
MasterAbsolute : BOOL;
SlaveAbsolute : BOOL;
CamTableID : MC_CAM_ID;
END_VAR
Execute | The command is executed with a rising edge at input Execute. |
Periodic | Periodic is TRUE if the cam plate is repeatedly cyclically. |
MasterAbsolute | At the moment not in use. |
SlaveAbsolute | At the moment not in use. |
CamTableID | ID of the cam plate used for coupling |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Done | Becomes TRUE, if the cam plate was created successfully. |
Busy | The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. When Busy becomes FALSE again, the function block is ready for a new command. At the same time one of the outputs, Done or Error, is set. |
Error | Becomes TRUE, as soon as an error occurs. |
ErrorID | If the error output is set, this parameter supplies the error number. |
Inputs/outputs
VAR_IN_OUT
Master : AXIS_REF;
Slave : AXIS_REF;
CamTable : MC_CAM_REF;
END_VAR
Master |
Axis data structure of the master - currently not used. |
Slave |
Axis data structure of the slave - currently not used. |
CamTable |
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 uniquely within the system. Among other parameters it contains the current axis status, including position, velocity or error status.