U3-LV installation not working | LabJack

U3-LV installation not working

19 posts / 0 new
Last post
jto's picture
U3-LV installation not working


I have followed the installation instructions for the LabJack U3-LV by running the Exodriver_NativeUSB_Setup package on both a Mac Pro OS 10.10.5 and a Macbook Pro OS 10.9.5. But I am not sure it has worked, since I cannot get iandol's labJack.m file to run in Matlab; when checking in System Information under Hardware->USB,  one of the entries (Current Required) says that the device has not been configured, so I wonder whether the installation worked in the first place?

Any pointers would be much appreciated.

LabJack Support
labjack support's picture
The "Current Required (mA):

The "Current Required (mA): Unknown (Device has not been configured)" entry is normal and doesn't indicate a problem. To test if the driver is working, you can try compiling/running one of the U3 examples for C/C++ or Python.

 As for the MATLAB side, make sure you have the appropriate C compiler (Xcode) installed for your version of MATLAB which is required by loadlibrary and calllib calls in labJack.m. Look here for MATLAB "Supported compilers":


If that doesn't help, what error are you getting?

jto's picture


Thank you very much for your support!

So the error message that I get when invoking

lj = labJack('verbose',true)

is that "Loading the exodriver library failed: Index exceeds matrix dimensions."

When I manually install the exodriver (downloaded zipped file and ran sudo install.sh in that directory), I get the following error:


rm -f liblabjackusb.dylib *.o *~

cc -fPIC -g -Wall  -c labjackusb.c

labjackusb.c:25:10: fatal error: 'libusb-1.0/libusb.h' file not found

#include <libusb-1.0/libusb.h>


1 error generated.

make: *** [labjackusb.o] Error 1

Error, please make sure you are running this script as:

  $ sudo ./install.sh

If you are still having problems, please contact LabJack support: <[email protected]>

Not sure any of this makes sense? As I said, running the installer package Exodriver_NativeUSB_Setup runs fine.

Thanks again!

LabJack Support
labjack support's picture
The "Index exceeds matrix

The "Index exceeds matrix dimensions." with the loadlibrary call usually indicates the C compiler MATLAB requires is not installed. It is not an obvious error mesage, but from experience this is what it indicates with loadlibrary. Use the link in my previous post and make sure you have the appropriate version of Xcode and its C compiler installed. MATLAB is picky and needs a specific version installed.

As for building the Exodriver from source code, you will need to build and install the libusb-1.0 library from source code which provides "libusb-1.0/libusb.h" header file. Take a look at the INSTALL.MacOSX file or our In-depth Mac OS X Build Instructions for libusb-1.0 build and install details.

Note that our installer installs both libusb-1.0 and Exodriver libraries, and the Exodriver header files which allow you to build our examples and your own applications. The installer does not install the libusb-1.0 header files, which should only be needed if building Exodriver or using libusb-1.0 functions directly in your code (isn't required when using the Exodriver).

jto's picture


Thank you very much; it was indeed the Xcode version that was wrong (I had installed the latest one, but Matlab R2015a only likes 5.1 and 6.0), so thank you for being patient and pointing me to this again! It now works!

I realize labJack.m is not a native LabJack script, but since I've been unable to locate 'iandol',  can you perhaps also help me figure out whether and how I can adapt it so that I can send different TTL trigger combinations, much like Gordon Mathewson seems to have done for steering the U3-LV via EPrime (https://github.com/GordonMatthewson/EPrimeLabJack)? I am planning to send the triggers from the U3-LV to a Brain Products ActiChamp amplifier (for EEG recordings), which requires 8-bit TTL signals (0-5V, max. 10 mA) going into a female D-Sub 9 port (see attached schematic).

Any help would be greatly appreciated!

File Attachment: 
LabJack Support
labjack support's picture
Look into using the

Look into using the prepareStrobe and strobeWord methods to configure and strobe all the EIO and CIO lines. There is a simple example of their usage here:


For the FIO lines you would need to modify some of the labJack.m code. The EIO and CIO digital lines can be accessed through the U3's DB15 connector whose pinouts are documented here:


Connect wires from the U3's DB15 pinouts (there is a CB15 screw terminal to provide screw terminals) to D-Sub9 ports pinouts. Each digital line is a bit of your signal, where a high state is a 1 and low is a 0. With prepareStrobe you are passing an 11-bit value, where each bit represents the output of a specific line. Bit 0 is EIO0, bit 1 is EIO1, ..., bit 8 is CIO0, bit 9 is CIO1, etc.. So to send 00001111 through EIO0-7, set the value to 15 (b00001111).

jto's picture
Thank you for your reply and

Thank you for your reply and detailed description, this really is excellent customer service!

From your description I am not quite sure whether I need the CB15 screw terminal? The setup that I am trying to mimic is the following: on a Windows machine, a PCI card DB15 parallel port sends 8-bit TTL signals to the female D-Sub9 port in the amplifier (e.g. each experimental condition in an experiment is coded with a separate trigger value). I am now trying to implement this on a Mac via the LabJack U3-LV device; i.e. on a Mac Pro, I am hoping to use labJack.m to send 8-bit TTL triggers via the U3-LV to the amplifier.

So I am not quite sure whether I can just do with the exisiting FIO lines, or whether I need the additional CB15 screw terminal that provides the EIO and CIO lines? I realize this is Gordon Mathewson's setup I pointed you towards, but I am not sure now whether the addition of the CB15 terminal is necessary for my needs outline above?

LabJack Support
labjack support's picture
The CB15 provides convenient

The CB15 provides convenient screw terminals for your EIO/CIO connections, but isn't neccessary. You can connect your wires directly into the DB15 connector (what the CB15 connects to) and its pinouts. You can also use the FIO lines but prepareStrobe and strobeWord would need to be modified to use these lines.

The class in labJack.m also has a function that sets all digital I/O (setDIO) including the FIO lines, but it doesn't "strobe" the lines automatically so you would need to setDIO to send your bits (turn the neccessary lines on/high/1 and off/low/0) and then setDIO to turn all digital I/O off/low. Delays in this case are handled in software and one setDIO call can take on average 0.6 or 4 millseconds.

jto's picture


Please excuse the delay, some other things got in the way. I am trying to follow your suggestions, but alas I get a similar exodriver error message. I running R2015a and have Xcode 6.0.1 installed, just like before, but I get the following error message:

lj = labJack('verbose',true)

Warning: The library name is not a valid name.

The library will be named "liblabjackusb0x2D20x2E5". 

> In loadlibrary (line 183)

  In labJack/open (line 182)

  In labJack (line 167) 

---> labJack: Loading the exodriver library failed: There was an error loading the library "/usr/local/lib/liblabjackusb-2.5.2"

dlopen(/usr/local/lib/liblabjackusb-2.5.2, 6): image not found | open method

lj = 

  labJack with properties:

            name: 'LabJack'

        deviceID: 3

          device: 1

      silentMode: 1

          header: '/usr/local/include/labjackusb.h'

         library: '/usr/local/lib/liblabjackusb-2.5.2'

         timeOut: 0

         verbose: 1

         openNow: 1

    readResponse: 1

      strobeTime: 16

    functionList: []

         version: 'Library Load FAILED: There was an error loading the library "/usr/local/lib/liblabjackusb-2.5.2"


        devCount: []

          handle: []

          isOpen: 0

             inp: []

            outp: []

            fio0: 0

            fio1: 0

            fio2: 0

            fio3: 0

            fio4: 0

            fio5: 0

            fio6: 0

            fio7: 0

             led: 1

         command: []

            uuid: '1110AF4CE'

       dateStamp: [2015 11 3 10 59 38.9584]

        fullName: 'LabJack <labJack#1110AF4CE>'

Any help would be greatly appreciated!

LabJack Support
labjack support's picture
It looks like your

It looks like your loadlibrary call is not finding our library liblabjackusb.dylib.

First, check your /usr/local/lib directory for the liblabjackusb.dylib (our library) and libusb-1.0.dylib libraries. A command like "ls /usr/local/lib" will display the files in that directory. If those files are there, please install our Exodriver library:


Second, I am not sure what your loadlibrary call looks like, but for the library file make sure you are trying to load "/usr/local/lib/liblabjackusb.dylib". It currently looks like you are trying "/usr/local/lib/liblabjackusb-2.5.2".

Third, have you tried compiling and running the C examples to confirm the Exodriver library is working:


jto's picture
Thanks heaps, one of these

Thanks heaps, one of these did the trick and it's working again!

jto's picture
Thanks again. One more follow

Thanks again. One more follow-up if you can still bear with me.

I am looking at iandol's last post in this thread (http://forums.labjack.com/index.php?s=5e36aa39e59c64f850f6cc4fefdcc501&s...) and am trying to get the setDIO to work.

I only have the FIO channels (no DB15 connector), so if I send

lj = labJack('verbose',true);

lj.setDIO([8 0 0],[255 0 0]);

then that should send a signal through all FIOs, correct? I am doing this (and setting it back via lj.setDIO([8 0 0],[0 0 0]) after 10 ms), but I am not detecting any trigger (measured with an oscilloscope). A lj.timedTTL(0,10) command works just fine for line FIO0 (again measured with an oscilloscope).

I must be missing something obvious?

LabJack Support
labjack support's picture
The labjack.m setDIO call is

The labjack.m setDIO call is documented here:


The first parameter is the output settings (high/low) of the FIO, EIO and CIO lines (high/low) and the second is the write mask (update) of the FIO, EIO and CIO. So lj.setDIO([8 0 0],[255 0 0]) is updating FIO0-7 and setting FIO3 to output high and the rest of the FIOs to low (8 = b00001000, 255 = b11111111). If you want to just turn all FIOs on/high and then off/low, then something like:

lj.setDIO([255 0 0],[255 0 0])

lj.setDIO([0 0 0],[255 0 0])

jto's picture
Now I feel really silly, I

Now I feel really silly, I was missing something really obvious after all! Thanks for bearing with me!

jto's picture
One more quick follow up. The

One more quick follow up. The DB9 cable that I am connecting to the FIO0-7 and ground also has a shielding cable; where do you suggest I plug this in?

LabJack Support
labjack support's picture
You can get into fancy

You can get into fancy applications of a shield, but in most cases it works best just to tie shield and grounds together, so the shield is effectively giving you a bigger ground.

jto's picture
Thanks for your reply. Could

Thanks for your reply. Could you lay out the best of the fancy applications of a shield for me? The U3 is connected via an EEG amplifier, which is connected to a human participant, and I want to make absolutely sure it is all safe.

LabJack Support
labjack support's picture
With the knowledge at hand,

With the knowledge at hand, my opinion is that connecting the shield to ground is the best use of the shield.

The fancy uses of a shield do not involve safety, but rather noise.  Sometimes you drive the shield to prevent noise from getting in the cable:


jto's picture
OK great, thank you very much

OK great, thank you very much; your customer service really has been outstanding and is much appreciated!