kernelv_ch_get_timer()

Prototype

[ret, time]

ch_get_timer(vnck: ctypes.CDLL,

chan_index: int,

timer_id: int);

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

vnck

ctypes.CDLL

Instance of the loaded KernelV DLL.

chan_index

int (unsigned)

Channel index of the channel.

timer_id

int (unsigned)

Counter number for the variable V.G.TIMER[]

Return values

Name

Type

Meaning

ret

KERNELV_RETURN (int)

Return value of the native integrated C function.

time

int (unsigned)

Time in ms.

KERNELV_RETURN

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:
0<= timerID <= 127

ER_NULL_PARAMETER

-35

The timer pointer is not referenced.