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?
Thanks,
ken - I hope this message gets through!
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.
https://labjack.com/support/software/examples/ud/matlab
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'.
Thanks, found the problem - my calllib was calling a capitalzed name (LabJackjUD)! Now that i have the correct name (labjackud), all is well.
Ken