MC_WriteParameter
Parameters for the axis can be written with the function block MC_WriteParameter.
![]() | In this case "axis" refers to the TwinCAT NC axis and not the drive. |
Inputs
VAR_INPUT
Execute : BOOL;
ParameterNumber : INT;
Value : LREAL;
END_VAR
Execute | The command is executed with the rising edge. |
ParameterNumber | Number of the parameter to be written. |
Value | This LREAL value is written. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Done | Becomes TRUE, if the parameters were written successfully. |
Busy | The Busy output becomes TRUE when the command is started with Execute and remains TRUE 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, CommandAborted or Error, is set. |
Error | Becomes TRUE if an error occurs. |
ErrorID | If the error output is set, this parameter supplies the error number |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Axis | Axis data structure |
The axis data structure of type AXIS_REF addresses an axis unambiguously within the system. Among other parameters it contains the current axis status, including position, velocity or error state.