From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Insert Graph VI

Has anyone experienced the behavior of when using the Excel Insert Graph VI multiple times for different datasets that the graph will not always appear? When I run the below code, I see this behavior with a few graphs.

Download All
0 Kudos
Message 1 of 8
(3,279 Views)

@Eric1977 wrote:

Has anyone experienced the behavior of when using the Excel Insert Graph VI multiple times for different datasets that the graph will not always appear? When I run the below code, I see this behavior with a few graphs.


Can you attach a LV2013 version.

 

Ben64

0 Kudos
Message 2 of 8
(3,262 Views)

Even better...here's a 2012 version since that's what I think most use.

0 Kudos
Message 3 of 8
(3,255 Views)

The issue is cause by the fact that you didn't wire anything to the column and row headers inputs. If you read the help file for the Excel Insert Graph VI the following is specified:

column headers specifies the text of the column labels on the graph. Leave this parameter unwired if you want to create an XY graph.

row headers specifies the text of the row labels on the graph. Leave this parameter unwired if you want to create an XY graph.

 

In your case you want to create an xlLine type graph but in fact you are creating an XY graph. Just wire something to the Row Column header inputs. See attached (LV2013).

 

Ben64

0 Kudos
Message 4 of 8
(3,248 Views)

 

Ben,

 

The graph in your example is not what I am after. I do not need two lines of data in the same graph. I am only after one line being plotted per graph.

 

I was under the impression that the first row of data was the data points (1,2,3, etc.) while the second row of data was the actual data needing to be graphed (5,2,5,etc) and did not need the row and column inputs.

0 Kudos
Message 5 of 8
(3,239 Views)

OK, I misundertood your post. I put your code in a for loop and made a couple of try and was able to reproduce the issue. Moving the New Report.vi and Dispose Report.vi out the the loop seems to solve the issue.

 

Ben64

0 Kudos
Message 6 of 8
(3,230 Views)

I repeated it a few time with more graph generation and the issue is still there. Note that if you double-click on a blank graph it update correctly and the trace appear. The only thing I could think of rigth now is to add a wait ms function to slow down the loop a bit.

 

Ben64

0 Kudos
Message 7 of 8
(3,222 Views)

I worked around my solution with using VBA code in Excel to generate the individual graphs since it was the more consistant, reliable solution.

0 Kudos
Message 8 of 8
(3,072 Views)