kernelv_ax_set_position()
Prototype
KERNELV_RETURN | kernelv_ax_set_position (unsigned long int axisIndex, |
Description
Sets the actual position of the axis to the position specified in the position parameter. This function can only be executed if no NC program is active in the channel to which the axis currently belongs. If an attempt is made to set the axis position while the NC program is active, adoption of the position is refused and the return value ERR_INVALID_STATE is returned.
Parameter
Name | Type | Meaning |
axisIndex | unsigned long | Index of the axis. |
position | unsigned long | New actual position of the axis in 0.1 µm. |
Return values
Symbol | Value | Meaning |
RET_FINISHED | 0 | The function was executed without error. |
RET_BUSY | 1 | The function is currently being executed, but has not yet been completed. The API function must continue to be called. |
ERR_CNC_NOT_INIT | -3 | The simulation CNC kernel has not yet been initialised. |
ERR_INVALID_STATE | -5 | The CNC channel of the axis is in the wrong state for executing a function. |
ERR_INVALID_AX | -9 | The transferred axis index is higher than the number of configured axes –1 or zero. |
ERR_INVALID_AX | -9 | The transferred axis index is higher than the number of configured axes - 1 |
ERR_AXIS_ERROR | -10 | The CNC axis indicates an error. The CNC additionally issues an error message. |