kernelv_get_wcs_target_positions()

Prototype

KERNELV_RETURN

GetWcsTargetPositions(out int [] positions);

Description

The WCS target positions of all axes existing in the CNC are returned in an array.

The target position is the axis position at the end of the currently executed motion block.

Position values have a resolution of 0.1 µm for translatory axes or 1*10-4° for spindles or modulo axes.

The error code ERR_CNC_RET_MEMORY is returned if the memory provided by the calling application is not sufficient for returning all values.

The order of the axis positions in the returned array is equal to the configuration order of the axes.

Parameter

Name

Type

Meaning

positions

out int []

Contains the positions of all axes after successful call. The order corresponds to the axis configuration.

Return values

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error.

ERR_CNC_NOT_INIT

-3

The simulation CNC kernel was not yet initialised.

ERR_CNC_RET_MEMORY

-4

The return value(s) does/do not fit into the memory provided. In this case, the required memory is returned in the returnSize parameter.