Project

General

Profile

6.1.2. Working with controller in Matlab

Libximc library can be used to work with controller in Matlab.

Note: SDK requires Microsoft Visual C++ Redistributable Package 9.0.307291 (provided with SDK - vcredist_x86 or vcredist_x64).

Extract files from libximc development kit. Copy ximc.h, win64\libximc.dll, win64\bindy.dll, win64\xiwrapper.dll, win64\wrappers\matlab\libximc_thunk_pcwin64.dll and win64\wrappers\matlab\ximc.m to examples\testmatlab if you are using 64-bit Matlab environment or copy ximc.h, win32\libximc.dll, win32\bindy.dll, win32\xiwrapper.dll and win32\wrappers\matlab\ximcm.h if you are using 32-bit one. Connect the controller to the PC and run the file testximc.m.

In the command window you will see the output of the example which reports controller status.

You can call libximc functions from Matlab program this way: define the path to the libximc.dll, bindy.dll and xiwrapper.dll dynamic link libraries and its header ximc.h and additional to libximc_thunk_pcwin64.dll and ximc.m files if you are using 64-bin environment. Use loadlibrary Matlab function once to load libximc library, then use calllib Matlab function to call desired libximc function. You will find a list of libximc functions and their input and output parameters in the Programming guide.