LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

high speed streaming

Solved!
Go to solution

Labview 8.5

Hi all. I have never written LV or any other code to do high speed streaming but I have to now. I have done a lot of 2 and 3 channel low speed data acq but never H.S. I could use a little guidance as to how it works.

 

First - what I have to measure. I am measuring engine valve motion, real time on a test jig that motors part of an engine. I will sample motion at a slow control RPM then accelerate to max speed while taking data. The sweep will take 5 to 8 seconds.

 

2nd - what I need to look at. I need to look at valve position for 1 revolution, taken in 720 points, at low speed and compare it to the same trace at test RPM. I will have to select test RPMs after data is taken and overlay lo & hi plots, one control and one test trace at a time. All analysis to be done after the data collection, not real time. Sampling range will start at about 12k samples/sec and ramp to 66k samples/sec for up to 8 sec. which will generate up to 312,000 points per sweep.

 

3rd - what I have. High speed laser position sensor, more than adequate sampling speed. Rotary quad encoder, 720 pulses/rev. Data acq boards and sig conditioner chassis with inputs / outputs. Boards are PCI-6143 and PXI-6071e. 6143 board is wired to encoder and trigger inputs. Laser output is 0-10v so I have to use the 6071e board for the analog position signal.

 

Now, my questions. I know I can stream data to get the high rate but for analysis I need to bite this data into 720 point chunks, and relate them to a recorded RPM. It can be analyzed in discrete steps, say roughly 50 or 100 RPMs. How do you handle writing a stream coming in from one board and 'stamp' it with RPMs taken from an encoder on a second board? I'm looking for basic procedure here that will give the data to me in a way that I can actually use it, rather than a 312,000 point dump that would take days to analyze without some tricks. I will calibrate data after the fact and analyze in a separate program, so I just need to stream voltage data. But I need to start at the Z pulse and take a reading each A pulse.

Thoughts?

Labview 8.5
Meas Studio 2008
0 Kudos
Message 1 of 7
(3,025 Views)

Consider using the encoder pulses as conversion clock. That is take one sample on each of the channels every time the encoder generates a pulse.  This results in data which is uniformly sampled in the ANGLE domain, while being quite variable in the time domain.  Start the whole process with the Z pulse. It is probably a good idea to record the Z pulses on an input channel for confirmation of synchronization, if you are not already doing so.

 

Note that using this technique will prevent you from using most filtering and spectral analysis VIs because they assume the data is uniformly sampled in time.  The VIs will still work, but you must determine what the transformation to the angle means when you try to interpet the outputs.

 

Lynn 

0 Kudos
Message 2 of 7
(3,019 Views)

Thanks for a starting point. Yes I intend to use the A pulse for the clock and the Z pulse as a trigger to start collecting. I have no experience in streaming. Can I stream data from 2 dif boards and save them as 3 channels; 1=Z pulse, 2=A pulse, 3=voltage? Then could I read the streamed data & simply rewrite it to say, a .csv file, one 720 point chunk? Or would I have to stream 2 or 3 files simultaneously? Is this even possible?

 

As far as using angle rather than time domain, no problem as I will post process everything. Interestingly, using FFT in angle domain is a benefit rather than a detriment (for what I am doing). Oh, post processing may be done in a different language, i.e. Excel or Visual Studio.

Labview 8.5
Meas Studio 2008
0 Kudos
Message 3 of 7
(3,009 Views)

Since you are only running for 8 seconds and expect ~300,000 data points, why not just keep all the data in memory until the run is over then write it to the file?  At 8 bytes per DBL, that is ~4 MB.  LV2012 with no VIs open occupies 128 MB so 4 MB of data is a drop in the bucket.

 

Lynn

0 Kudos
Message 4 of 7
(3,005 Views)

Really? LV8.5 not 2012. Would that handle it? If it fits I could maybe do a down and dirty view after collection to verify results. All I need to see is the shape of the plot, not rendered & calibrated data. So you say just collect to an array? That would be heaven. It could happen fast enough? 66k/s x 3?

 

Labview 8.5
Meas Studio 2008
0 Kudos
Message 5 of 7
(3,002 Views)
Solution
Accepted by walter-donovan

I had LV 2012 running when I replied to your earlier post.

 

I called up LV 8.5 and put together this little VI.  It generates random numbers at approximately 66000 per second and runs for about 8 seconds.  It requires about 17 MB.  The display requires a copy (I think) which approximately doubles the data size in memory.

 

Reduce the Wait to 1 ms and it runs in about 1 second.  With a zero ms wait it takes 76 ms.  So saving the data in a shift register or other form of memory will not be a bottleneck.

 

Lynn

Message 6 of 7
(2,992 Views)

Thanks so much. It will work.

Labview 8.5
Meas Studio 2008
0 Kudos
Message 7 of 7
(2,960 Views)