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 visualising a motion function, for example. The complete curve is digitised with a parameterisable 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
Execute |
The command is executed with rising edge. |
CamTableID |
ID of the loaded table (motion function type). |
ValueSelectMask |
The selection mask can be used to specify which data are to be interpolated and returned. The value is formed through addition of individual values of data type MC_ValueSelectType. |
StartPosMaster |
Position value of the master axis of the first interpolated point |
EndPosMaster |
Position value of the master axis of the last interpolated point |
Increment |
Interpolation step size |
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. |