Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you graph an array of values?

With a 2-D graph in Measurement Studio and VB6, can I have the graph use an array to plot from. I know how to log a graph to a file, but I then want let the user be able to select a log file and open it to see the graph. If this is possbible, is there any specific format the array should use?
0 Kudos
Message 1 of 2
(2,439 Views)
Just write an ASCII spreadsheet file with the X axis in the first column and the Y data in the adjoining columns. Use an exponential format with enough decimal places for the precision you need.

You can simplify the task if don't have labels on the columns by using the Read From Spreadsheet File.vi to convert the 2-D data directly into the array. If you have column headers, you will need to use the Read Characters from File.vi and strip the first line by searching for the CR. Then convert the rest of the text with the Spreadsheet String To Array.vi. Finally, bundle each data column with the X column for the X-Y Graph.

If you choose the Write Waveforms To File.vi, there is additional header information that will have to be removed.

Michael
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 2
(2,439 Views)