From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limited Sampling Rate for Data Acquisition Through LabJack

I am using LabVIEW to acquire data through a LabJack U3-HV. Ultimately I plan on using it with a piezoelectric strain sensor but for now I am just producing square wave using an Arduino Uno to test my program.

 

The program is fine with signals with fundemental frequencies below 1.6 Hz but anything above that and the results are move like a triangle wave and FFT's of the data don't produce peaks. According to the company website the LabJack has a max sampling rate of 50 Hz so that should not be the limiting factor.  I am running a for loop with a wait time of 0 ms but the sampling rate appears to be closer to 35 ms. 

 

Has anyone had this problem before and/or has any ideas about how to solve it?

0 Kudos
Message 1 of 6
(3,399 Views)

Hi bruce,

 

what does the LabJACK manual tell you about hardware-timed samplerates? Can't you use such a reading mode on your analog inputs?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,396 Views)

In Feedback Function Mode (software timed) the U3 should be able to return 80 to 1000+ samples per second, depending on setting, USB speed, number of channels, and so on. In streaming mode 2500 to 50000 samples per second are possible, depending on resolution. Again thi smay be limited by the USB port or the program configuration.

 

Lynn

0 Kudos
Message 3 of 6
(3,383 Views)

So switching to stream mode should at least allow me to determine whether or not the LabJack itself is the problem. I have been trying to do this through the LJ UD in LabView but have had no luck. How should I go about changing modes?

 

Thanks. 

0 Kudos
Message 4 of 6
(3,357 Views)

I am not using Windows so I cannot comment on the LJ UD driver. Two years ago I tried to get thier Mac framework running, but the project was cancelled.

 

In looking at the stuff I had back then I see Configure Stream U3.vi in the Utilitiy VIs which came with the LJ UD download.  I would try starting with that.

 

Lynn

0 Kudos
Message 5 of 6
(3,338 Views)

See here for an overview of command-response (software timed) versus stream (hardware timed) mode:

 

https://labjack.com/support/datasheets/u3/operation

 

The sub-sections 3.1 and 3.2 have details about the speeds you can achieve with either.

 

See here for an overview of the UD driver for Windows:

 

https://labjack.com/support/datasheets/u3/high-level-driver/overview

 

The LabVIEW examples for the UD driver are here:

 

https://labjack.com/support/software/examples/ud/labview

 

To test command-response speeds use the attached "U3 CR Speed Test.vi".  To try stream mode, start with "U3 easy Stream Example.vi" from our LabVIEW_LJUD archive.

0 Kudos
Message 6 of 6
(3,310 Views)