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: 

Property Node Error

Hi all,
 
I was receiving Error 1077 at Property Node (argument 5 - Active Plot).  I am ignoring errors within the property node and the VI runs smoothly but my legend is returning only 1 value, rather than 5 values. 
 
The legend should include Lens 1, Lens 2, Lens 3, Lens 4, Lens 5; but I am getting results of just Lens 2; or results of Lens 1, Plot 2, Plot 3, Plot 4, Plot 5. 
 
This is the portion of my VI where the property node is giving me trouble.  I attached this large of an image to show all connections to the property node, everything else before this frame is remote control/scanning subvi's that don't affect it in any way.
 
Any help concerning the property node and any elements I should add or remove would be greatly appreciated.
 
Thanks
0 Kudos
Message 1 of 5
(2,649 Views)

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.

Message 2 of 5
(2,639 Views)
I moved the Active Plot to the 1st element slot and it didn't appear to change anything.
 
Attached is the VI for you to take a look at.  The subVIs do not relate to my problem so I'm not attaching them (there are far too many of them to attach anyway).
 
Thanks
0 Kudos
Message 3 of 5
(2,634 Views)

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.

0 Kudos
Message 4 of 5
(2,621 Views)

Success! Smiley Very Happy

Thank you Evan, the initialized array worked

0 Kudos
Message 5 of 5
(2,612 Views)