LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multichannel DAQ and 2D waveform

Solved!
Go to solution

Hi,

[Using labview 2011 academic licence with NI9234 and cDAQ-9178].

I am trying to read, display and record signals from two isotronic accelerometers and a microphone simultaneously for future signal analysis (FFT, etc).   I wish to display realtime waveforms vibration and sound data at sampling rate of 44100Hz and display a final sampling waveform which takes approximately 40s.  I wish to then write these data onto a file.

The associated block diagram, vi attached.  I could display in real time each accelerometer and sound by using loop iterations and split signal.  Unfortunately I am recording all three channels of data into a single 1D-waveform array.  It appears that the data is saved as iteration1(ch0).iteration1(ch1).iteration1(ch2).iteration2(ch0).iteration2(ch1)... and so forth. 

 

Although I could display all three signals separately in the waveform graph but I will prefer these data to be saved as 2D-waveform array (each channel in a separate column).

I believe this issue was raised here (http://ni.lithium.com/t5/LabVIEW/Concatenate-2D-data/td-p/873409) unfortunately no solution was suggested.  How can I save the signals from the DAQ into 2-D waveform? 

 

Thanks.

0 Kudos
Message 1 of 4
(2,997 Views)

Your array building in the case structure is all wrong. You are getting a 1D waveform array with 3 elements - one for each channel. What you are doing is appending another 1D array with 3 elements in each iteration. You end up with many elements instead of just 3. What I think you should try is the append Waveforms function inside of a for loop so that the data for each channel is appended to the data from the previous acquisition. You could also try placing the Write Waveforms to File inside the loop or even better, in a producer/consumer architecture where the data gets saved each iteration.

0 Kudos
Message 2 of 4
(2,977 Views)

Dear Dennis,

Thank you for your comments.  I am a newbie, into my second month exposure with Labview or similar software.  I have difficulty translating your suggestions into actual work.  Nevertheless I tried working out something which I thought is working.

Could you kindly have a look at the vi if I might have overlook any error.   Sorry it appeared very busy.

 

Appreciate your help.  Thanks.

 

Crawling.

0 Kudos
Message 3 of 4
(2,964 Views)
Solution
Accepted by topic author Crawling

I believe the attached vi represent a producer consumer architecture solution for the above mentioned problem.  Just thought of sharing to those that may experience a similar situation that I had faced. 

0 Kudos
Message 4 of 4
(2,918 Views)