kernelv_program_error_get_program_name

Prototype

[ret, program_name, length]

program_error_get_program_name(vnck: ctypes.CDLL);

Description

Returns the program name of the active NC program.

The program name is specified at the start of the main program by a "%” character; for more information see [PROG]. If no program name was specified for the NC program, an empty string is returned.

A zero terminated string is returned. The number of returned bytes is returned in return_length, i.e. the terminating zero is included.

If the memory provided by the calling application is too small for the string to be returned, the return value ERR_CNC_RET_MEMORY is returned In this case, the length parameter contains the size in bytes required to return the string.

Parameter

Name

Type

Meaning

vnck

ctypes.CDLL

Instance of the loaded KernelV DLL.

Return values

Name

Type

Meaning

ret

KERNELV_RETURN (int)

Return value of the native integrated C function.

program_name

str

Name of the program.

length

int (unsigned)

Actual length of the error message in bytes.

KERNELV_RETURN

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error.

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 ‘length’ parameter.

ERR_CNC_NO_DATA

-28

The requested data is not available.