LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading from a text file and using the data to create a waveform

I am trying to read from a text file and use the data within the text
file to use it within a waveform graph. The text file has the
following data format( # of seconds, y-value). Can you please let me
show me how to read in the data one element at a time so I can use it
within a graph? I need to seperate each arry element so i can
extract the number of seconds and the y-value for the graph.

Thanks
0 Kudos
Message 1 of 4
(3,430 Views)
Please download the following zip file and disregard the last vi. Also the text file that I need to read from is attached as well.

Thanks
0 Kudos
Message 2 of 4
(3,423 Views)
Instead of using Read Characters use the Read from Spreadsheet File VI. Wire a comma in as the delimiter and it will give you the data as a 2D numeric array. Make sure you remove the first line.
You can wire the data directly into an XY graph indicator, but to make it work, run the array into a for loop, place Array to Cluster in the loop. Right click it and select 2 as the cluster size. Wire this out of the loop and into the XY graph. You can also see an example of an XY graph If you search for "graph" in the example finder.

___________________
Try to take over the world!
Message 3 of 4
(3,416 Views)
Thanks for the help
0 Kudos
Message 4 of 4
(3,401 Views)