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?

Apparently, what I typed did not post on the board so I'll try again.

 

I've programmed several applications in which the user wanted the same data displayed in multiple locations in an identical manner. The tricky part is "identical". Currently, every front panel object has its own unique block diagram object. In order to ensure they are identical, the programmer must either select each and match them up or put code in which links all the property nodes of one to the other. As far as I know, a strict type custom control doesn't match up the properties of all the objects when running (if one ctrl is changed to blinking, all instances of the control do not blink).

 

Would it be possible to create a "link" option in Labview? A "linked" front panel object would share the identical properties of another front panel object of the same type and share a block diagram object. The only difference between the two front panel objects of be the physical location on the screen.

 

Thoughts?

0 Kudos
Message 2 of 14
(2,969 Views)

I am still not sure exactly what you are trying to do.

 

Placing the same data on several indicators is easy: Just wire the data to all the terminals.

 

The control/indicator on the front panel and the terminal on the block diagram are not two different objects.  They are two aspects of the same object.

 

If you need to set various properties of various controls or indicators to be the same (assuming that all the controls actually have the  property in question), then create an array of references to all the controls and set the properties in a loop or in a subVI.

 

Lynn

0 Kudos
Message 3 of 14
(2,962 Views)

@gdvorak wrote:

...

 

Would it be possible to create a "link" option in Labview? A "linked" front panel object would share the identical properties of another front panel object of the same type and share a block diagram object. The only difference between the two front panel objects of be the physical location on the screen.

 

Thoughts?


Do you really want that in the literal sense?

 

under properties there is a tab for data binding. You could use that feature and let datasocket do the updates.

 

If you wan to see the same valu ein the sam eplace on multiple tab pages, you can use a single indicator that is NOTON any tab page but OVER the tab pages (move it over with arrow keys, do Not drag it INTO). If there are some tabs where you don't want to see it you will have to hide via a property.

 

am i getting close?

 

If not post some images so we can look and sugest,

 

Ben

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

I don't think i'm coming across correctly so I'll give an example.

 

Say you have a temperature and you want to display it on two different panes of a tab control, one is tab A the other in tab B. For the sake of this discussion, they will be called TC-A and TC-B. Both temperatures display information from channel 0 of a thermocouple module. Two front panel objects would be needed and (as it happens now), two block diagram objects are created.

 

The application has logic such that when the temperature of channel 0 is above 20 C, the indicators need to blink. As it stands now, each indicator has a block diagram object with seperate properties. If you want them both (TC-A and TC-B) to blink, you need to have two property nodes (or a for loop and two references). If later you decide to change the description of the device (or any other property), the programmer has to find each instance (TC-A and TC-B) and change it or link all the properties via property nodes.

 

I'm suggesting/wondering if there is a way to remove the block diagram object of TC-B and "linking" it to the block diagram object of TC-A so that when the properties of TC-A change, TC-B changes automatically.

 

For this simple example, doing the property nodes method would be fine and easy. Expand this out to 50 variables, each with 2 or 3 display points and ALL the corresponding properties, it is a lot of code. Why have two sets of properties to keep track of and change when they are identical, just in two different locations on the front panel?

 

Basically, I'm looking for a simple way to modify one front panel object (either by the property tab or a property node) and have all the other front panel objects displaying the same data be visually identical without having to manually or programmatically change each one. I referred to this as "linking": connecting two front panel objects to a single block diagram object, thus allowing for changes to one front panel object to transmit to all front panel objects.

 

 

 

0 Kudos
Message 5 of 14
(2,948 Views)

Ben,

 

I thought of putting it OVER the tab control, but then it has to be in the same place. Say on one page I want a list of all the values and on another page I want to values in various locations based on a picture or background image. Overlaying a single object over the tab control doesn't work.

0 Kudos
Message 6 of 14
(2,945 Views)

Maybe something like my old examples:

 

AlterEgoMULTI.vi

 

MultiIndicator.vi

 

(Posted here, see also these instructions).

 

 

Message 7 of 14
(2,941 Views)

I use a GUI controller to hold my control refs and access them from anywhere i need. I could extend that idea and add a method to "Update X" that would use a sub-VI to set eh value to an appropriate set of controls where ever they are.

 

antoher approach could use sub-panels and JUST* remove the sub-VI running in one sub-panel on one tab and insert it in to another on a differnet tab.

 

Or you could do something complete different and implement "undockable" tab pages and let the user put it where they want it. The following image shows that idea in action.

 

Screenshot.PNG

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 14
(2,939 Views)

Altenbach,

 

YES! That is almost exactly what I'm talking about.

 

It would appear that I can't go into the properties of one and have it automatically update all the other devices. For example, if I change the scale of one object (either programmatically or using the property window), the other objects do not update. However, if I change the blinking property of one, they all blink...

0 Kudos
Message 9 of 14
(2,938 Views)

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.

- Regards,

Beutlich
0 Kudos
Message 10 of 14
(2,903 Views)