kernelv_get_acs_actual_positions()

Prototype

KERNELV_RETURN

kernelv_get_acs_actual_positions(unsigned long int* positions,
                                                       unsigned long int maxByteSize,
                                                       unsigned long int* returnSize);

Description

The actual ACS positions of all axes existing in the CNC are returned in an array.

To calculate actual positions, a position control loop is simulated internally in the CNC and the mechanical behaviour of the axis is simulated by a PT2 element.

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 calling application must provide at least the number of axes* sizeof(signed long int) bytes to return all position 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

unsigned long int*

Pointer to the memory area for the axis positions to be returned.

maxByteSize

unsigned long int

Size of the memory area for the axis positions.

returnSize

unsigned long int*

Number of bytes returned in positions.

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. The number of bytes required is returned in the returnSize parameter.