LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use of grouped property nodes

HI,
I'd like to know if there is a way to use a  property node like  " value "  for a group of controls without doing right click /property node /value on each control.

Thanks
Olivier
0 Kudos
Message 1 of 11
(3,865 Views)
Hi Olivier,

make an array of references to those controls and wire it to a for loop with a single 'value'-property node!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 11
(3,853 Views)
Hi,
Thank you but this solution is not very useful because I must create a reference for each control and I'm already creating a property node for each control so that does not save me very much time.
Have you got another Idea or maybe I did'nt understand well what you said.

Thanks anyway
Olivier
0 Kudos
Message 3 of 11
(3,846 Views)
Hi Olivier,

to change a property of a control/indicator you need either the property node (created by right-click on terminal) or a reference together with a 'generic' property node.
There's no other way.

Using references is more versatile as you can easily move the properties inside a sub-vi to do the formatting there...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(3,841 Views)
Hi,
I don't see How I should do that could you please give me an example compiled under LV7.1.1.
Thank you
Olivier
0 Kudos
Message 5 of 11
(3,814 Views)
Olivier,

You can get a reference to the VI. From that get a reference to the panel. From the panel reference get an array of references to all the controls on the panel. All this can be done programatically with property nodes - you create one property node at each level and the program generates all the other references. You can match labels (provided a each control has a unique name) to isolate the members of the "group." I am working on a program which has about 50-60 controls on several tab pages and I need to modify captions for language localization. I am using the techniques described above.

Some of this has changed in recent versions and I have not checked to verify that all these things exist in LV7.1

Lynn
Message 6 of 11
(3,799 Views)
There is little reason to have many direct value property nodes in any given diagram. (I am just mention this because you explicitly mention "value"). A local variable has the same functionality but is more efficient. (of course, often you can use a wire or shift register for even cleaner code).
 
 
There is also the shared variable, if you run one of the newer LabVIEW versions.
 
I am afraid that you use all these value property nodes as a poor man's substitute of "variables", breaking all dataflow in the process. Can you explain why you need so many???
 
(btw: another way to copy a property node would be to ctrl+right-drag an existing property node, then right-click it and "link to...(select another control)". This is not faster in your case, but is quite useful if you want to duplicate a property node that has many properties defined.)
0 Kudos
Message 7 of 11
(3,790 Views)


 


@altenbach wrote:
(btw: another way to copy a property node would be to ctrl+right-drag an existing property node, then right-click it and "link to...(select another control)". This is not faster in your case, but is quite useful if you want to duplicate a property node that has many properties defined.)

Hi Altenbach,

I think you meant Ctrl+Shift-drag and "link to......(select another control)". Am I right... ?! Smiley Wink

- Partha ( CLD until Oct 2027 🙂 )
Message 8 of 11
(3,776 Views)
Just ctrl+drag should be sufficient. 🙂
0 Kudos
Message 9 of 11
(3,772 Views)
Ya, Ctrl+Drag is for just copying, Ctrl+Shift+Drag will copy in the same line as you drag along, I mean, horizontal or vertical, but not at a random location in the BD.
 
Try it out... Smiley Wink
 
See the attached screenshots for furthere reference.
 
I normally adapt this method to copy, since it gets copied in the same line of the earlier node (most of the times I do vertical copy).
 
This is useful when you re going to wire the same values for many controls of the FP for a particular case.
 
Our code also will look neat by this way. Smiley Wink
- Partha ( CLD until Oct 2027 🙂 )
Message 10 of 11
(3,750 Views)