MC_WriteMotionFunction
The function block MC_WriteMotionFunction can be used to write the data of a motion function into the NC. Either the complete function with all interpolation points or only a part can be written. First, the data are stored within the PLC in the structure described by CamTable.
The function block MC_SetCamOnlineChangeMode can be used to specify when the data are read into the cam plate. If activation of the data is to be delayed until the master reaches a certain position, the system will initially queue the written data and activate them at the master position.
The status flag Axis.Status.CamDataQueued (AXIS_REF) can be used to check whether data have been queued (i.e. written but not yet activated).
Inputs
VAR_INPUT
Execute : BOOL;
CamTableID : MC_CAM_ID;
PointID : MC_MotionFunctionPoint_ID;
NumPoints : UDINT;
END_VAR
Execute |
The command is executed with rising edge. |
CamTableID |
ID of the loaded table. |
PointID |
Point ID of the first point of the motion function to be written. |
NumPoints |
Number of motion function points to be written. |
Outputs
VAR_OUTPUT
Done: BOOL;
Busy: BOOL;
Error: BOOL;
ErrorID: UDINT;
END_VAR
Done | Becomes TRUE, if the data were read 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
CamTable : MC_CAM_REF;
END_VAR
CamTable |
Reference to the table (structure). The start address of the table data structure (CamTable.pArray) indicates the first point to be written. |