Back to Aurora Vision Library website

You are here: Start » Function Reference » Hardware Support » Nodka » Nodka_Initialize

Nodka_Initialize


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Initializes Nodka NKIO_API SDK.

Syntax

void avl::Nodka_Initialize
(
	Nodka_State& ioState,
	atl::Optional<int> inServerPort,
	const atl::File& inDeviceConfigPath,
	atl::Optional<int> inDeviceLightControllerPort
)

Parameters

Name Type Range Default Description
Input will be modified ioState Nodka_State& Object used to maintain state of the function.
Input value inServerPort Optional<int> 1 - 65535 44100 Port of NodkaServer service.
Input value inDeviceConfigPath const File& Path to nkio_config.ini file with I/O configuration.
Input value inDeviceLightControllerPort Optional<int> 1 - NIL COM port used by the light controller (if supported by the device).

Remarks

This filter can be used to explicitly initialize device parameters before using other Nodka filters.

I/O device driver software

This filter is intended to cooperate with a Nodka device using its vendor SDK and Nodka_Server.exe program. To be able to connect to the device, it is required to install Nodka NKDIO SDK.

Add DLL path to system environment variable may be required.

Recommended Nodka NKDIO SDK version for Aurora Vision Studio usage is v4.1.9. The implementation of all SDK functionality is done in Nodka_Server.exe program. The filters in Aurora Vision Studio work as a client which communicates with the server and they don't use the SDK directly. Only localhost connections are allowed.

It is mandatory to run the Nodka_Server.exe program with administrative privileges and keep it running during the execution of this and other Nodka filters.

For the correct operation of the program, it is required to copy the WinRing0.sys and WinRing0x64.sys files from the SDK directory to the directory where the Nodka_Server.exe file is located. These files are placed in C:\NODKA\NKDIO_SDK\Lib\x86 and C:\NODKA\NKDIO_SDK\Lib\x64 directories by default. Choose those that match your operating system version. Adding the directory to the PATH system variable will likely not work.

To run the program, open the Command Prompt as administrator, navigate to the directory where Nodka_Server.exe file is situated and then run the command `Nodka_Server.exe --port PORT` where 'PORT' is a TCP port on which the server will be listening (an integer value from the range 1-65535). Aurora Vision uses port 44100 by default so it is recommended to choose this one.

The Nodka_Server.exe program can be found in Aurora Vision installation path.

Some ports may operate in reverse logic. For details, refer to the electronic input and output diagram documentation of the device.

Device identification

inServerPort field is used to select a TCP port on which the Nodka_Server.exe is listening. Setting this parameter to 'Auto' will select port 44100 which is the default value. ServerPort can be set to:

  • TCP port - a TCP port on which the Nodka_Server.exe is listening.

inDeviceConfigPath field is used to select a path to the configuration file for a specific Nodka device model. This field cannot be empty for the first Nodka filter used. For each of the following filters with the same value of inServerPort, the value of this field can be set to 'Auto' which would result in using the previously specified configuration file. A new configuration file must be provided for each distinct value of inServerPort. The Nodka NKDIO SDK installer puts the configuration files in C:\NODKA\NKDIO_SDK\ConfigFile directory by default. The SDK does not check if the specified configuration file is correct, so any errors in the configuration file may be ignored by the SDK. DeviceConfigPath can be set to:

  • File path - a path to the configuration file for a specific Nodka device model.

inDeviceLightControllerPort field is used to select the COM port of the on-board light controller. Please note that not all Nodka devices have an on-board light controller. For more information refer to the documentation of the specific model. This field is optional and for devices without the light controller should be set to 'Auto'. DeviceLightControllerPort can be set to:

  • COM port - a COM port of the on-board light controller.