Getting started with LabJack U3-HV

In this tutorial, you will learn how to install the LabJack U3-HV in the computer and how to integrate it with Matlab and Python. For more information about this type of Labjack, please access: http://labjack.com/u3.

  • Installation in Windows/ Mac OS/ Linux

1. Go to http://labjack.com/support/u3 and download the application suite for                           your specific operating system. If you are using Windows, go to step 2.

2. After the installation, connect the LabJack U3-HV (do not connect nothing in the                   LabJack inputs). Open the LJControlPanel. Click on “Find devices”. You                                           should see this:

labjack2

3. Click on “Test”. If you see this window with these voltage values for AIN0, AIN1,                       AIN2 and AIN3 everything is working well. It is perfectly normal little variations in                       these values.

labjack3

  • Integration with Python

1. Go to http://labjack.com/support/labjackpython and click in “Download 4-24-2014             release of LabJackPython“. Extract all files in a new folder.

2. Go to https://www.python.org/download/releases/2.7/ and download Python 2.7.

3. Open the command prompt and find the directory where you extracted the files. You can change the directories typing “cd” and the path of the folder.

python

 

4. Enter “setup.py install”. Wait some seconds and then, close the Command Prompt.

python2

5. Make sure that the LabJack is connected to the computer. Go to the folder that you extracted the files and look for “Examples”.  Click with the right button in ‘streamTest’, choose the option “Edit with IDLE”.

python3

5. Uncomment the lines for LabJack U3. Go to “Run” and then “Run Module”.

python4

6. If you see a screen like this, you did the integration between LabJack and Python. Feel free to try another examples.

python5

  •  Integration with Matlab

1. Go to http://labjack.com/support/ud/examples/matlab and download the specific driver for your Matlab version. In this example, I am using Matlab R2013b. So, I used the “.NET Examples for MATLAB (06/24/2014)“.

2. Extract all the files in a new folder. Make sure that your LabJack is connected. Open the Matlab and click on “Home–>Environment–>Set Path”.  Choose the path where you extracted all files and then “Examples—>U3”.  Click on “Save” and then “Close”.

matlab

 

3. Navigate in the menu in the left and find the same folder. Open “Examples–> U3”.

MATLAB2

 

4. Enter in the Command Window in Matlab “u3_simple”. If you see this screen, you did the integration between Labjack and Matlab.

matlab3

Attention: The Labjack just work with one activity per time, for example, if you are using the LJControl Panel, you cannot use the Python with Labjack at the same time. You have to close one of these activities. If you have any issue about Labjack U3-HV, you can contact me and I will try help: ncardosooliveira@fau.edu.