LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous sampling of data

I have multiple DAQmx channels being sampled at 1kHz, others being sampled at 10kHz.  I also have network data (timestamped) coming in asynchronously with changes at a maximum rate of 200Hz.

 

These are all being pulled in and recorded on a LV RT PXI chassis.

 

I would like to extract live data for viewing by the test operator on a remote PC.  They will want to view selected waveforms continuously..

 

Since all of these are coming in at effectively different rates, what is the typical design pattern for gathering live preview data (All aligned in time on the display)?  I suspect strip charts will be the basis, but those require the same dt and t0 for all input wave data.

 

Thanks,

 

XL

0 Kudos
Message 1 of 9
(3,346 Views)

I don't think you can realistially allign the data in time from your DAQ channels and your network data unless you are sampling them at the same resolution.  Is it not possible to get each data channel at 10 kHz?

 

If that is not possible, you can set up a acquisition process that will be based on the fastest resolution and just use previous data for the channels are slower.  It may not look right but it is one possible solution.

 

I suggest that you look at the continous measurement and acquisiton template for a start.  One of the drawbacks to it is that the display uses a notifier.  If your display can't keep up with the speed of the acquition then you will lose data points.  I assume that if you want to see every datapoint and not lose any that you need to switch that to a queue.

 

Joe

0 Kudos
Message 2 of 9
(3,340 Views)

I am trying to avoid oversampling in the PXI controller since it has other things it needs to do (Storing video).  Sending only the data needed for live viewing would be the preference.

 

Thanks,

 

XL

0 Kudos
Message 3 of 9
(3,332 Views)

JoeWork wrote:   you can set up a acquisition process that will be based on the fastest resolution and just use previous data for the channels are slower.  It may not look right but it is one possible solution.

That is exactly what I have done in some systems.  It mostly worked.  To do this, you need to have a specific loop just for keeping the data and replacing array data as the new data comes in.  Will also need a good communications/command scheme, something like queues of clusters that have a string (for the data name) and a 2D array of data should work.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(3,322 Views)

You are only talking about sampling at 10 kHz.  If your card or module says that you can sample the number of channels at that speed when you set up your task that shouldn't created any problem I would think.

 

I guess it also depends on what PXI station you are using also but if you are running into performance/speed issues there are things that can be changed/fixed to get the acquisition speed to where it needs to be.

 

Joe

0 Kudos
Message 5 of 9
(3,317 Views)

The cards can certainly sample at that rate (PXI-6281).  If I combined both and just sampled/recorded at 10kHz that would add a lot of recorded data to have to sift through (We normally only sample at 1kHz).  But that's certainly possible to do (I could even decimate the data to 1kHz for storage).

 

My concern is the network data and how to turn that into a fast 1kHz stream for pushing up to the laptop for live viewing based on irregular timestamped samples which I can align to the DAQmx samples without taxing the RT controller's high priority tasks or causing jitter.

0 Kudos
Message 6 of 9
(3,306 Views)

xl600 wrote:

My concern is the network data and how to turn that into a fast 1kHz stream for pushing up to the laptop for live viewing based on irregular timestamped samples which I can align to the DAQmx samples without taxing the RT controller's high priority tasks or causing jitter.


Then stream the data to the laptop at a 1kHz rate.  I would just use an average of the 10kHz data, keep the 1kHz data as it is, and keep the latest slower data as it comes in (duplicate that data until it is updated).  Shouldn't be that difficult.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(3,299 Views)

That sounds easy enough.  Is there a library VI which would sample the network data at 1kHz in a similar fashion to DAQ?  Or perhaps a function which can generate a stream of 1kHz data based on an asynchronous input sample?  I've been living in FPGA land too long...


Thanks!

0 Kudos
Message 8 of 9
(3,295 Views)

I do not know of a library.  But what I did the last time I did something like this was have a seperate loop that others could communicate with via a queue.  I just kept the latest data from all systems in shift registers.  When I recieved the 1kHz data, I packaged up my latest data from the shift register and sent it to the laptop for logging.

 

A queue with a cluster constaining a string (for the data origin) and a variant (for the data) is probably how I would take care of this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(3,292 Views)