« Close

Datasheets and User Guides

App Notes

Software & Driver

 

Programming Resources

This section is for people who would like to integrate a piece of LabJack hardware into their software.

Locate example code/wrappers based on your LabJack device and operating system.  The library documentation can be very helpful if the example code is not sufficient, or does not demonstrate the function calls desired.

The examples cover C, C++, C#, Delphi, Java, LabVIEW, LabWindows/CVI, MATLAB, Python, and Visual Basic (VB6/VB.NET).  The examples are broken down by library, because the example code listed will most likely be using that library for high-level functions.

Note: Often there are other ways to communicate with a LabJack than through the use of a library.  For instance, it is possible to use direct TCP communication to communicate with Ethernet devices.  See the device datasheet for details about direct communication.

LJM Library User's Guide

Direct Modbus TCP Libraries

These are generic Modbus TCP libraries created by 3rd party software developers. For WiFi and Ethernet interfaces only.

Example Code/Wrappers: UD Library

U3 U6 UE9

U3, U6, UE9


Examples In... Windows Mac Linux

UD Library User's Guide

U12 Library User's Guide

Alternate Interfaces are available for programming languages that have a hard time accessing DLLs.

3 comments

Hi, 

I'm not familiar with the labjack codes, but I do have a code for reading encoders and controlling motors using a UE9. However, I will not have access to the UE9 anymore, so I need to buy a new labjack. I'm wondering if the code will be portable across all labjacks, including the new T7? Or will I have to re-code to do the same job whenever I change labjacks? I do realize that the port numbers are all different, so I think changing port numbers is expected. I'm referring more to whether the syntax to get and set values will be different. Thanks!

I am connecting a LJTick-DAC to a U6-pro.

How can I set the DACA and DACB with the python U6 class?

 

You need to use I2C communications (i2c method in the U6 class) to read the calibration constants from the LJTick-DAC and set its DACs. Refer to the LJTick-DAC example:

https://github.com/labjack/LabJackPython/blob/master/Examples/LJTickDAC/...

To simplify the example which is a GUI based app, the "getCalConstants" method reads the LJTick-DAC's calibration constants and the "updateDevice" method applies the calibration constants and sets the LJTick-DAC's DACs. DIOA and DIOB on the LJTick-DAC are the SCL and SDA. So if DIOA/DIOB are connected to FIO2/FIO3 for example, in the i2c method set SCLPinNum = 2 and SDAPinNum = 3.

For more LJTick-DAC information refer to its datasheet:

http://labjack.com/support/ljtick-dac/datasheet