LJStreamM - Windows Only
LJStreamM 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. LJStreamM is best for scan rates greater than 100 scans per second. Note: This documentation applies to LStreamM v1.11+.
Just starting? See our Device Quickstart Tutorials.
Supported devices
Downloads
LJStreamM is included in the main installation package.
The latest development version of LJStreamM can be found at files.labjack.com.
The LJStreamM (LabVIEW) source code is available in the LabVIEW_LJM archive.
Overview
LJStreamM uses stream mode acquisition. This mode has more requisite knowledge than the command response communications used by LJLogM. See the Communication section of the T-series Datasheet for detailed information about stream mode acquisition. Also see the Data Rates Appendix and the LJM library stream section.

LJStreamM v1.12
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 T-Series Datasheet for more information.
LJStreamM vs. LJStreamUD: LJStreamM supports T-Series devices. LJStreamUD 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 LJStreamM 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
LJStreamM generates the following configuration files in the current working directory. None of these files should be modified outside of the program:
LJStreamM.cfg: Contains logger experiment configurations such as # Channels, Names, what channels to Graph, etc. This is a file that the program loads on startup, and it is the file that your control configurations are saved to when you close the program.
LJStreamM_open.cfg: Contains device open settings (DeviceType, ConnectionType, Identifier). This is a file that the program loads on startup.
LJM_Default_Configs.cfg: Contains the default experiment configurations for
LJStreamM.cfg
. These are the configurations you would see when you load the program for the very first time. If there is some issue withLJStreamM.cfg
and you want to start from a known working configuration, load this file as your program configuration using the configuration button.
Control 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 LJStreamM, the connection options you chose will be loaded the next time LJStreamM 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 Rate: Put in the desired scan rate. Sample rate is scan rate times number of channels. See Appendix A-1 of the T-Series Datasheet for more information on data rates. ScansPerRead
is hard coded as ScanRate/2
, so this program will iterate approximately every 500 ms.
Iteration Number: The number of program iterations since stream was started. This value is only updated while stream is active (after the Start Stream
button is pressed.)
Scans Per Iteration: The number of scans acquired per program iteration. This value is hard coded as ScanRate/2
, so this program will iterate approximately every 500 ms. This value is only updated while stream is active (after the Start Stream
button is pressed.)
ms Per Loop: The actual number of milliseconds it took to run the last program iteration. This value is only updated while stream is active (after the Start Stream
button is pressed.)
Name: Specify the desired register Name for each row. For example, the first row defaults to AIN0, but it could be set to any streamable register such as AIN9
, EIO_STATE
, or DIO2_EF_READ_A
. See Section 3.2 of the T7 Datasheet for a list of streamable registers.
Raw Value: The value read from the register entered in the Name
column for the row. While streaming, the displayed value is the average of all scans returned during the current program iteration. When not streaming, the value shown is from a command-response reading.
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), the row is active according to the # Channels
value, and stream is active.
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 To File: When this button is selected and stream is active, data will be logged to file. Data is not logged when stream is inactive. 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. After the date/time formatted timestamp is a machine-readable timestamp in seconds since Jan 1, 1904. The timestamps do not reset when a new file is automatically created due to the file size exceeding Max File Size
.
The first column of the log file is the time in seconds since starting stream, which is calculated using the formula: TimeSinceStreamStart = ScanNumber / ScanRate
. See “Device Clock Scan Time” in the Stream Mode section of the T-Series datasheet for related information. Subsequent columns in the log file correspond to your channel sample data as determined by # Channels
, your Name
entries, and the DisableScaling
control.
Each row of logged data requires approximately 10 bytes for the timestamp plus 10 bytes per channel. For example, if you log 8 channels at 1000 scans/second for 60 seconds you could expect your log file to have a size of roughly (10 + 10*8) * 1000 * 60 = 54000000 bytes on the hard drive.
Max File Size (Bytes): When the current data file exceeds this limit, it 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 logging 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.
Command-Response Error Message: This indicator shows any errors that occurred in the most recent program iteration when stream is not active. 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, and all errors should be resolved before starting stream. Note: when a scaling equation error occurs, the scaled value indicator for the channel will be set to zero.
Last Stream Error Message: This indicator shows any errors that occurred the last time stream was active. Only LJM and Modbus errors are displayed; scaling equation errors should be resolved while stream is inactive. Note: when a scaling equation error occurs, the scaled value indicator for the channel will be set to zero.
DisableScaling: Scaling is computing intensive. If LJMScanBacklog
is growing, disable scaling. When this control is enabled (the small radio button is black) only raw data is written to file when Log To File
is enabled. If this control is disabled (the small radio button is white) both raw and scaled data will be written to file when Log To File
is enabled.
LJMScanBacklog: The number of stream scans accumulated in the LJM stream-in buffer. If this value is continually growing, it indicates that the program is not iterating fast enough to consume the data being written from the device to LJM on your computer. If LJMScanBacklog
is growing, disable scaling.
DeviceScanBacklog: The number of stream scans accumulated in the device stream-in buffer. If this value is continually growing, it indicates that data is not being transferred from the device to your computer fast enough to keep up with the current streaming data rate.
# Scans On Graph: Controls how many scans are shown on the graph.
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 Rate
, Name
(for every row), Scaling Equation
(for every row), Graph?
(for every row), Data File Prefix
, Log to File
, Max File Size (Bytes)
, DisableScaling
, # 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.12: Made minor Visual tweaks to the front panel. Made optimizations to scaling equation processing and front panel responsiveness.
1.11: 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 row modification controls. Note: a program configuration file with 96 channels from LJStreamM v1.11 would not be recognized as a valid configuration file in v1.10.
1.10: 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.09: 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 LJStreamM graph.
1.08: Updated buttons to load new configurations. Added factory setting config files (LJM_Default_Configs.cfg and LJM_Open_Any.cfg). Fixed LJStreamM 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.07: Added configuration selection and save settings.
1.06: Fixed problem where time reported on the chart and in logged file was twice the actual time. Added separate error message displays for C-R and stream modes.
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: 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.03: Changed all text to Segoe UI font so screen items are aligned regardless of system font size.
1.02: Fixed problem with saving of configuration settings.
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.
1.00: Initial version.