LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

updating a property node from a sub-vi

I want to have a string indicator box that updates as my program moves along, i have been using the property node this works fine in the main vi but now i want to update it from a sub iv. any ideas?
0 Kudos
Message 1 of 4
(2,855 Views)
Hi Andrew,

You will want to make a reference to the control on your top level vi and pass the reference down to your sub vi. Then you can update the control as you were with the property node using the reference you passed down.

hope this helps

cheers,

--Russ
Message 2 of 4
(2,850 Views)
Tip: The easiest way to accomplish this is to do the following:
  1. In your top-level VI that has the control right-click on it and select Create-->Reference. This will allow you to place a reference in top-level VI's block diagram.
  2. Create a new VI that will be your subVI.
  3. Drag and drop the reference object from the block diagram of your top level VI to the front panel of your new subVI. This will create a reference control on your subVI that is of the same type as the control on your top-level VI.
  4. Connect the reference control on your subVI to a connection terminal, and then wire the reference object in your top-level VI's block diagram to the subVI's input terminal.
  5. Then, in your subVI you can just use the standard "Property" and "Invoke" nodes to fiddle with the control.
Message 3 of 4
(2,829 Views)
Hey guys,
Thanks that works so well. Just a quick comment for anyone else doing this, if you just create a reference control on your subvi you have to make sure that you set the class properties to the type of control your useing in your main vi.
 
Thanks for the help,
Andrew
0 Kudos
Message 4 of 4
(2,826 Views)