kernelv_startup_instance()

Prototype

KERNELV_RETURN

kernelv_startup_instance (unsigned long cycleTime,
                           char* startupFile
                           char* instancePrefix);

Description

Start the simulation CNC:

This function permits several applications to run on one computer. Each application uses a single and therefore a separate instance of the kernelv DLL. Here, a unique instance identifier must be transferred in the call parameter instancePrefix and is valid for the entire computer.

The maximum length of the string that may be transferred as an instance identifier is defined by the constant KERNELV_INSTANCE_PREFIX_MAX_LEN. If a longer string is transferred, the start-up is not executed and the function returns the value ERR_PREFIX_TOO_LONG (-23).

It is not possible to run several instances of the kernelv DLL in one application.

Parameter

Name

Type

Meaning

cycleTime

unsigned long

Cycle time us.

startupFile

char *

Path and name of the start-up file.

instancePrefix

char *

Unique instance identifier.

Return values

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error.

ERR_DOUBLE_KERNEL

-6

An instance of the simulation CNC is already running.

ERR_SHM_STARTUP

-7

Internally used shared memories could not be created when the CNC kernel was started.

ERR_STARTUP

-8

An error occurred on starting the simulation CNC. Possible causes are missing parameter lists or incorrect entries in parameter lists.

ERR_NO_LICENSE

-17

No license was found for the use of the kernelv DLL.

ERR_REGISTRY_ACCESS

-19

An error occurred when an attempt was made to read values from the Windows registry.

ERR_PREFIX_TOO_LONG

-23

When the function kernelv_startu_prefix() was called, the transferred instance identifier is too long with the result that the internally generated names for the shared memories used no longer fit in the memory provided.

ERR_STARTUP_CHAN_INIT

-31

When kernelev-Dll was started, it was not possible to execute the initialisation of the configured NC channels.

Notice

notice

Depending on the number of axes and channels in the configuration used, the start of the CNC kernel may take 20 - 30 seconds.