« Close

Datasheets and User Guides

App Notes

Software & Driver

 

U6 Quickstart Tutorial

Subsections

U6 Quickstart for Windows Overview

1. Install the appropriate LabJack driver and software bundle.
The utility application referenced in the following steps (LJControlPanel) is only available in the Windows Installer. The package for Linux and Mac will allow communication to the U6, but no similar application is available for Mac and Linux at this time.
2. Connect the U6 to the computer or hub.
The status LED should blink at power up and then stay solid on. If Windows asks about installing new hardware accept the defaults.
3. Run LJControlPanel.
LJControlPanel is a free application installed along with the driver. You should be able to find it in the Start Menu links.
4. Click "Find Devices".
5. Select the connection under the device serial number (i.e. "USB - 1").
The right hand side of the screen will change.
6. Click "Test".
 This brings up the test panel where you can read all inputs and write all outputs. The test panel is designed as an easy interface for checking hardware operation before trying more complex software.
7. Connect jumper wire securely from DAC0 to AIN0.
DAC stands for "Digital to Analog Converter", AIN stands for "Analog Input", FIO stands for "Flexible I/O".
8. Control Panel will read the voltage level of AIN0.
Now adjust the DAC0 analog output voltage, you will see AIN0 follow DAC0 if the jumper wire is secured. The range can also be adjusted for higher/lower voltages.
9. Connect one end of the jumper wire to GND, touching the other end inside FIO0.
GND stands for Ground. Try connecting and disconnecting the FIO0 end of the jumper wire.
10. Control Panel will read the digital input as changing.
The FIO0 checkbox will change from selected (high) to unselected (low) showing that there is a voltage change. DI are weakly held high by a internal resistor, and the jumper wire to GND then pulls the DI low.

Moving forward from here...

Software Options:

See the U6 Software Options.

Getting Support:

 

39 comments

In following examples from the User's Guide  with C++  code
on executing:
GetFirstResult (lngHandle, NULL, 0, &dblValue, 0, 0);    //( I substituted the NULL for the zero used in the Guide)
 I encounter  an error:

"Unhandled error exception in LJTest.exe(LABJACKUD.DLL):0x c0000005:  Access Violation

elsewhere:
GetResult ( lngHandle, LJ_ioGET_AIN, Channel, &dblValue );  // this works OK, returns correct value

Can you explain what causes the "Access Violation" error?   Is it due to an uninitialized pointer?

Access Violation typically refers to either a pointer that is uninitialized, or a variable that is passed improperly.  In this case we would need to see the rest of the code and how things are being defined, what request, etc.   For GetFirstResult the best option is usually to pass in variables that can hold the data for each of the parameters so you can check what request IOType/Channel/etc was being used, as well as get all the possible data out of it.  This is useful in case you use the code somewhere else or the request you think you are getting isn't the one you get first.

The function is defined as: GetFirstResult(LJ_HANDLE Handle, long *pIOType, long *pChannel, double *pValue, long *px1, double *px2)

In following examples from the Guide,  in STream Mode  with the eGet(...  embedded in a loop:
eGet(lngHandle, LJ_ioGET_STREAM_DATA, LJ_chALL_CHANNELS, &numScans, array[0]);

returns lngErrorcode = 1001  which is undefined in the Guide...   and
returns numScans = -999

at other times, I've received error 25 "FLASH LOCKED".......... This
confuses me.

I'm unclear as to the last argument in the eGet(......  array)....  I've
sent the first element of a large array and assumed the driver kept track
and assigned data accordingly  .  Should I update this element with each
successive call to eGet(...  ??.   I've also tried defining the array a size
larger than that calculated in the example.

1001 is an unknown error, which typically means some exception was thrown inside the driver.  The most common cause of this is a memory error of some sort, for instance the array being passed is not passed properly, or not allocated to be large enough to hold all the data being placed into it.  -999 is a value that is returned when there is an error of some sort so you know there is an error, it's just a check to ensure that the user is aware that something went wrong. 

I'm not sure what would cause the error 25, but if it is some memory error causing the 1001, then that could just be a result of that error.  It's best to figure out that one first, as the other will likely go away once it's fixed.

For the rest of your question, it depends on your code/language/etc.  I believe we have an email from you.  I will respond to that with some more information to gather that can help us track it down for you.

I'm  unclear as to the definition of  LJ_chALL_CHANNELS... 

Does this refer to ALL 16 hardware channels??
Or to ALL Channels designated earlier with
AddRequest (lngHandle, LJ_ioADD_STREAM_CHANNEL, 2, 0, 0, 0);   ??

Thanks again for your support.

RobHill

LJ_chALL_CHANNELS is used with LJ_ioGET_STREAM_DATA.  It refers to all channels that you specify when using LJ_ioADD_STREAM_CHANNEL.  Thus, if you add 2 channels, say AIN0 and AIN3, then LJ_chALL_CHANNELS would return data for both of them.  You can request just data from individual channels, but by far the most common option is to get all data back using this method.

U6_Simple- a C# ( VS2008 Express) app - used to run on my old XP machine. On my new Win-7 64-bit machine I get "Unable to load DLL 'labjackud.dll' " . ( The dll file is in my syswow64 folder.) When I try add as a reference from VS8E, I get "A reference to 'C:\Windows\SysWOW64\labjackud.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.". I tried 'regsvr32.exe', but the dll does not conform to its expectations.

I reinstalled my Labjack software, and the ControlPanel works, so the board connectivity is working.

How do I attach my this DLL to an application ?

 

You don't need to add a reference to the Labjackud.dll since that .dll isn't a .NET component.  The reference you need is LJUDDotNet which should already be there if you are using one of our examples.

Most likely the error here is 64-bit related.  Some of the express editions will by default build the app for the architecture of the machine.  Thus, on a 32-bit machine it will make a 32-bit .exe which uses the 32-bit .dlls.  On a 64-bit machine it will build a 64-bit .exe and then require 64-bit .dlls.  It is probably giving that error because it can't find the 64-bit copy of LabJackUD.dll in the system32 directory (which is where Windows stores 64-bit .dlls).  You can get that file from here: http://labjack.com/support/ud/ud-setup-64-bit/labjackud-dll-64-bit .

Another option is to change the build settings for the project so even on a 64-bit PC it will build an x86 (32-bit) executable.  Many people prefer this option since it will work the same on all machines regardless of if they are 32-bit or 64-bit. LJControlPanel is done in this way as an x86 .NET application written in C# which would explain why it works but the one you build does not.

Very nice products, you folks. :)

I'm experimenting with a U6-pro purchased because of the higher resolution acquisition feature. First tests include looking at it from the LJStreamUD application (v1.10). On this application I can find no obvious way of engaging the higher bit depth. Is it possible from this application, perhaps automatically by reducing the acquisition sampling rate? Or must I go elsewhere, including writing our own code.

J

The high-resolution converter is not used in stream mode.  See Section 3 of the U6 User's Guide for related discussions.  Use LJLogUD to experiment with all resolution indexes from 1-12.

Is each U6 analog input equiped with its own dedicated A/D converter?

My goal is to acquire in parallel 4 signals using the 4 analog inputs that will be sampled simultaneously and synchronously at 48kHz (same sampling clock).

 

No, the analog inputs are all multiplexed to a single ADC, or 2 ADCs for the U6-Pro.  See Section 2.0 for a system diagram and Section 3.2 for stream timing.

I'd like to use the U6 with 4-wire load cells.  I'm currently using a U3 with LJTick-InAmp, which supplies the excitation voltage.  What should I use for the excitation source on the U6?

 

The U6 works great with load cells.  We recommend using the DAC outputs to provide excitation.  They will droop under the load, but they are stable and low-noise.  The droop is not a big deal as you will use an analog input to monitor the excitation voltage in real time anyway, as should be done with any excitation source.

Set the DAC to 4.5 volts.  Perhaps use "config defaults" in LJControlPanel if you want this to be the power-up default.  The DAC outputs have 50 ohms of source impedance, so with one 350 ohm bridge, you will draw about 11 mA which will drop about 0.5 volts internally leaving 4 volts for the bridge.  Each DAC (the U6 has 2) should be good to excite perhaps 3 bridge circuits, so if you have more than 6 bridge circuits you will need to use VS or add an excitation source.

Since you feedback the excitation source to an analog input, VS (5 volts) works pretty good, but your data will be noisier than when using a DAC output.

Hi,

i'm using the labjack U6 pro for over a year now, and it's a excellent device.

But now i want to use 3 counters and 3 timers. Is this possible with the Labjack U6-pro?

Can i just set the first 3 inputs (FIO0 to FIO2) as timers and then the next 3 (FIO3 to FIO5) as counters ?

if not, is it possible to use 2 U6's on 1 computer?

 

Robert Rappard

ps I'm using VB2010 

The U6 has 2 counters and 4 timers.  One possible timer mode is "firmware counter", so you could use 2 hardware counters, 1 firmware counter, and 3 timers in other modes.  A firmware counter is not as fast as a hardware counter, so look at Section 2.9.2 of the U6 User's Guide to get a feel for whether this will work.

Yes, you can use multiple U6s with 1 host.  Start with the information towards the end of Section 4.3.1.

Another option might be the T7.  It has 4 hardware counters and up to 8 timers depending on which mode you are using.  See the T7 DIO Extended Features Overview section.

I'm  using  U6  and  I'm  looking  for  the  conformity  certificat   ( EN 61010-1).

How  to  find  /  obtain it?

You can get that on our conformity page.

Hi LabJack 

We are using the unit model U6-PRO to log data, through Labview.  Right now we are using the 4 analog input channels that are accessible through the screws ports (AI0-AI4). We are observing that the inputs are somehow coupled, in that the data recorded in one channel depends on the input of the other channels. We know that the signals we are sending in are independent from each other, we are wondering if the issue is with the device. Have you had this experience before? 

Thank you,

Ricardo

I suspect that if you test by jumpering various channels to GND or VS you will see that they each correctly read 0 or 5 volts without the voltage on one having any effect on the other.  However, if you connect nothing to a particular channel (i.e. leave it floating) you will find that the voltage from the floating channel is related to the channel you read before it.  Your signals are likely floating (not referred to ground), or have too high of source impedance (anything >1kohm requires special consideration).  Try a search of labjack.com using "u6 settling impedance" to find related reading, and consider starting a forum post to get into more details about your signals.

Hi, How can I read a rising edge with the FIO ports on Labview so I could make an action? I've seen the examples, but I'm not sure which one could help me.

Thank you, JM

It's a 1 sec period signal, with high level time = 100 ms and low level time = 900ms. I want to perform an action on the rise edge. Thank you.

I would use a state machine type structure where your 2 states are "previous read was low" and "previous read was high".  Then in a loop call eDI to get the state of the input, and if you are in the "previous was low" state and your new read is high you know you have just detected the rising edge.  I would probably make a copy of "U3 Efunction Loop Example.vi" and start from there.

Read in Section 3.0 about command-response versus stream mode.  Stream mode is generally the best for moving large amounts of data, but not the best the minimum latency, however there are techniques that can be used for low-latency streaming if you want to continue with stream mode.  See the example "U6 Low Latency Stream.vi".

As for command-response mode, you should be able to achieve the times of less than 1 ms as noted in Section 3.1.  Try the attached speed test VI.  Set "# AIN Channels" to 0 and click the "Read Digital" button.

For further detailed support, I suggest using our forum rather than comments on this page.

Hi

I'm using Dasylab to acquire data from the labjack U6-PRO. I use MODBUS to communicate with the DAQ. I want to read the voltages of 6 channels, 5 of which are differential. The program works continuously for several days. However, with the highest resolution (index 12 in all channels) the measured values sometimes overlapped! I had to decrease the acquisition frequency down to 0.1Hz to get the program to work. Still, some of these overlapping events are still present (more or less often). It is possible to prevent these overlapping events to appear?

Thanks 

Is this "overlapping events" a Dasylab feature where it detects that it is trying to start a new scan when the previous scan is not yet finished?  Use Section 3.1 to estimate how long it will take to do things.  Analog inputs readings with ResIndex=12 take about 160ms each, so I would expect 6 of them to take about 960ms.

Thanks

So, at 0.1 Hz (10 sec interval) I wouldn't expect to have any of these problems since there is plenty of time to acquire all channels. Isn't it?

Thanks

 

I don't know the details of what an "overlapping" error from Dasylab means, but I can say that yes 10s is way more time than it will every take to get 6 such AIN readings.  If I did a test with 1000s of such scans, I would expect that most would take right around 960ms, and a few outliers might be just over 1000ms.  Perhaps you could get a TCP traffic capture with Wireshark (send to support@labjack.com) during the error and we could see if a problem is obvious in there.

Can you please tell me if the U6 needs to be recalibrated when the temperature changes? What would be the error when measuring an AI at -30 degC?

The temperature drift of the analog inputs is 15ppm/°C.  This figure is from Appendix A of the U6 datasheet.

My requirement is:

Common is +3.3V and differential voltage shall be 80uV. Will I be able to measure 80uV setting range ±0.1 Volt

U6 specs says: 

  • 14 Analog Inputs (16-18+ Bits Depending on Speed)
  • Analog Input Ranges of ±10, ±1, and ±0.1 Volt

You can measure 80 µV with the ±0.1 Volt range. The effective resolutions for the ±0.1 Volt range are 14 to 1.3 µV with resolution indexes 1 to 8. The U6-Pro provides additional higher resolutions. There is also a ±0.01 Volt range. Look at Appendix B in the U6 User's Guide for effective resolutions, in bits and µV, for different range and resolution index settings:

http://labjack.com/support/u6/users-guide/appendix-b

Thanks I am going through the appendix.

I just want to have clear understanding so asking again:

U6 can measure 80uV with +/-0.1V range. But at this settings, will it be able to measure 3.3V also?

3.3V will be common (will be measured accross +Ve point and ground, single ended measurement), while 80uV shall be differential mesurement.

Thanks.

Section 2.6.5 of the U6 User's Guide shows the valid output voltages (Vout) of the internal in-amp with different common-mode voltages (Vcm).  It only shows Gain=x1 (Range=+/-10V) and Gain=x1000 (Range=+/-0.01V), but they are quite similar, and you can use the Gain=x1000 graph for your case of Gain=x100.  Sounds like you are expecting a Vcm=3.3V and Vout=0.00008*100=0.008V.  This looks fine on the graph.

Say you have AIN0 and AIN1 connected at your 2 points with a 80uV differential, and also have your system ground connected to U6 GND (which is likely required).  You can take a differential readings of AIN0-AIN1 using the 0.1V range, and also at the same time grab single-ended readings of AIN0 and/or AIN1 using the 10V range which will return about 3.3V.

Thanks this explains a lot.

So is it possible to set AIN0-AIN1 at +/-0.1v range and gain=x100 and AIN0-GND at +/-10V range at Gain=x1 and take both measurement simultaneously?

(Meaning Can I set different gains for different analog input measurements?)

Thanks.

I am going to order U6, U6-PRO.

Before that, I want to understand what does U6-PRO offers over U6 for my requirement as below so that I can exactly decide to which device to go for:

1. Measurement type: DC voltage, single ended range: 0 to 3.3v

Differential range: 5uV to some mV

2. Will U6 and U6-PRO have different noise characteristics with respect to #1? (Please enlighten me with final resolution I shall get as device will use some bits for noise cancellation)

3. I read that U6-PRO adds extra slower ADC with high resolution, but for my differential range (5uV to mV) we cannot use that at range x100/0.1V, please help confirm this.

4. I want to use stream mode of U6, is extra ADC U6-PRO available in this mode?

Appendix B of the U6 User's Guide shows the typical noise levels of the depending on ResolutionIndex and Range.  ResolutionIndex=1-8 uses the hi-speed SAR ADC, whereas ResolutionIndex=9-12 uses the hi-resolution sigma-delta ADC.  The U6-Pro supports all values of ResolutionIndex, whereas the U6 only supports 1-8.

As you increase ResolutionIndex and decrease Range, it usually takes longer to acquire readings.  See Sections 3.1 & 3.2 of the U6 User's Guide.

The hi-resolution converter is not supported in stream mode.  Only ResolutionIndex=1-8 is supported in stream mode.  Stream mode is generally used for 100 scans/second or faster.  See Section 3.0 for a discussion of the difference between command-response and stream modes.

Just got U6Pro.

My old 16bit ICPdas was plotting a staircase shaped graph from load cell measurements and I was advise that UP6Pro would be the solution.

So far I've spent 16hours with the U6Pro and LJSTEAMUD and I'm still getting the staircase effect having gone through various settings.

I want to sample at 50hz on preferrably 4 channels -+10V range (1 load cell, 1 LVDT, 1 Thermocouple and 1 cold junction)

My load cell produces a 0 to 10V range with 5V being the 0 load position (for tension/compression testing)

Please advise what I should be setting thee resolution to? I was told that sampling at 24bit would solve my problem.

Please advise ASAP

There are a lot of details to get into here, so I would start a forum topic to really get into it.  Some things comment on in getting a forum topic started:

Do all 4 signals have the steps?

How big are the steps?

From Section 3.2, in stream mode with ResolutionIndex=0=1 and Range=+/-10V, we expect about +/-3 counts of noise (which is excellent), and each 16-bit count is 20/65536 = 305uV, so perhaps +/-915uV of noise.  To see if your U6 is performing that way, jumper a channel to GND and observe the noise.