LJM Example Code (T7, T4, Digit) | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


LJM Example Code (T7, T4, Digit)


LabJack makes wrappers and libraries for LJM available for many languages.

LJM supports the T7, T4, and Digit. For other LabJack devices, go to the Software page.

LJM Example Code Table

LJM Example Code Table HTML (Referencable)

Example Code/Wrappers: LJM Library

T7 T4 Digit

T7, T4, Digit


Examples In... Windows Mac Linux
.NET (C#, VB)    
Visual Basic (VB6, VBA)    
Agilent VEE    


Embedded Lua Scripts

While the above examples are run on the host computer, there are also example Lua scripts which run on-board T-series devices.

Modbus TCP

There are also direct Modbus TCP examples that do not use LJM. Note that some features, such as streaming, are greatly simplified by the LJM library. A list of the available Modbus registers is available on the Modbus Map page.

Digit (End of life)

Example code specifically tailored to the Digit-TL/Digit-TLH can be found in the appendix-b section of the Digit's datasheet.


Are there plans to release a .NET wrapper for the LJM library?

Is there a Matlab example that shows how to stream digitial inputs?  I keep getting the following error: STREAM_CHN_LIST_INVALID.

No, the stream example just demonstrates analog inputs though changing it to use digital inputs is easy. Just change the scan list's names/addresses for the digital lines you want. For example, to stream all FIO states make this your scan list:

    numAddresses = 1;
    aScanListNames(1) = 'FIO_STATE';

A list of streamable register names/addresses can be found in the Stream Mode section of the T7 datasheet.