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.
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.
08-01-2012 05:23 PM
Hi,
Just a quick question. I am using a Voltage Source meter that spits out an 2 arrays of data after it has done its measurement. I then plot the arrays with respect to each other using an Express XY graph. I have put the code in a for loop so that it does multiple measurements or multiple runs. So if a single run gives me a plot that looks like a straight line, 5 runs would give me 5 straight lines. My problem is that the graph, connects the last value of the previous run to the first value of the next run. I want it to plot each run independently but overlapping them in the same graph so that I can look for deviations. The XY graph is inside the for loop, so I would imagine, that when the instrument spits our the next set of data, it would be plotted in the same graph independently.
Any Suggestions?
Solved! Go to Solution.
08-01-2012 06:00 PM
Add an extra NaN value after each iteration.
08-01-2012 11:25 PM
Thanks for the quick response Altenbach. So would I be getting 2 columns with 11 elements in each column?
Does Labview just ignore the nan?
08-01-2012 11:39 PM
I have no idea if you would be getting 11 point, because you did not give enough information. But yes, any point having a NaN will be skipped and replced by a gap in the xy graph.
08-01-2012 11:43 PM
Sorry,
In my previous post I meant to say, that if I had 2 columns with 10 elements each originally, I would then have 11 elements in the new 2 columns. I would have to be careful though, since I have a mathscript also inside the code, that does some operations with the 10 elements. Would including the NaNs cause a problem in the mathscript operation?
08-02-2012 09:26 AM
Ah, I never saw the number 10 anywhere. 😄
You don't need to process the NaN with mathscript. It is sufficient to add the NaN to the data going to the graph terminal. Even if mathscript gets an NaN, you can probably test how it is handled.
What does the mathscript node actually do? If it is just doing some scaling, it probably will not matter, but if it would do e.g. a linear regression, it would probably give unexpected results.