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.


Matlab does not recognise driver

  • Please log in to reply
2 replies to this topic

#1 Martine

  • Members
  • 6 posts

Posted 11 November 2013 - 01:41 PM

Dear all,


I am new to Labjack, and I am stuck at the initial phase.  I installed the labjack installation files and the test show all green checks.


I want to control U12 from Matlab so I downloaded the examples in the U12matlab.zip.


The first line in the examples is:

 ljAsm = NET.addAssembly('C:\Program Files(x86)\LabJackU12Legacy\drivers\LJDotNet.dll');


However when I copy this in the editor I get the following error:

Files(x86)\LabJackU12Legacy\drivers\LJDotNet.dll' or one of its
dependencies. The system cannot find the file specified.


I checked, and the LJDotNet.dll file is in the given location. Does this needs to be compiled in some way (how?)


I am using windows 7 and Matlab 2011a.


I hope somebody can help me with this problem. Thanks in advance,




#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 11 November 2013 - 02:29 PM

You do not need to compile anything if using .NET in MATLAB.


I notice that the file path you provided is incorrect for the 64-bit version of Windows. There is a space between "Files" and "(x86)", so the call should be:


ljAsm = NET.addAssembly('C:\Program Files (x86)\LabJackU12Legacy\drivers\LJDotNet.dll');


If using 32-bit Windows, remove the " (x86)" part from the path. Also, make sure the drive letter is correct for your system. Last, if you are still having issues with the "Program Files" path, try copying the LJDotNet.dll file to a different directory and change the addAssembly call to use that path/file.


You mention that you are using the examples in U12matlab.zip, which I believe were posted in the forums. Since that post we have released U12 MATLAB examples that use .NET (MATLAB_LJDotNET.zip), in the support section of our site:




It does not include the LJDotNet.dll in the download, but the README provides a link to the latest .NET dll here:



#3 Martine

  • Members
  • 6 posts

Posted 14 November 2013 - 08:33 AM

Thanks, putting the most recent dll in a different location did the job.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users