Skip to Navigation

LJStreamUD

LJStreamUD.exe, V1.11, May 24, 2011

Note for Windows 7:  You need full permissions for the folder where the executable is located.  As of UD installer V3.25 this is not done automatically.  See post #6 of forum topic #5362.

Installation Note:  UD installer V3.25 installs LJStreamUD V1.10.  The V1.11 update attached to this page below simply contains an exe that replaces the previous file (must be put in the proper location so that the new ljstreamud.exe replaces the old ljstreamud.exe. V1.11 is only recommended for Vista or Windows 7 (it works on XP, but the screen might look jumbled depending on your Windows font settings).

LJLogUD.exe is a ready-to-run executable that streams from 1-16 input channels on a U3, U6, or UE9. It displays selected channels on a graph and writes data to file.

UD installer V3.25 installs LJStreamUD V1.10.  The zip file attached to this page below simply contains an exe that replaces the previous file. 

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).

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.

For the screen to look like the image below, older versions of Windows must be set to "Small" fonts or "Normal" DPI.  Windows 7 does not seem to have that option, so at this time the screen will not be as nicely aligned as shown in the image below.

 

 

LJLogUD vs. LJStreamUD: LJLogUD uses command/response mode as documented in Section 3.1 of any UD series user's guide.  It acquires and processes 1 scan at a time at the specified Interval.  Generally used for perhaps 10 scans/second or slower.  LJStreamUD uses stream mode as documented in Section 3.2 of any UD series user's guide.  Each iteration it retrieves and processes 1 seconds worth of scans.  Generally needed for perhaps 100 scans/second or faster.  For more discussion of command/response mode and stream mode see Section 3.0 of the applicable user's guide:  U3, U6, or UE9.

 

# 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.

+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.

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.

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.

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

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

Scaling Equations: Should be something like "y=a", where "y" is the scaled output and "a" is the input voltage of the 1st channel.  "b" through "p" would be the input voltage of the rest of the channels.  Common examples:

y=c
y=c+273.15                             (deg C to deg K)
y=100*c                                  (EI-1034 voltage to deg F)
y=0.5556*c - 17.78                  (EI-1034 voltage to deg C)
y=0.5556*(c-32)                      (EI-1034 voltage to deg C)
y=c^2                                     (c*c or c-squared)
y=c-273.15                              (deg K to deg C)
y=((c-273.15)*9/5)+32            (deg K to deg F)
y=(1.8*c)-459.67                     (deg K to deg F rearranged)

There is special support for the thermocouple function from the UD driver.  The form is "TCVoltsToTemp[type:volts:CJtempK]".  Type should be B, E, J, K, N, R, S, or T (must be capital).  Volts is the thermocouple voltage, and can be a formula.  CJtempK is the cold junction temperature in degrees K, and can be a formula.

y=TCVoltsToTemp[K:c:298.15]
y=TCVoltsToTemp[K:c:d]
y=TCVoltsToTemp[K:c:55.56*d+255.37]
y=TCVoltsToTemp[K:c-0.0002:d]
y=2*TCVoltsToTemp[K:c:d] - 2.5

 

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 "//".

 

File attachment: 
tags:

Comments

#1

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,

 

#2

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

#3

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

#4

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

#5

Had some problems with LJStreamUD and LabjackU6. Tried to install on Windows 7 64-bits. Controll panel worked ok but not LJStreamUD, layout looked unhealthy and plenty of errors when trying to stream to file. Used Windows XP instead without problems, worked very well.

#6

LJStreamUD is written in LabVIEW 6, and if the font size is not set right in Windows you get a screen where the rows do not line up nice and things look somewhat jumbled.  In Windows XP you set the font size to "small" or "normal".  Not sure about Windows 7 but we will take a look.

What sort of errors are you getting?  To run with the default settings, close the program, delete ljstreamud.cfg, then reopen.