kernelv_ch_suspend()

Prototype

KERNELV_RETURN

kernelv_ch_suspend (unsigned long int chanIndex);

Description

The program currently running in the channel is stopped. The channel state changes to SIMU_CNC_STATE_HOLD.

It is only possible to stop a program if an NC program is currently being executed in the channel, i.e. when the channel is in the SIMU_CNC_STATE_ACTIVE state. The function returns the value ERR_INVALID_STATE if it is called while the channel is in another state.

Parameter

Name

Type

Meaning

chanIndex

unsigned long

Channel index of the channel that is to be stopped.

Return values

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error.

RET_BUSY

1

The function is currently being executed, but has not yet been completed.

The API function must continue to be called.

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_STATE

-5

The CNC channel is in the wrong state to execute a function.