LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

separate multiple ai acquisition

Solved!
Go to solution

hi there,

I acquire data from 10 AI channels simultaneously using a common DI trigger. when I separate them into indivdual signal for scaling purposes and merge and plot them again, seems that my time axis also changes, apparently to the number of samples.

Ive attached 2 pictures to illlustrate my problem.

 

please Note that Im using a pcie 6259 card and that I separate dynamic

thx for helping

 

regards

don

Download All
0 Kudos
Message 1 of 8
(4,012 Views)
Something is obviously happening in your two subVIs that do the splitting and measuring. The timestamp from the waveform data type is probably being removed. What are these subVIs? Are they VIs you wrote? Why so many dynamic data type wires? Why don't you just keep everything as a 1D Waveform array?
0 Kudos
Message 2 of 8
(3,991 Views)

hi dennis,

 

yes they are subVIs that I wrote. The splitting vi basically splits the 10 AI (from accelerometers) into individual signals and offsets each one of them by their DC value before merging them back together. the measuring vi scale the signal using corresponding sensitivity values and gain.

 

Im fairly new to labview and programming in general and im pretty sure there is a much more efficient way of doing what i want to achieve.

Ive attached the sub-vis.

 

thx for helping

 

regards

don

Download All
0 Kudos
Message 3 of 8
(3,972 Views)

The correct way to do the split offset is shown below. Your code used the split signal function and then you converted the dynamic data to a y array. The y array has no time information. That's why your graphs don't match.

 
 

 

The other VI is not very comprehensible. Some of that is due to the messy wiring and also because you have another subVI there. It would be so much easier if you just posted the actual VIs.

Message Edited by Dennis Knutson on 10-14-2008 05:55 PM
Message 4 of 8
(3,959 Views)

Hi again,

Ive did try your way before by using the for...loop but at the subtraction subvi, I kept getting an error message stating "the waveforms have different dt values". One more thing; how do I select each individual signal so as to perform customised scaling to them.

 

thx again for helping

 

don

 

 

0 Kudos
Message 5 of 8
(3,942 Views)

....one more attachment

 

0 Kudos
Message 6 of 8
(3,941 Views)

Oops, your're right about the error. Since the Average DC/RMS function is really returning a single scalar in the waveform data type, just use the Get Waveform Components to extract the Y array and an Index Array function to get the first (and only element) in that. Then there will be a scalar subtracted from the original waveform. If I had bothered to look at the help, I would have seen that the averaging time input defines the dt of the output waveform.

 

I would recomend that you use a for loop in the Bundle_Measured_data as well. 

Message 7 of 8
(3,933 Views)
Solution
Accepted by topic author DAQ_Newbie

Exactly what i wanted.

A true knight indeed you are!

 

Thanks heaps for your help and your prompt replies

 

regards,

Don 

 

0 Kudos
Message 8 of 8
(3,922 Views)