LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

selecting active plot

Hello,
I am reading a number of data file with a while loop and plotting them to a XY graph. I would like to make the graph legend based on the index value. I cannot seem to access the active plot and label it. (Error= Selected invalid property node). Can anyone point out what the error is? Thank you.

KB
0 Kudos
Message 1 of 4
(3,081 Views)
"Active Plot" cannot be higher than the number of plots you actually have. You do a +1 twice for ActPlot, thus the first plot you select is #2 while you don't even have a plot yet. Also make sure the property node happens after data reached the x-y graph terminal.
--wire ActPlot directly to [i], the iteration terminal. The first plot is #0!
--add a +1 to [i] before wiring it to LegPlots (input there cannot be zero). If there is only plot zero, you want one legend visible, etc. right?
-- Leave "autosize legend" out, because it does not change. Either set it manually or set it with a property node once before entering the while loop.
-- The first ActPlot (read mode) is useless. Remove it.
See if this helps.

It is probably more efficient to attach th
e actual VI compared to a 1.3MB bitmap. 😉
Message 2 of 4
(3,081 Views)
That worked for me - atleast partially. I say partially because the plots are reversed. The legend for plot 6 is actually plot 1, legend for plot 5 is actually plot 2 and so on. How do I reverse it?

Thanks for your help.
0 Kudos
Message 3 of 4
(3,081 Views)
The problem most likely has to do with the final build array before your graph. In this build array you put the new input on top and the input from the shift register on bottom, that will cause the new input to be placed before the previous inputs, effectively reversing the plot order in your spreadsheet file. Try switching the inputs around.

Regards,
Ryan K.
0 Kudos
Message 4 of 4
(3,081 Views)