Read out error message in the form of a string kernelv_get_error()
Prototype
[ret, err_id, err_msg, err_str_length] | get_error(vnck: ctypes.CDLL) |
Description
Reads out error messages of the simulation CNC: Error messages are read out for all channels. As several error messages can occur during one CNC cycle, the function must be called cyclically until it returns the error ID 0.
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.
In any case, a value is assigned to the "errorId” parameter.
If this function is used at the same time as kernelv_read_error(), please note that the function also calls kernelv_read_error() internally. The function kernelv_get_error_message_string() should be used to read an error string when the function kernelv_read_error() is used.
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. |
err_id | int (unsigned) | Error message ID. |
err_msg | str | Error message |
err_str_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_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. The number of bytes required is returned in the returnSize parameter. |