kernelv_get_production_time()
Prototype
[ret, production_time] | get_production_time(vnck: ctypes.CDLL, file_names: list[str]) |
Description
Starts an NC program in the corresponding channel for each file path in the list. 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.
The total production time of all started NC programs is returned in seconds. If NC programs are not terminated, a timeout limit can be defined using the kernelv_get_production_time_debug() function to then create diagnosis data using the kernelv_diagnosis_upload() function.
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. |
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. |