kernelv_get_production_time_debug()

Function available as of V3.1.3121.0.

Prototype

[ret, production_time]

get_production_time_debug(vnck: ctypes.CDLL,

file_names: list[str],

timeout_threshold: int = 5000)

Description

Starts an NC program in the corresponding channel for each string that is not empty in the KERNELV_PT_FILES structure. The first element is started in the first channel, the second element in the second channel, etc.

If no program is started in a channel, the string must be 0 at the appropriate index.

Only configured programs can be started in channels.

In addition, a limit value must be set to define the number of cycles after which the program should end. This can be useful if, for example, one of the NC programs remains stuck in an incorrect synchronisation and therefore fails to end. After termination, diagnosis data can then be created using the kernelv_diagnosis_upload() function.

The total processing time of all started NC programs is returned.

Parameter

Name

Type

Meaning

vnck

ctypes.CDLL

Instance of the loaded KernelV DLL.

file_names

List[str]

List containing NC program names. The order determines the associated channels.

timeout_threshold

int (unsigned)

Maximum number of cycles before the NC programs are terminated.

Return values

Name

Type

Meaning

ret

KERNELV_RETURN (int)

Return value of the native integrated C function.

production_time

float

Calculated production time in s.

KERNELV_RETURN

Symbol

Value

Meaning

RET_FINISHED

0

The transferred NC programs have all been successfully ended.

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_INTERNAL_ERROR

-11

An internal error has occurred in the DLL. The value could not be written.

ERR_NC_PROGRAM

-32

An error has occurred in the NC program.

ERR_CH_ERROR_STATE

-33

The channel is in error state.

ERR_TIMEOUT

-36

The timeout limit was reached and the NC program is terminated