kernelv_ch_get_blocknumber()

Prototype

KERNELV_RETURN

ChGetBlocknumber(uint chanIndex,
                                                out int blocknumber);

Description

Reads the currently executed block number of an NC program.

Parameter

Name

Type

Meaning

chanIndex

uint

Channel index of the channel whose block number is to be read.

blocknumber

out int

The block number is returned.

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.