LJM User's Guide
This document describes the API and usage of the LabJack LJM library. The LabJack LJM library is a cross platform library that allows programs to read and write Modbus registers implemented on a variety of LabJack devices. A searchable list of all of the supported registers that can be read and/or written to is available on our Modbus Map page.
Subsections
Supported Devices
LJM supports T-series devices:
LJM also previously supported the Digit, which is now at end of life.
Software support for other devices can be found on the Software page.
Current Issues
Streaming digital state registers
For current Release installers, LJM incorrectly streams digital state registers as a floating point number instead of a
UINT16
.This is fixed in Beta installers, which contain LJM 1.2100. The 2018-08-30 installer (LJM 1.1900) also streams digital state registers successfully.
Infinite stream connection timeout
Current and past versions of LJM support an infinite stream connection timeout setting by writing
0
to the LJM library configurationLJM_STREAM_RECEIVE_TIMEOUT_MS
. When using modes such as triggered or externally clocked stream, stream data may not be sent to the host computer until a trigger or external clock cycle is seen. When no data is sent to the host computer and there is an infinite timeout configuration, the stream data acquisition thread in LJM will be locked until stream data is sent to the host, and this can cause a deadlock condition which prevents stream from stopping, if there is an attempt to stop stream (calleStreamStop
) before new stream data is sent from the LabJack to host computer.The solution to this problem is to use any manual timeout setting besides an infinite timeout.
LJM Installation
See our LJM Software Installer Download page. Also see the What LJM files are installed on my machine? page.
Examples
Example code for LJM is available in Python, LabVIEW, C/C++, and several other languages.
Offline PDF
LabJack-LJM-User's-Guide-Export-20190731.pdf