kernelv_ch_get_cs_name()

Prototype

KERNELV_RETURN

ChGetCsName(

uint chanIndex,

ushort csIndex,

out string csName,

uint maxBufferSize);

Description

Returns the name of the coordinate system defined in the NC program.

If no coordinate system is defined in the coordinate system stack at the location defined by csIndex, an empty string is returned and the return value of the function is ERR_CNC_NO_DATA.

Parameter

Name

Type

Meaning

chanIndex

uint

Channel index of the channel.

csIndex

ushort

Index of the coordinate system in the coordinate system stack.

csName

out string

Pointer to the memory location for the coordinate system name.

maxBufferSize

uint

Maximum length of the memory area for the coordinate system name. Default = 256.

Return values

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_CNC_RET_MEMORY

-4

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

ERR_READ_ERR

-26

An error occurred on reading data from the kernelv DLL.

ERR_CNC_NO_DATA

-28

The requested data is not available. No coordinate system is defined in the coordinate system stack at the location specified by the call parameter csIndex. An empty string is returned.

ERR_INVALID_PARAMETER

-30

An invalid parameter was transferred:

The coordinate system index transferred in the parameter csIndex is higher than the maximum possible index in the coordinate system stack.