LJLogM - Windows Only
LJLogM is a simple ready-to-run executable that logs up to 96 Modbus registers from a single LabJack T-Series device. It displays the selected channels on a graph and is capable of logging data to file. LJLogM is best for scan rates less than 100 scans per second. Note: This documentation applies to LJLogM v1.10+.
Just starting? See our Device Quickstart Tutorials, then our LJLogM Basics Guide.
Supported devices
Download
LJLogM is included in the main installation package.
The latest development version of LJLogM can be found at files.labjack.com.
The LJLogM (LabVIEW) source code is available in the LabVIEW_LJM archive.
Overview
LJLogM uses command-response mode communications, which works well at 100 scans per second or slower. See Section 3 and Appendix A-1 of the T-Series Datasheet for more information.

LJLogM v1.11
LJLogM vs. LJStreamM: We recommend using LJLogM over LJStreamM whenever possible. LJStreamM is only recommended when scan rates greater than 100 scans per second are required. LJLogM uses command-response mode communications: it acquires and processes 1 scan at a time at the specified interval. LJStreamM uses stream mode acquisition: it retrieves and processes 0.5 seconds worth of scans every iteration. See Section 3 and Appendix A-1 of the T7 Datasheet for more information.
LJLogM vs. LJLogUD: LJLogM supports T-Series devices. LJLogUD supports the U3, U6, and UE9.
Clearing Errors: Errors such as bad program settings can break the typical program execution. In most cases these errors can be cleared without exiting LJLogM by using the configuration panel.
Opening the configuration panel will clear the current error for the next program loop to run error free, however this would only resolve one-time errors.
Some device connection issues can be resolved by opening a new device connection using the configuration panel. If you run into a device connection issue, try using the 'ANY' connection options for every setting. This will attempt to open the first found device.
Bad program configurations can be cured by loading the default program config file
LJM_Default_Configs.cfg
.
See the “Default Configuration Files” and “Configuration Panel” sections for more information.
Default Configuration Files
LJLogM generates the following configuration files in the current working directory. None of these files should be modified outside of the program:
LJLogM.cfg: Contains logger experiment configurations such as # Channels, Names, what channels to Graph, etc. This is a configuration file that the program loads on startup, and it is the file that your controls are saved to when you exit the program.
LJLogM_open.cfg: Contains device open settings (DeviceType, ConnectionType, Identifier). This is a configuration file that the program loads on startup.
LJM_Default_Configs.cfg: Contains the default experiment configurations for
LJLogM.cfg
. These are the configurations you would see when you load the program for the very first time. If there is some issue withLJLogM.cfg
and you want to start from a known working configuration, load this file as your program configuration using the configuration button.
Control and Indicator Descriptions
Device Type, Connection Type, and SerialNumber (Opening): These indicators display information about the device connection that has been claimed by the program. By default, the program will open the first device connection it can find. To make a specific device connection, click the Configuration
button then use the “Device Open” options to make your desired connection. If you then exit the Configuration panel and LJLogM, the connection options you chose will be loaded the next time LJLogM is opened.
# Channels: 1-96
. Determines the number of rows/channels that will be measured. For example, row0
, row1
, and row2
will be active and measured if # Channels
=3.
Row # (Insert/Delete): Insert or delete a row at the specified row number. Scaling equation variables are automatically shifted according to the insert/delete selection. Inserting a row number will pre-fill channel configurations with default values for the row Name
, Scaling Equation
, and Graph?
values. See the Name
, Scaling Equation
, and Graph?
descriptions below.
Scan Interval (ms), Actual ms Per Scan: Scan Interval (ms)
is the time interval this program will attempt to use to scan all channels, update the screen, and log data to file (when logging is selected). Note: It is possible for each logger iteration to take longer than the desired scan interval. The Actual ms Per Scan
indicator describes the actual scan interval of the last iteration of the program. Use Tables A.1.2 and A.1.4 to estimate how long AIN samples will take.
Scan Number: The number of scan iterations since the program was started or the configuration panel was used to select new configuration options.
Name: Specify the desired register Name for each row. For example, the first row defaults to AIN0
, but it could be set to any readable register such as AIN9
, EIO2
, WIFI_STATUS
, DIO0_EF_READ_A_F
, or AIN3_EF_READ_A
.
Raw Value: The value read from the register entered in the Name
column for the row.
Scaling Equation: Scaling equation applied to the raw value for the row. The raw value for each row is mapped to a variable as follows:
row 0-15 → "a"-"p"
row 16-31 → "a2"-"p2"
row 32-47 → "a3"-"p3"
row 48-63 → "a4"-"p4"
row 64-79 → "a5"-"p5"
row 80-96 → "a6"-"p6"
For example, the default scaling equation for row0 is y=a
, where y
represents the scaled output value and a
is a variable representing the raw value of the row.
Everything in the scaling equation after the characters //
is ignored if you want to add comments. Examples:
y=c // Scaled value equal to raw value from 3rd row
y=100*c // EI-1034/LM34 voltage to deg F
y=c-273.15 // deg K to deg C
y=((c-273.15)*9/5)+32 // deg K to deg F
y=TCVoltsToTemp[K:c:a] // Type K, t/c voltage from 3rd row, CJ temp from 1st row
For more details see the LJLog/Stream Scaling Equations page.
Scaled Value: The value calculated from the scaling equation for the row. See Scaling Equation
above.
Graph?: Determines whether the row is graphed. The row is graphed if the Graph?
button is selected (lit up green) and the row is active according to the # Channels
value.
Data File Prefix: The program uses this as the base string when it makes a file name. When the program starts a new file, it appends a "_#" to the specified prefix, where "#" is the first unused number from 0-99999. For example, the default value for Data File Prefix
is “data”. The first log file in an empty working directory would be named data_0.dat, the second log file would be named data_1.dat, etc.
Log Every N Scans: When Log to File
is selected, data will be logged every Scan Number
that is a multiple of the Log Every N Scans
value. For example, if Log Every N Scans
=3 data will be logged every three scan intervals.
Log To File: When this button is selected, data will be logged to file. The resulting file is a tab-delimited ASCII-encoded file. Files are written with a .dat
extension. To quickly open log files in Excel or Open Office Calc, change the extension to .xls
or .ods
. To import to a Google Spreadsheet, make the extension .tsv
before uploading.
At the top of the log file is a human readable system timestamp of when you started writing to file.
The first data column in the file is a timestamp of seconds since midnight January 1st (Universal Time), 1904. This timestamp is generated from the host computer, not the LabJack device. For more information about presenting this timestamp in Microsoft Excel or Open Office Calc see the LJLogUD & LJLogM Timestamps page.
Each row of logged data typically requires roughly 18 bytes for the timestamp plus 11 bytes per channel. If you log 8 channels once per second for 60 seconds you could expect a file size of approximately (18 + 11*8) * 60 = 6360 bytes
on the hard drive. A 1 TB hard drive could hold a few hundreds of years of this data.
Max File Size (Bytes): When the current data file exceeds this limit, the file is closed and a new file is started. See the Data File Prefix
description above for information on file naming conventions.
Current Data File: This indicator shows the path to the current file that data is being logged to. When log to file is not active, this indicator will say “Not Logging To File“.
Configuration: The Configuration
button opens a configuration panel. See the “Configuration Panel” section below for more information.
Error Message: This indicator shows any errors that occurred in the most recent program iteration. Error messages will be displayed if there are LJM, Modbus, or scaling equation errors. If there are both LJM or Modbus errors and scaling equation errors, only the LJM or Modbus error message will be displayed. LJM and Modbus errors should be resolved as soon as possible. Note: when a scaling equation error occurs, the scaled value indicator for the channel will be set to zero.
# Scans on Graph: Controls how many scans are shown on the graph. If you set this to 120, and you are acquiring 2 scans/second (i.e. Interval = 500ms), the graph will show 60 seconds of data. The graph is similar to a strip chart, and simply shows the last n scans. To clear the graph, change something in the Graph?
array of buttons.
Configuration Panel
The configuration panel contains controls for various program settings such as the program configuration, program claimed device connection, device I/O, and the program working directory.

Configuration Panel
Device Open: This section of the panel describes the currently claimed device connection and it provides a way to open a new device connection.
Program Configurations: This section allows you to save the current program configuration to file or load a configuration from an existing program configuration file. New program configuration files are saved to the current working directory; see the “Program Working Directory” section below. Program configuration files save the following program controls: # Channels
, Scan Interval (ms)
, Name
(for every row), Scaling Equation
(for every row), Graph?
(for every row), Data File Prefix
, Log Every N Scans
, Log to File
, Max File Size (Bytes)
, # Scans on Graph
.
Device I/O Configuration: This section allows you to write device registers for testing different settings such as changing the range or resolution of an analog input channel. There are also buttons to save or load IO Configs. See the IO Config section of the T-Series Datasheet for more information about device IO Configs. Note: the device register write functionality is meant primarily for testing purposes and Kipling is recommended for changes to device I/O configurations.
Program Working Directory: Displays the current working directory for the program. This determines the location of the program configuration file and where log files are saved.
Clicking the Change Working Directory button will allow you to change the current working directory. After navigating to the desired directory in the pop-up window, click Select Cur Dir
at the bottom-right. For more details see the LJLog/Stream Working Directory page.
Configuration Panel Messages: Any errors that occur while attempting to make changes in the configuration panel will be displayed here. In most cases a message is also displayed upon successful configuration changes.
Revision History
1.11: Made minor Visual tweaks to the front panel. Made optimizations to scaling equation processing and front panel responsiveness.
1.10: Reworked configuration file handling, including adding the configuration panel. Moved the 'Change Working Directory' button to the configuration panel. Refactored the write to file functionality. Added scaling equation error messaging. Renamed the 'experiment' configuration file to 'program' configuration file. Added register write functionality to the configuration panel. Increased front panel text size, changed font to Arial (monospace), and set the minimum panel size. Added support for 96 channels. Added the 'Log Every n Scans' control. Added row modification controls. Note: a program configuration file with 96 channels from LJLogM v1.10 would not be recognized as a valid configuration file in v1.09.
1.09: Fixed SignedMSWLSW scaling equation functionality. This was previously returning an unsigned 32-bit integer representation. It now returns a signed 32-bit integer representation.
1.08: Made change so that Inf values are assessed as 0 when used in scaling equations. This fixes an issue related to processing Inf values in scaling equations. Added error handling to recover from LJME_INVALID_NAME gracefully. Made a change to allow use of the LabVIEW graph palette (for advanced users only). When set to visible, the palette will be in the bottom right corner of the LJLogM graph.
1.07: Updated buttons to load new configurations. Added factory setting config files (LJM_Default_Configs.cfg and LJM_Open_Any.cfg). Fixed LJLogM channel index text size. Updated error handling. Changed TCVoltsToTemp error behavior from outputting 0.00 to 9999. Fixed the front panel (the device parameters were misplaced). Fixed minor path resolution bug.
1.06: Added configuration selection and save options.
1.05: Set minimum value of #Channels to 1. Fixed problem where name of the exe was not detected properly. Fixed issue where you could never decrease the number of channels shown on graph. Changed version check sub-vi so it only shows prompt when new version available, not on version check errors. Changed scaling sub-VIs to use LJM thermocouple function rather than LJUD function.
1.04: Skipped version number.
1.03: Added support for SignedLSWMSW[lsw:msw] function in scaling equations to handle quadrature reads. For efficiency, scaling equations now skipped if no scaling is needed (e.g. y=a).
1.02: Changed all text to Segoe UI font so screen items are aligned regardless of system font size. Changed to show scroll bars.
1.01: Changed to use this application's filename (w/o extension) to create the names of the config files and registry entry. Added "Write To File" control to items saved in config file, so the application will now remember how this control was last set.
1.00: First version.