kernelv_ch_get_timer()

Prototype

KERNELV_RETURN

ChGetTimer(uint chanIndex, ushort timerId, out uint 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

uint

Channel index

timerId

ushort

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

time

out uint

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

ER_NULL_PARAMETER

-35

The timer pointer is not referenced.