kernelv_program_error_get_path

Prototype

KERNELV_RETURN

kernelv_program_error_get_path(char *return_string,
                                                     unsigned long * return_length);

Description

Returns the program path used to start the active program.

If the program was started by the absolute specification of a file name, an empty string is returned; if the current active program is a manual block, “-” is returned (less the inverted commas).

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

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 returnLength parameter contains the size in bytes required for returning the string.

Parameter

Name

Type

Meaning

return_string

char*

Pointer to string for the program path. The calling application must provide the memory.

return_length

unsigned long*

Size of memory for the return value. If the return string is longer than the memory provided, nothing is returned.

Either the length of the returned string is returned or the size of the memory area required for the return.

Return values

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.

There is no available NC program specific data relating to an CNC error.