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.
01-17-2007 01:27 PM
01-17-2007 01:46 PM
So a couple of ideas or points. I am not sure why the results are not right, but I do see something a little strange about the property node.
You set the active plot last, so the logic would be something like this. First loop through active plot is 0 simply due to just opening the VI. You set the settings for plot 0. Then you set the active plot to 0.
Next loop through, the active plot is 0, you reset all its values then you set the plot to 1. Next loop (lens 3) you now set all the lens 3 stuff to the plot 1, and then set active plot to 2.
Now that does not explain what you are seeing, but may help. Another area to modify is your string search area. You can replace almost all of it with a Strip Path.
Give those a try and see if they help. If not attach your VI so we can all debug it along with you.
01-17-2007 02:00 PM
01-17-2007 02:26 PM
Alright the issue and solution becomes more apparent in 8.2, but here goes. You are trying to set plot values (name) etc to the graph. However LV is not sure there are actually that many plots so it ignores you, or generates an error. It is not until after the for loop that the graph discovers it has 5 plots.
So to fix this is pretty easy. Before the for loop runs all you need to do is initialize an empty array of plots. So create a local variable off the graph, and then create a constant off that. You now have a constant of 5 plots. To make it a little more ropust, I suggest pulling 1 of th eclsuters out and then use initaliaze array with that as the data element, and the size of your path array as the number of elements. Wire that to the local, and you should be in business. Basically we told the graph it has n plots, they just happen to start out empty.
01-17-2007 02:56 PM
Success!
Thank you Evan, the initialized array worked