Skip to main content
Skip table of contents

Direct Modbus TCP Examples

LabJack T-series devices communicate via Modbus TCP, which is compatible with many 3rd-party libraries and software. The high-level LJM library is recommended for T-series device control.

Reasons to Use LJM

  • LJM is free and easy to install.

  • LJM is supported on Windows, macOS, and Linux (including x86 and ARM platforms).

  • You want a higher level programming interface. LJM abstracts away many lower level communication details. Direct Modbus TCP communications require a deeper understanding of Modbus protocol.

  • You intend to use stream mode acquisition. High-speed, hardware-timed stream mode acquisition is simple using the LJM Stream Functions. It is possible to use stream mode without LJM, but the configuration is notably more involved. For a description of stream mode acquisition, see the Communication section of the T-Series Datasheet.

Reasons to use Modbus TCP Directly

  • You are already familiar with Modbus.

  • You only want to use open-source libraries, or you want to avoid extra libraries.

  • You are using an architecture or operating system (such as an embedded system) that isn't supported using LJM.

  • The programming language you need does not have any LJM examples. Please contact us if this describes your situation. We want to support popular programming languages with LJM.

Direct Modbus TCP Documentation

For more information about the LabJack Modbus implementation, see the Direct Modbus TCP Documentation.

To use a 3rd party Modbus program such as a Rockwell/Allen Bradley application, follow the instructions on the Modbus Client Applications page.

Direct Modbus TCP Example Code Table

Libraries...

Windows

Mac

Linux

LabVIEW

Node.js

Python

C/C++ (Streaming)

C# .NET

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.