Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

LabJack UE9 and Matlab Error Loading Library


  • Please log in to reply
1 reply to this topic

#1 paula

paula
  • Members
  • 18 posts

Posted 04 April 2013 - 02:02 AM

I am trying to set up my LabJack UE9 with Labview. I have tried running the lhud_loadDriver.m file and I keep getting the same error. I've also tried using the UE9_Simple_Analog.m file and the same error occurs.

??? Error using ==> loadlibrary at 368
Failed to preprocess the input file.
 Output from preprocessor is:'cl' is not recognized as an internal or external command,
operable program or batch file.

Error in ==> ljud_LoadDriver at 10
	loadlibrary('labjackud',header);

I am using Matlab R2010a 64 bit.
I have both Microsoft Visual Studio 9.0 and 10.0 installed on my PC.
I have checked the instructions at this location http://mathforum.org...ssageID=6966454 and they work.
I have the header file pointing at the right driver folder.
header='C:\Program Files (x86)\LabJack\Drivers\labjackud.h';

Can you please help me get this working?
Thanks,
Paula

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 04 April 2013 - 12:18 PM

I am trying to set up my LabJack UE9 with Labview. I have tried running the lhud_loadDriver.m file and I keep getting the same error. I've also tried using the UE9_Simple_Analog.m file and the same error occurs.

??? Error using ==> loadlibrary at 368
Failed to preprocess the input file.
 Output from preprocessor is:'cl' is not recognized as an internal or external command,
operable program or batch file.

Error in ==> ljud_LoadDriver at 10
	loadlibrary('labjackud',header);

I am using Matlab R2010a 64 bit.
I have both Microsoft Visual Studio 9.0 and 10.0 installed on my PC.
I have checked the instructions at this location http://mathforum.org...ssageID=6966454 and they work.
I have the header file pointing at the right driver folder.
header='C:\Program Files (x86)\LabJack\Drivers\labjackud.h';

Can you please help me get this working?
Thanks,
Paula


Most likely the issue is due to them being the Express Editions, which for whatever reason R2010a 64-bit doesn't like. We have no idea why MatLab is so picky or why it even requires compiling tools to call external .dll functions in the first place (nothing else does). See here: http://www.mathworks...010a/win64.html . If they are the full versions then for some random reason Matlab isn't recognizing that they are installed.

Thus, in an effort to help users avoid all that mess, we have started porting examples using our .NET driver/wrapper into Matlab. Matlab seems to have far better support for .NET than regular .dlls (which is very odd) so it seems like this will be a good option for many people using Matlab.

We just uploaded these examples a day or two ago here: http://labjack.com/s...examples/matlab

If you look at the bottom of the page you see a link to examples of .NET. I would recommend giving those a try since it should be a much easier thing to get going and use. Even if you aren't that familiar with .NET you should be able to copy/paste a lot of what we have provided.

This being something new, if you run into any issues or have any suggestions or things that would make it easier for you, please let us know.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users