« Close

Datasheets and User Guides

App Notes

Software & Driver

 

LJLogM - Windows Only

Supported devices

Download

The application LJLogM is included with the main installation package.

For LabVIEW programmers, the source code is available in the LabVIEW_LJM archive.

LJLogM

LJLogM is a simple ready-to-run executable that logs up to 16 input registers from a single device. It displays selected channels on a graph and writes data to file. Generally used for ≤100 scans/second.

LJLogM uses command-response mode which is typically used at 100 scans/second or slower.  See Section 3 and Appendix A-1 of the T7 Datasheet for more information.

Most of the user settings are saved in LJLogM.cfg.  This file is read when the program is first run and if it does not exist default values will be loaded.  This file is written when the program is closed to save the settings at the time of close.  This file it not intended for direct editing by the user.  To make a backup of the settings, simply make a copy of LJLogM.cfg.  Then later to use those settings again, close LJLogM, delete or rename LJLogM.cfg, rename the backup file to LJLogM.cfg, and then run LJLogM.

If you have changed some settings and are having problems, close the program and delete "LJLogM.cfg", then open again and you will have the default settings.  If you have problems related to opening the device, also delete "LJLogM_open.cfg".  For problems related to the working directory location, see "Change Working Directory" below.

 

 

LJLog vs. LJStream: We suggest that you use LJLogM if possible, and only if you need to go too fast for LJLogM do you then switch to LJStreamM.  LJLogM uses command-response mode, so it acquires and processes 1 scan at a time at the specified interval and is generally used for ≤100 scans/second.  LJStreamM uses stream mode, so each iteration it retrieves and processes 1 seconds worth of scans and is generally used for >100 scans/second.  See Section 3 and Appendix A-1 of the T7 Datasheet for more information.

LJLogM vs. LJLogUD:  LJLogM supports the T-series.  LJLogUD supports the U3, U6, and UE9.

 

Control Descriptions

# Channels: 1-16.

Interval (ms): Interval at which this program scans all channels, updates the screen, and writes to file.

DevType, ConnType, &  SerialNumber (Opening):  These indicators display information about the device that has been opened.  To control what device is opened, edit the LJLogM_open.cfg file that can be found in the working directory.  Unlike LJLogM.cfg, LJLogM_open.cfg is intended to be directly edited by the user.  If you don't see it, make sure you have opened & closed LJLogM at least once after installation.  This file has an intro line and then 3 lines to specify Device Type, Connection Type, and Identifier. The default values are ANY-ANY-ANY, meaning that LJLogM will open the first device it can find.  For further information see Section 2.1 of the LJM User's Guide.  Example:  [Main] (1st line of config file), DeviceType=t7 (2nd line), ConnectionType=ethernet (3rd line), Identifier=192.168.1.207 (4th line).  If you mess up the config file, just delete it and then open & close the application so it will make a new default one.

This provides a way to run multiple instances at the same time talking to different devices.  Make a copy of LJLogM.exe called LJLogM2.exe, run LJLogM2, set the working directly as desired, and close LJLogM2.  Now edit both LJLogM_open.cfg and LJLogM2_open.cfg to specify the device for each to open.  Requires LJLogM 1.05 or higher.

Name: Specify the desired register Name for each row.  For example, the first row defaults to AIN0, but could be just about any readable register such as AIN9, EIO2, WIFI_STATUS, DIO0_EF_READ_A_F, or AIN3_EF_READ_A.  Any related configuration, such as Range & ResolutionIndex for analog inputs, needs to be done in Kipling before running LJLogM.

Scaling Equations: Should be something like "y=a", where "y" is the scaled output and "a" is the input voltage of the 1st row.  "b" through "p" would be the input voltage of the rest of the rows.  Everything after "//" is ignored, so use for comments.  A few 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.

Write To File:  Click this to start and stop writing to file.  The resulting file is a tab-delimited ASCII file.  Files are written with a .dat extension.  To quickly open 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.

The first column in the file is a timestamp of seconds since midnight January 1st (Universal Time), 1904.  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 ~18 bytes for the timestamp plus ~11 bytes per channel.  So it you log 8 channels once per second for 60 seconds that would be about (18 + 11*8) * 60 = 6360 bytes on the hard drive, and a 1 TB hard drive could hold a few hundreds of years of such data.

Data File Prefix:  LJStreamM uses this as the base string when it makes a file name.  When LJLogM starts a new file, it appends a "_#" to the specified prefix, where "#" is the first unused number from 0-99999.

Max File Size (Bytes):  When the current data file exceeds this limit, the file is closed and a new file is started.

Change Working Directory:  Click this to select the directory where the config file and data files will be saved.  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.

Graph History: Controls how many scans are shown on the graph.  The graph is similar to a strip chart, and simply shows the last n scans.

 

 

Revision History

1.00: First version.

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.02:  Changed all text to Segoe UI font so screen items are aligned regardless of system font size.  Changed to show scroll bars.

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.04:  Skipped version number.

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.

7 comments

Hi

I am using Labjack T7 Pro OEM version. As a software tool I am using Python and operating system is Ubuntu 14.04. I would like to log a signal that is connected to the Labjack to a file. Can you please give me some guideline on how to log data to a file ?

 

Thanks

To get started, the Python examples are here:

http://labjack.com/support/ljm/examples/python

As for logging to a file, at a desired interval get your readings and a timestamp from your system, then write the timestamp and readings to a file in a format of your choice (for example, comma-separated values) for that interval. Our Python examples will demonstrate driver usage and some do readings in a loop. To get a timestamp, you can use time.time() or other time function. To write to a file, look at the Reading and Writing Files. Also, there is a helpful csv class for writing/reading comma-separated files. To read at a certain interval, use a loop with a delay or the threading.Timer class.

Here's a Python demo that demonstrates logging an AIN every 1 second for 10 seconds using the Timer class (note the code does not account for overlapping timers):

t7_logging_demo.py

 

Trying to datalog both thermocouple and pressure transducer signals in LJMLogM and not sure how to get it to display temperature instead of raw voltages for the analog inputs.  Configured the inputs in Kipling 3 and saved as power up defaults but still not displaying correctly.  Thanks in advance for any help/insight you may be able to offer.

Does Kipling show the temperature correctly?  Note that AIN# will always read voltage ... you want to read AIN#_EF_READ_A in LJLogM.  See more details in the AIN-EF Thermocouples Section.

I didn't realize you read the register from the name column.  Everything is working correctly now.  Thanks!  

Hi,

I'm using LJLogM to acquire signals of different sensors.

In the stored file, I have a row like this one:

3514471589,387000    1,100569    24,229422    20,360629    20,920007    39,526653

How can I convert in "real time" (e.g. seconds) the values in the first column?

Thanks

I updated the information above.  See the description of "Write To File".