kernelv_ch_get_finished_nc_lines()
Prototype
KERNELV_RETURN | kernelv_ch_get_finished_nc_lines(unsigned long int chanIndex, |
Description
Returns the NC lines executed for the specified channel during the last call of kernelv_do_cycle(). Up to 20 NC blocks can be executed for each call of kernelv_do_cycle().
An array of structures of the type KERNELV_NC_LINE_DATA is returned.
The number of entries returned can be calculated by means of returnLength/sizeof(KERNELV_NC_LINE_DATA).
The breakdown of the structure is described in the section entitled Struct KERNELV_NC_LINE_DATA.
Parameter
Name | Type | Meaning |
chanIndex | unsigned long | Channel index |
ncLineData | KERNELV_NC_LINE_DATA* | Pointer to the memory area to which the data of the executed NC lines is to be written. |
maxByteSize | unsigned long | Size of the provided memory area in bytes. |
returnLength | unsigned long* | Pointer to the memory area to which the actually returned bytes are to be written. |
Return values
Symbol | Value | Meaning |
RET_FINISHED | 0 | The function was executed without error. |
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_CNC_RET_MEMORY | -4 | The return value(s) does/do not fit into the memory provided. In this case, the number of actually required bytes is returned in returnLength |