LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display a .csv file as a real time waveform using labview

Make another slight modification and add a shift register just like I did in the the example I posted and you can go back to using a graph. You will also want to create a 1D array constant for the array type input of the Spreadsheet String to Array - again like I did in my example. With a shift register and graph, the array will keep getting bigger and bigger and performance will eventually suffer. With a chart, you don't need a shift register but eventually, you will reach the chart history length and old data will be dropped.
 
How long do you want the VI to run and how much data do you want to display?
Message 11 of 21
(1,934 Views)

Thanks for that. I turned it into a 1D array and displayed it on the chart. It works real-time now but for some reason every second element is plotted as 0. Eg; 100,0,101,0,102,0,103,0,... So the peaks of the waveform is what im interested in. I'll give it another go tonight and see how it goes.

I want to display the data for up to 1 hour or so. I know this = a hell of a lot of data. The .CSV is inputting 33 samples/sec. I will also need to look into logging this data as well.

Thanks.

0 Kudos
Message 12 of 21
(1,920 Views)
I've been searching around the forums and I found a GREAT VI (will add the author soon) which is extreemly close to what im trying to achieve. The Vi attached displays a randomly generated number then adds it to the chart and at the end logs a file. All I really need to do is display the element in my .CSV file instead of the randomly generated number. The problem is that I have an array of numbers. How do I get them displayed like the random numbers in this Vi? Sounds simple i know, but I cant seem to get it right Smiley Mad

Message Edited by simonious on 10-31-2007 06:00 AM

0 Kudos
Message 13 of 21
(1,912 Views)
It sounds like the only problem you have is with the data and the interleaved 0s. It would be nice if you could post your VI with an actual string that you are receiving. Make sure you have an indicator for the VISA Read. Run the VI until you have data in the indicator. Go to the edit menue and select 'Make Current Values Default'. Save the VI and post it.
Message 14 of 21
(1,902 Views)
Hi, Ok... Theres no interleaved 0's. It had something to do with the amount of bytes that the VISA is given to read. The way my data is being input is this --> Example... 100,101,100,99,98,99,100,101... When it goes to 2 digits the VISA goes out of sync. Thats ok, i can pad some zeros no problem. But I think what i really need to do is find out how to adapt my number array into the "Aquire_Using_Random_Number.vi" so it is plotted on that chart.
 
Dennis, the following vi is saved with the current defaults. Thanks.

Message Edited by simonious on 11-01-2007 04:35 AM

0 Kudos
Message 15 of 21
(1,891 Views)
There's a couple of things that I don't understand. You said you are getting a .csv file but your string indicator only shows a single value. You've got a fixed byte count for the VISA Read. Is the data from the instrument really a single value or is it sending out multiple values separated by commas? if it's a sinlg evalue, you don't need to jump through all of the hoops with the String to Spreadsheet (which you've implemented incorrectly byt the way). If it's a single value, just wire the string to a Scan From String and wire the output of that to the chart.
0 Kudos
Message 16 of 21
(1,878 Views)
Maybe this will help you.


Message Edited by andre.buurman@carya on 11-01-2007 04:26 PM

The False case runs straight through.

Message Edited by andre.buurman@carya on 11-01-2007 04:27 PM

Regards,
André (CLA, CLED)
0 Kudos
Message 17 of 21
(1,876 Views)

Dennis,

The reason why the indicator is only showing a single value is because the VISA byte count is set to 4. Therefore the VISA reads in one value at a time (eg. "105,"). If I increase the byte count to say 1000, the VISA will read 1000 bytes first and THEN place them on the chart. This doesnt really work well and isnt real-time. The instrument is sending out multiple values separated by a comma (33 values/sec).

Andre,

Thanks for that, i'll see what i can do. Whats the name of those functions by the way? It'l help me find them quicker.

 

Thanks guys.

 

Simon.

0 Kudos
Message 18 of 21
(1,855 Views)
Then simplify it to this.
0 Kudos
Message 19 of 21
(1,854 Views)
Cool, thanks for that. i'll give it a go and let you know how it pans out. Thanks.
0 Kudos
Message 20 of 21
(1,847 Views)