« Close

Datasheets and User Guides

App Notes

Software & Driver


LJStreamUD - Windows Only

LJStreamUD is a simple ready-to-run executable that streams up to 16 input channels from a single UD series device (U3, U6, or UE9). It displays selected channels on a graph and writes data to file.  Generally used for >100 scans/second.

The application LJStreamUD is included with the main installation package:

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

See Section 3.2 of the applicable user's guide for background on streaming. Also see the analog input section (2.x) and the UD driver stream section (4.3.x).

Most of the user settings are saved in ljstreamud.cfg.  This file is read when the program is first run, and this file is written when the program is closed.  To make a backup of the settings, simply make a copy of ljstreamud.cfg.  Then later to use those settings again, close LJStreamUD, delete or rename ljstreamud.cfg, rename the backup file to ljstreamud.cfg, and then run LJStreamUD.

It is recommend to initially just open and click "Start Stream" without changing any settings. If you have already changed some settings and are having problems getting it to run, close the program and delete "ljstreamud.cfg", then open again and you will have the default settings. If you have problems related to opening the device, also delete "ljstreamud_open.cfg".



LJStream vs. LJLog: We suggest that you use LJLogUD if possible, and only if you need to go too fast for LJLogUD do you then switch to LJStreamUD.  LJLogUD 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.  LJStreamUD uses stream mode, so each iteration it retrieves and processes 1 seconds worth of scans and is generally used for >100 scans/second.  For more discussion of command-response mode and stream mode see Section 3.0 of the applicable user's guide:  U3U6, or UE9.

LJStreamUD vs. LJStreamM: The UD library supports the U3, U6, or UE9.  The LJM library supports the T-series.


# Channels: 1-16.

Scan Rate: Put in the desired scan rate.  Sample rate is scan rate times # channels.  See Section 3.2 of the U3/U6/UE9 User's Guide for more information.

Resolution: Affects the U6 only.  See Section 3.2 of the U6 User's Guide.

SettlingFactor: 0-255.  Affects the U6 only.  See Section 5.2.12 of the U6 User's Guide.

Device Type & Address (Opening):  In the working directory there is a file called LJStreamUD_open.cfg.  If you don't see it, make sure you have opened & closed LJStreamUD at least once after installation.  In the 2nd line of this config file, if DeviceType=ANY, the application will search USB and then Ethernet for the first U3/U6/UE9 it can find.  If DeviceType is not ANY, then a call to OpenLabJackS() is made with the specified strings (FirstFound=FALSE).  See Section 4.3.1 of the U3/U6/UE9 User's Guide.  Example:  [Main] (1st line of config file), DeviceType=LJ_dtUE9 (2nd line), ConnectionType=LJ_ctUSB (3rd line), Identifier=1 (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 LJStreamUD.exe called LJStreamUD2.exe, run LJStreamUD2, set the working directly as desired, and close LJStreamUD2.  Now edit both LJStreamUD_open.cfg and LJStreamUD2_open.cfg to get rid of all "ANY" strings and instead specify the device for each to open.  Requires LJStreamUD 1.19 or higher.

+Ch/-Ch: Put in the desired positive and negative channel numbers.  This specifies which analog input to read.  To read other types of channels (DI, Timers, Counters), see the special channel support described in Section 3.2.1 or 3.2.2 (stream mode section) of the applicable User's Guide.

Ranges: Select the desired range, which is related to gain.  Not all devices support all ranges, but starting with UD V3.19 the driver will select the best range available rather than throwing an error.  For more information, see the AIN section in Section 2 of the U3/U6/UE9 User's Guide, and also see Section 4.3.3 of the applicable user's guide.  The U3 does not have normal range options, but does have the "Special" range which is enabled by setting the negative channel to 32.  Note that due to the way this program and the UD driver parse the channels list, all rows with the same number in +Ch will use the range set by the last row with that same +Ch.

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.  The first column is elapsed time since you started writing to file (does not reset when a new file starts automatically due to Max File Size).  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.

Each row of logged data typically requires roughly 10 bytes for the timestamp plus roughly 10 bytes per channel.  So it you log 8 channels at 1000 scans/second for 60 seconds that would be about (10 + 10*8) * 1000 * 60 = 54000000 bytes on the hard drive.

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

Max File Size (Bytes):  When the current data file exceeds this limit, it is closed and a new file is started.  In theory the max value is 2^31 - 1, or 2147483647, but we have not tried a file that big ourselves.

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.

Graph History: Controls how many scans are shown on the graph.

DisableScaling:  Scaling is computing intensive.  If UD Backlog is growing, disable scaling.


Revision History

1.06: Not compatible with older config files, so delete ljstreamud.cfg before running the first time!  Changed config file delimiter to "#!#" instead of "," for better international compatibility.  Made maximum file size a user control.  Scaled values now grayed-out if scaling is disabled.

1.07: Turned on scroll bars, for use on smaller monitors.

1.08:  Minor changes to the process used to find the next available file number.

1.09:  No longer disables timers and counters.  Added controls for Resolution and SettlingFactor.

1.10:  Makes error display red if there is an error.  Fixed typos in header for data files.

1.11:  Fixed jumbled display on Windows 7.  Comments now allowed in scaling equations starting with "//".

1.12:  Added support for registry storage of working directory.  Now shows errors in command/response
mode (when not streaming).

1.13:  Changed to maintain display of last stream error, and thus does not show command-response errors when not streaming.  Changed timestamp in header of data file to show seconds.

1.14:  Fixed bug in OpenAny where if it did not find any devices it would try 128 times to open a UE9 at

1.15:  Two changes.  The first is that it now supports a config file that lets you specify a particular device to open.  See the description of "Device Type & Address" above.  The second is that it now uses the filename of the application to specify the names of the config files and to specify the location of the working directory registry key.  The former means if you make a copy of LJLogUD.exe called LJLogUD2.exe, the config files will be LJLogUD2.cfg and LJLogUD2_open.cfg and thus each copy has its own config files.  The latter means you can use a different working directory for each copy, although you don't have to.

1.16:  Added "Write To File" control to items saved in config file, so the application will now remember how this control was last set.

1.17:  Changed all text to Segoe UI font so screen items are aligned regardless of system font size.

1.18:  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.19:  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.


Can I change the x-axis to be smaller than half a second?

Use "Graph History" to adjust the length of the x-axis, but it looks like 0.1 is the minimum.

I have four labjack U3 devices connected to a four port externally powered USB hub. I have used LJControlPannel to write unique local IDs to each U3 device (1,2,3 & 4 respectively). I would like to log all 64 chanels (four * 16 AIN inputs). Can I do this using LJStreamUD or LJLogUD? So far I have only been able to log from just one of the U3 devices, the one with local ID 1.

many thanks,


No, LJStreamUD and LJLogUD just work with a single device.  Besides writing your own program, you could check out DAQFactory or FlowStone.


Im using U6 (windows 7) and while trying to log data using LJstream V1.11 it is showing error such as,

LabJack Error # 1007:LabJack not found occured at LJUD_OpenLabJackS.vi

Why is it behaving so?Can you guide me through this problem?

Does it work for a while and then stop working with that error?  Or does it have that error right from the start?

Does the U6 work fine in LJControlPanel?  Make sure you are only running one program at a time, so for example make sure you close LJControlPanel before running LJStreamUD.

I suggest that if needed you continue this troubleshooting on the LabJack forum rather than in these user's guide comments.


I am trying to read in an analog signal from a microphone by connecting the 3.5mm end of the mic to AIN0 of the LabJack U6.  Do I need a preamplifier?  I ask because changing the range to BIP1V does not seem to increase the gain.

If you have a 5mV signal, it should read 5mV no matter what gain/range setting you use.  The difference is that the resolution will be better with the smaller ranges.  You can do a try it yourself in the test panel in LJControlPanel.  Jumper DAC0 to AIN0, set DAC0 to something like 50mV, then look at the reading from AIN0 at ranges +/-10V, +/-1V, and +/-0.1V.  You will read 50mV in all 3 cases, but the resolution should improve (noise will go down).  To do a better resolution test and recreate the figures from Appendix B, jumper AIN0 to GND.

Your microphone might need a special amplifier and/or signal-conditioning circuit.  If you have other problems with the mic signal, I suggest you post on our forum.

Is there a way to control where LJstreamUD stores the data file? I was looking for a UI spot associated with the Data File Prefix field which would allow me to specify the destination directory.

Putting the data & config files under c:\Program Files\LabJack is as bad under Windows XP Pro (32-bit) running as a Limited user as it is for Win7 / Vista. The same cure applies: give Users full control of that folder.

In any case I'd suggest a simple change to the program code to use the Windows symbolic name that means "the user's data" rather than "the program's install" for the default path of both data files and config files.

In LJStreamUD V1.12 you can now control the working directory.  You can get LJStreamUD V1.12 with the LabJack Installer 2013.2.11.

Hi, how i can install tools from LabJack like easy stream to LabView?

I am not sure what you are asking.  If you are looking for LabVIEW examples for the UD driver (U3, U6, UE9), start here:


I'm using the LJStreamUD on a U3 device and I had a couple of questions. I am sampling a 2v peak signal on AIN0 using this software. I set the scan rate to 25,000. With only one channel on, that should correspond to a 25,000 sample/second rate, correct?

Regardless, that is what I see in the output file, time steps between samples of 40us. However, I am starting and stopping data acquisition by hand. I sample for about 30 seconds as measured on my phone. What surprised me is that I did this ten times and all of my files are the same size with the same number of samples. I expected them to differ by a few samples at least.

Assuming I don't have microsecond reflexes, why are the data sets the same size? My concern is that the device is sending a burst of samples at a time and recording it and then missing samples while writing the first burst. The manual states that there would be dummy values in the results, values of -9999.0, but I don't see those in my data set.

I see, so it will complete a read cycle before stopping. It starts a read cycle, then takes one sample every 40us for one second. Regardless of when you stop it during the read cycle, it finishes that read cycle. And yes, you are correct, my data is 750k rows plus header. Thanks for the quick response.


I have a U3-HV device and want to get the frequency (Hz) of a continuous electrical signal. Can I do it? 

Connect the cable FIO4 and see the signal in volts, its graph and exported to excel using StreamUD, but I can not get a measure of the frequency (Hz) 

How do I do? 

Thank you very much

Once you have a waveform saved to file, the question is how to do the match to determine the frequency.  An FFT would be a likely option.  I am not sure what Excel is capable of, but something like Matlab could certainly do it.

Perhaps you could use a timer or counter to measure frequency?  What is the shape of the signal?  What is the max & min voltage?

Is a square wave that goes from [-0.03 to 2.42] V. It would be great to use a counter to show me the frequency, but not how to set it up. 

In the application LJControlPanel can add timers and counters, but not to see the results. 

Thanks for answering

See the Frequency Measurement forum topic #1105 to decide if you will count over time or time individual cycles.  Then see Section 2.9 of the U3 User's Guide about timers & counters.  Then try it using the test panel in LJControlPanel to see if it works.  Let us know how it goes in the test panel.

I've been looking at the various ways of measuring the frequency and have chosen to put a timer set to "output frequency" and a counter in FIO6 and FIO7. 

All this is set up in LJControlPanel, I keep it, but in the test panel does nothing, there is no area where the results go.Where do these results appear? 

I wish I could get the frequency directly with an application of Labjack, without using the Matlab FFT or having to get directly counting cycles and divide by the time.

Starting with a counter is a good idea to make sure the hardware is working.  In the LJCP test panel, click Config in the Timers and Counters area, check Enable for Counter0, and click OK.  You now have a counter enabled on FIO4, and the count will be displayed in the Counter0 display on the main test panel.  Connect your signal and see if you get counts.  If your signal is not working, remove it and instead just take a wire connected to GND and tap that wire inside the FIO4 terminal.

>> without ... counting cycles and divide by the time.

That was the point of forum topic #1105.  If you don't want to do counting over time, you can instead time individual pulses.  Using a timer in mode 2 will give you a measurement of period/frequency.

We are getting into off-topic details, so please continue this on our forum, rather than comments on this page.

Hey there,

I´m using the Labjack U6 to process data from two pressure sensors and one thermometer. I started using the ready-to-run LJstreamUD, but am not sure whether this will help me solve my task. What I want to do:

1) I want to retrieve the values at a specific sample rate (500Hz or higher), then average these values and just log this one averaged value on a file at a rate of perhaps two times a second or even once per second. Is this possible with little or no adaptions in the block diagram? If I need to make any adaptions, where exactly do I have to start? At the moment, the LJstreamUD logs exactly 500 values per second, but I do not need that many values at all. In addition to that, there is a significant level of noise. I would be very happy if someone was able to help me out. 

LJStreamUD will simply stream the data at the desired rate and write it to file at that rate.  If you want to modify LJStreamUD, the source code is in the LabVIEW_LJUD archive, but you need to be a decent LabVIEW programmer to dive in to that.  It would be easier to start with "U6 easy Stream.vi", so I suggest you start there if you want to make your own LabVIEW program.

As for noise, see the Noise and Resolution app note, and start by jumpering a channel to GND and replicate the numbers from Appendix B of the U6 User's Guide.  More details are beyond the scope of this page, so I suggest starting a topic on our forum.

Why does LJStreamUD only polling 4 channels in GUI?

Channel no 4 to 15 data is not being polled.

How to enable those?

See the "# Channels" control in the upper-left.  Most likely you have it set to 4.

Thanks, it's working now.

Currently I have set it to 2 channels.

12-199, 12-13. (AIN12-AIN13 is connected across a resistor.)

I am facing two more problems:

1. When I click Start Stream, I am getting error: LabJack Error #60:  Stream scans overlapped  occured at LJUD_eGetS (DBL Array).vi

2. After some time channel 1 (12-199) voltage value stops getting updated. Only 12-13 is getting updated.

How to resolve above?


1.  Stream overlap error means a new scan needs to start but the previous scan has not finished.  That is, your scan rate is too high.  Max scan rate depends on number of channels, resolution index, and the smallest range you are using on any of those channels.  See Section 3.2 of the U6 User's Guide.

2.  What do you mean by "stops getting updated".  Do you mean that after some time the numbers you see in the "Voltage" and "Scaled" columns are changing in the first row but not the second row?  Never heard of that.  I suggest you contact support@labjack.com and send some screenshots so we can get into more details.

1. regarding this, reason for this issue being my scan rate to high, ok then I shall lower my scan rate and try. Also I shall refer the table to set the scan rate.

   But, in coming time I am going to write code to use stream mode to read data from LJ U6, then do I always need to refer the table to set scan rate and settling time?

2. Yes, I have two channels. 12-199, 12-13. After some time, numbers we see in 'voltage' and 'scaled' are getting changed for only 12-13, for 12-199 they are not getting changed at all though I decrease/increase load across sense resistor.

I shall screenshot and details to support also.

If you stream too slow, you have to tweak communication parameters as mentioned above.  If you stream faster than the limits documented in Section 3.2, you will get an error, so yes you need to stay below the limits from Section 3.2.

I am using one channel, resolution index: 8 and scan rate: 10 Hz, range: LJ_rgBIPP01V still I get error:

LabJack Error #58:  Stream timedout before reading enough data  occured at LJUD_eGetS (DBL Array).vi

Section 3.2 states I can go at max 500 Hz. Value is instantaneously getting updated in GUI but start stream gives above error.

Most likely the problem is because you are going so slow.  You can see from Section 4.3.7 that the default samples-per-packet is 25.  You are streaming 1 channel at 10 Hz, so it will take 2.5 seconds for your stream to make 1 packet.  2.5 seconds is longer than the default stream read timeout, so you get the error you are seeing.  If you want to stream this slow, you will have to look at tweaking parameters such as LJ_chSTREAM_SAMPLES_PER_PACKET, LJ_chSTREAM_READS_PER_SECOND, and LJ_chSTREAM_COMMUNICATION_TIMEOUT.

We recommend that you use command-response mode first.  If you are going too fast and have to use stream mode, then try to use stream mode.