kernelv_ch_get_active_cs_index()

Prototype

[ret, cs_index]

ch_active_cs_index(vnck: ctypes.CDLL,

chan_index: int);

Description

Returns the index of the active coordinate system.

Even if no coordinate system is defined in the NC program, there is always a basic coordinate system at coordinate system stack level 0. Its rotation matrix is the standard matrix and its shift vector is the zero vector.

Parameter

Name

Type

Meaning

vnck

ctypes.CDLL

Instance of the loaded KernelV DLL.

chan_index

int (unsigned)

Channel index of the channel.

Return values

Name

Type

Meaning

ret

KERNELV_RETURN (int)

Return value of the native integrated C function.

cs_index

int (unsigned)

Index of the coordinate system in the coordinate system stack.

KERNELV_RETURN

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error.

ERR_INVALID_CHAN

-1

The transferred channel index is higher than the number of configured channels -1.

ERR_CNC_NOT_INIT

-3

The simulation CNC kernel was not yet initialised.

ERR_READ_ERR

-26

An error occurred on reading data from the kernelv DLL.