12-18-2012 09:26 AM
Labview experts,
I have a really simple problem in labview:
I have some data in excel: 2 columns with a certain number data. The two columns are related to each other. So I want to plot all the points in a x y graph. Coordinates point 1: (row1,col1) coordinates point 2: (row2,col2)...
Now i want, in a first step, import this data in labview and draw the X Y graph in labview.
So the points of the first column on the x axis and the data of the second column on the y axis.
that's how i do it now: Attachment
That's only working if i'm using a waveform graph, but i want a XY graph
Is there somebody with a solution,
Kind regards,
Jelle
12-18-2012 09:47 AM
There are examples included with LabVIEW for plotting data to XY graph.
12-18-2012 09:51 AM
Yes, that's true.
But it's never working with my imported data out of excel...
Regards,
Jelle
12-18-2012 10:02 AM
Then you need to write LabVIEW code to get your data into the "format" required for XY graph.
12-18-2012 11:25 AM
I typically make an Excel report template with the columns of data and the Plots pre-made. So when I drop in the data using the NI ADO driver for Excel, Excel automatacally updates the graphics. I don't have to do anything, but transfer the data into Excel. Creating the plots thru coding is time expensive and more complicated, when a simple graph ready to go in a template is so easy and fast.
12-19-2012 06:08 AM
I have also the same problem.
And yes indeed I have to get my data in the correct format for XY graph.
But how can I use only the first column for the x axis and the second column for the Y axis.
Or in general if i have a read from measurement file (for instance an exel) how can i use only the first row of data of this excel?
12-20-2012 08:51 AM
Hello,
Can you share an extract of your excel data?
This will allow me to put some simple code together to illustrate how it can be done.
12-20-2012 12:08 PM
To setup a plot of XY from dual column data in excel, select the two column including the name header for both column and then select to insert a scatter plot with the points connected by lines and Voila you have a 2 axis plot with x and Y dimensions and including the title for the trace from the column header already formatted for you. If you select more than 2 columns then the first is the X dimension and the remaindre columns all become Y axis traces for multiple plot lines for each column. This is easy folks and basic excel functions for plotting. One the graph is created and displaying the data, clear the data and save as a template. Now when you call the template and stuff the columns of data into the table fields, excel automatically updates the plot and all you have to do after stuffing the data in is save the excel file. Task done. Good luck.
12-21-2012 02:45 AM
Please find the attached screenshot .
I hope this will serve your purpose.
Thanks
12-24-2012 02:08 AM
Hello Jelle,
If you need any more help, then please let us know!