kernelv_ch_get_filename()

Prototype

[ret, filename]

ch_get_filename(vnck: ctypes.CDLL, chan_index: int);

Description

Reads the file name of the program currently active in the channel.

Parameter

Name

Type

Meaning

vnck

ctypes.CDLL

Instance of the loaded KernelV DLL.

chan_index

int (unsigned)

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

Return values

Name

Type

Meaning

ret

KERNELV_RETURN (int)

Return value of the native integrated C function.

filename

str

File name of the program currently active in the channel.

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_CNC_RET_MEMORY

-4

The return value(s) does/do not fit into the memory provided. In this case, the required memory including the terminating 0 are returned in the returnLength parameter.