04-28-2015 01:22 PM
Hi,
I got the comparison waveform for two methods as follows.
As we right click on waveform chart and export data to Excel, and then Choose the CSV format.
a CSV file is generated.
I want that, same CSV file can be used to display the waveform chart as it is (for further analysis).
I am using the following Code but not getting results.
Please suggest the modifications, CSV Data file and VI is attached, for reference.
Regards
MMS79
Solved! Go to Solution.
04-28-2015 01:33 PM
You may need to transpose the 2D Array to get it into the format you need.
04-28-2015 01:33 PM - edited 04-28-2015 01:36 PM
Every other column is "time", so you need to exclude that (and use the information for x0 and dx of the x axis).
Also, since you get all data at once, a graph would be more approriate than a chart.
Otherwise, the data is read just fine. What is the language setting of your computer (e.g. is the decimal seperator a period or comma?)?
It seems strange that the csv file only contains integers. What is the datatype of the original chart?
04-28-2015 01:35 PM
@crossrulz wrote:
You may need to transpose the 2D Array to get it into the format you need.
His chart was set to transpose (right-click) and the data displays OK here as is, it simply also includes all the x-ramps.
04-28-2015 01:48 PM
In general, saving as CSV is not a good option, because it often interferes with language settings. A much better option in excel is to save as text, which will give you a tab delimited table that can be read with the default delimiters of "read from spreasheet file".
04-28-2015 02:07 PM - edited 04-28-2015 02:26 PM
Thanks for the reply, altenbach.
New for a labview. Actual data is 1 to 5 volt, which is converted in (water level)% in Labview (For water level controlSetup).
Tried by saving in text. but got the same result as before.
04-28-2015 02:14 PM - edited 04-28-2015 02:16 PM
MMS79 wrote:Tried by saving in text. but got the same result as before.
And what result is that? Does the array contain any data?
As I said, I can read and display the file using your code unchanged without problem. There must be something special in your environment!
04-28-2015 02:17 PM - edited 04-28-2015 02:31 PM
@altenbach wrote:
As I said, I can read and display the file using your code unchanged without problem. There must be something special in your environment!
Here's what I get using your code unchanged (except rearranging the FP and selecting the csv file you had attached earlier.
(Of course the first row is numeric garbage (headers) and will show as all zeroes)
04-28-2015 02:33 PM - edited 04-28-2015 02:42 PM
The data in array is perfect, where as in waveform it seems to be different or not getting configured properly.
How can i make the waveform similar from which i got the data itself.
I have to show the waveform, whenever required using Excel, CSV or text file any suitable format.
04-28-2015 02:44 PM
@MMS79 wrote:
How can i make the waveform similar from which i got the data itself.
Define "similar". To have it look cosmetically similar, customize the graph (background color, etc.)
As I said use a graph, not a chart. Drop the first row and all even columns (they contain X).
(You could read the first row as strings and populate the graph legend if desired.)