Failed to get reply? | LabJack

Failed to get reply?

3 posts / 0 new
Last post
klgrieve's picture
Failed to get reply?

I added a question over a week ago - but it seems to have vaished into the aether...

Under Win 10 and Matlab 2016b I'm trying to load my U3 but get:

Error using calllib
Library was not found

Error in ljud_OpenLabJack (line 6)
[Error address ljHandle] = calllib('LabJackUD','OpenLabJack',DeviceType,ConnectionType,Address,FirstFound,0);

Error in VSM>VSM_OpeningFcn (line 37)
[Error, ljHandle] = ljud_OpenLabJack(LJ_dtU3,LJ_ctUSB,'1',1); % Returns ljHandle for open LabJack

The lib fil is in the C:\Program Files(x86)\LabJack\Drivers folder - how do I get this to load?


ken - I hope this message gets through!

LabJack Support
labjack support's picture
We moderate posts, so they

We moderate posts, so they need approval before they are public. In your case though, I don't see any previous posts from user klgrieve that are awaiting approval. Somehow your previous post didn't make it to us. To answer your question:

If loading the library direct, you first need to load the library indicating its name and header file with the loadlibrary function, and then use calllib. The lib file shouldn't be neccessary. For example:

header='C:\Program Files (x86)\LabJack\Drivers\LabJackUD.h';
[notfound, warnings] = loadlibrary('LabJackUD', header);
%If library is loaded, you can now use calllib with the library.

We provide two sets of MATLAB examples for Windows.

One set of examples use the recommended method of using our .NET interface with MATLAB, and the older examples use loadlibrary and calllib functions. Note if using the older examples and its functions, update the header file path in the ljud_LoadDriver.m file for your system which is probably 'C:\Program Files (x86)\LabJack\Drivers\LabJackUD.h'.

klgrieve's picture
Thanks, found the problem -

Thanks, found the problem - my calllib was calling a capitalzed name (LabJackjUD)! Now that i have the correct name (labjackud), all is well.