LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestion/Question: Can mutiple front panel objects be linked to a single block diagram object?


@BIG Cheese wrote:

It may be over kill if you only have one machine, but might consider using Shared Variables, and Data Binding each control. This would be setting up in the window properties the same thing you can do in code.


Yup!

 

That is what I was alluding to in reply #4.

 

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 14
(524 Views)

Just to reiterate....

 

 

I'm not asking how to display the data in different locations on the front panel....as someone stated, that's easy, just make another object and you're done.

 

What I am asking is how to manipulate all the properties of each object simulaneously. I'm suggesting that for identical front panel objects, dedicate one a master object and all the others as slave objects. The slave objects get all of their properties from the master object EXCEPT front panel location. So if the master object blinks, changes binding, etc. all the slave objects automatically update instead of having to manually go to each object and update them.

0 Kudos
Message 12 of 14
(523 Views)

I wonder if a simpler approach is called for...

 

How about crating an array of control ref built from each of the control (master plus the slaves) and then use a for loop to iterate through the updates.

 

Sorry if that is too trivial but over the web is hard to read your face from here.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 14
(515 Views)

Ben,

 

This is currently what I am doing. However, I have application that increases significantly in quantity of objects (and quantity of identical objects). For each group of identical objects, I'd need an array of reference. Also, for each group, I'd need a property node for each property I want to match up. This beings taking up a lot of space in the block diagram (visually) and I expect it will increase code execution time as this executes every loop. Creating a subvi that does this is one option to clear up the block diagram, but it would still need to execute constantly. There is no way to update the properties without running the loop; the property window for each control needs to be opened and the property changed. This may seem trivial, but I've had instances where I can't run my code when hardware is disconnected (although I suppose one could use diagram disable structure to get the code to run).

 

As it sounds, this method (array of references) seems to be the only way to do it and I for smaller applications its fine. I'd like a more streamline/clean way to do it for a large application. 

 

I'm suggesting that Labview take care of this for me with a "link" option on the front panel and hide/streamline all the code to do this. Consider three objects, one is to be master and two slaves. When you right-click an object there will be a new "link" option to designate an object as the master. When you right-click a second object, there will be an option to "link to..." and it will populate a list of IDENTICAL objects that it can be linked to (slider ctrl to slider ctrl, etc.). This process can be repeated for the third object. Both the second and third object are no longer available on the block diagram and the first object's block diagram picture is modified slightly. The second and third object now do NOT have a property menu, but instead when right-clicked shows an option to "unlink for master" and "find master". When "unlinked" their initial properties will be copied from the master.

 

When running code, the master object can be manipulated via property nodes and all the "linked" objects (or slaves) will update.

 

 

0 Kudos
Message 14 of 14
(512 Views)