MC_ReadMotionFunctionValues
The function block MC_ReadMotionFunctionValues can be used to read the interpolated data of a motion function in the form of a table.
This function can be used for visualizing a motion function, for example. The complete curve is digitized with a parameterizable step size. The data determined in this way are easier to display then a motion function.
Inputs
VAR_INPUT
Execute : BOOL;
CamTableID : MC_CAM_ID;
ValueSelectMask : UINT; (* MC_ValueSelectType; position, velocity, acceleration, jerk… *)
StartPosMaster : LREAL; (* master position of first point *)
EndPosMaster : LREAL; (* master position of last point *)
Increment : LREAL; (* increment of master position *)
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is executed with the rising edge. |
CamTableID | MC_CAM_ID | ID of the loaded table (motion function type). |
ValueSelectMask | UINT | The selection mask can be used to specify which data are to be interpolated and returned. The value is created by adding single values of the data type MC_ValueSelectType. |
StartPosMaster | LREAL | Position value of the master axis of the first interpolated point. |
EndPosMaster | LREAL | Position value of the master axis of the last interpolated point. |
Increment | LREAL | Interpolation step size |
Inputs/outputs
VAR_IN_OUT
CamTable : MC_CAM_REF;
END_VAR
Name | Type | Description |
---|---|---|
CamTable | MC_CAM_REF | Reference to the table (structure). |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | Becomes TRUE if the data have been read 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. |