11-01-2008 12:15 PM
Hi,
I've been trying all day to modify a labView program so it reads in data from my csv file to graph temperatures from 4 ovens. The temperatures are logged in the csv file at 3s intervals and i wish to display them on 4 graphs. I've written a vi (or modified one i should say) to take in a temperature value from a numeric control. Im just having extreme difficulty with the reading part.
If someone can help me it would be greatly appreciated.
Best regards,
Dawn
11-01-2008 01:23 PM
It really does not make sense to put the Read From Spreadsheet inside the while loop. Put it outside and read the entire file at once. You can then use the Index Array function to get the different columns. Instead of the while loop, I would use a for loop and just wire the arrays through the for loop. That will auto-index each element and you just have to wire each element to a chart.
Your data file is a little strange though. If this is a file you created, I don't understand the reason for the quote marks or the '0' part of each element. In the future, you will want to save the sample interval in the file so you can automatically set the delay time when you want to simulate an actual acquisition.
This is all pretty basic stuff and you might want to check out some of the LabVIEW tutorials
10-12-2010 11:12 PM
Hi there,
I have a similar problem here. I see your point that you should read the file at once but I don't seem to be able to manage it. Shouldn't you use some kind of
a buffer to achieve this? Let me tell you what I am trying to do: I have a csv file with several columns that I want to display in several waveform charts. Each column is a wavechart. I should be able to change the speed at which the data is displayed. I am able to do this because I change the wait until (ms) in the for loop. However the application is too slow. I think because I open the csv file in the for loop and display it while I am reading it. I have tried to put it outside the for loop but this doesn't work. I think I need some kind of a buffer in which the data is stored after reading it. And then this buffer should be used in the for loop. I have looked at the producer-consumer structure but I dont fully understand it as I am not that experienced with labview. Any help or changes to my VI would be appreciated. I have attached the VI and the file with meaningless data I am using for testing.
Thanks
10-12-2010 11:34 PM
Hi again,
I got your hint. When I seperate the columns and then route them through the for loop to the waveform charts it gets indexed by itself. No need to index the elements out
of the arrays.
Thanks a lot for this hint. This has been helping me a lot.