LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Play csv file

Hello LabView experts,
 
I'm writing my diploma thesis and i sampled some accelerations as csv files.
 
to make the files more attractive for "public" i would like to play them via my soundcard.
 
I'm already able to import the values and to plot them, but I can not find the right icon to play them as sound
 
is it possible?
 
thank you very much for any answer!
 
Josef
0 Kudos
Message 1 of 4
(3,168 Views)
Hi aj109,

I was wondering if you could post a sample csv file - is your data a frequency (of say vibration)?

Also what version of labview are you using?

When you say you've managed to plot the data, did this include timing.. you need to convert your data into a waveform, but this requires delta T - you should know this as you've sampled the data, but you may have just plotted raw data based on loop cycles or sample number.

Once converted to a waveform it can then be played using in labview 8.5 there is an express vi to play waveforms. Also I am aware of third party vi's on the net that play different types of inputs etc.

Thanks
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 4
(3,155 Views)

Hi Hillman

sorry for this real incomplet post. 😞

i will add my vi and one of the csv files!

yes it is a frequency and i do have the delta T.

But the bad thing is, that I am using LabView 7.1 so i hope u can help anyhow.

 

Thanks Josef

Download All
0 Kudos
Message 3 of 4
(3,135 Views)
Hi Josef,
 
I have had a look at your code.
 
You seem to have created a waveform (a good start) but your dt value is 9e-9 which gives a sample rate of 111MHz - which is impossible. So what rate is your data really being sampled at? Your code also seems to separate the first value in the csv file - is this the dt, because 2.4.. would be too slow to sample accelerometer data.
 
A general comment about the code:
You do not need to build your waveform and filter it within the loop - this only needs to happen onces. However, you may want to keep your graphs in a loop so the keep updating - up to you. Also, NI recommend that everyone trys to keep the VI on one screen - this can be done by turning the icon option off, using SubVis and removing white space. Maybe this would make your VI easier to work on.
 
Playing waveforms:
In labview 7.1 you can play sound (much nicer in labview 8.5 - using express vi's).
If you go to the example finder (help>>find examples>>hardware input/output>>sound) and maybe look at continuous sound output should give you some help. This requires a known sample rate (as mentioend earlier).
 
let us know how you get on, 
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 4
(3,101 Views)