kernelv_ch_get_timer()
Prototype
KERNELV_RETURN | kernelv_ch_get_timer (unsigned long int chanIndex, unsigned short int timerId, unsigned long int* time); |
Description
This returns the time in ms and is stored in the specified channel in the variable V.G.TIMER[<counter_number>].
Parameter
Name | Type | Meaning |
chanIndex | unsigned long int | Channel index |
timerId | unsigned short int | Counter number for the variable V.G.TIMER[] |
Time | unsigned long int* | Pointer to the memory area where the time in ms is 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_INVALID_PARAMETER | -30 | The transferred parameter timerld is invalid. Valid range for timerID: |
ER_NULL_PARAMETER | -35 | The timer pointer is not referenced. |