kernelv_ch_get_programname()

Prototype

KERNELV_RETURN

ChGetProgramname(uint chanIndex,
                                                   out string programname,
                                                   ushort nameLength,
                                                   out ushort returnLength);

Description

Reads the file name of the program currently active in the channel. The program name is specified at the start of the NC program (see also the programming instructions).

Parameter

Name

Type

Meaning

chanIndex

uint

Channel index of the channel whose program name is to be read.

programname

out string

The program name is returned.

nameLength

ushort

Length of the memory area for the program name.

returnLength

out ushort

The number of characters in the file name +1 is returned.

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 required memory is returned in the returnLength parameter.