LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically update the contents of tabs? (instrument GUI for mainframe supporting multiple plug-ins)

Hello,

 

I'm writing a GUI for an instrument that has five plug-in slots.  Each slot can host one hardware item.  There are three or four different hardware items that can be plugged into the slots.  The items can be plugged into slots in any order, in any combination.  In the future we will offer other hardware items that will plug into the slots.

 

I would like to interface to the hardware in a tab control structure.  Specifically, I would like to have a five-tab 'folder' with one tab for each slot.  The problem is that the different pluggable hardware items have different controls.  I think you can see where I'm going!

 

So what's the best way to do this?

 

My current idea is to build tabs for each of the hardware items and hide them.  During initialization I'll query the mainframe and see which items are plugged into the slots.  I'll then clone the hidden item panels as necessary and show the cloned tabs.  This will allow me to customize the layout and controls for each hardware item, and will also allow me to define future hardware item panels later.

 

This sounds like a good idea, but I bet the implementation is tricky.  I don't know how to clone panels.  I'm not sure how to refer to controls on cloned panels.  I'm not sure how to capture events from controls on cloned panels.

 

Do you have any examples or suggestions?  Any other ideas?  Am I going about this the wrong way?

 

I'm using LabView 6.1.  I can't open code snippets from later versions.

 

Thanks for all of your comments and suggestions!

 

Will

0 Kudos
Message 1 of 12
(3,770 Views)

Does LabVIEW 6.1 have Subpanels?

 

That is the approach I would probably take.  I'd make individual VIs to handle each of the different types of plugins, and make use of SubPanels to drop the VI associated with the plugin into the corresponding "slot" tab on my GUI.  If the same plugin can consume multiple spots, I'd make the VIs reentrant.

Message 2 of 12
(3,767 Views)

Nickerbocker wrote:

Does LabVIEW 6.1 have Subpanels?

 

That is the approach I would probably take.  I'd make individual VIs to handle each of the different types of plugins, and make use of SubPanels to drop the VI associated with the plugin into the corresponding "slot" tab on my GUI.  If the same plugin can consume multiple spots, I'd make the VIs reentrant.


 

I don't think so.  I can't find anything about subpanels in the 6.1 help.  Bummer, this sounds exactly like what I want to do.

 

So how can I do this in 6.1?

 

Will

0 Kudos
Message 3 of 12
(3,764 Views)

wsitch wrote:

Nickerbocker wrote:

Does LabVIEW 6.1 have Subpanels?

 

That is the approach I would probably take.  I'd make individual VIs to handle each of the different types of plugins, and make use of SubPanels to drop the VI associated with the plugin into the corresponding "slot" tab on my GUI.  If the same plugin can consume multiple spots, I'd make the VIs reentrant.


 

I don't think so.  I can't find anything about subpanels in the 6.1 help.  Bummer, this sounds exactly like what I want to do.

 

So how can I do this in 6.1?

 

Will


I will not say it can not be done since I have done most of it but it would be rediculously complicated doing it without the sub-panels.

 

I will not bother describing the work since nobody will ever do that (again).

 

Even if you wanted to buy my code AS-IS it would be more cost effective to pay the software update fee to get a modern version of LV where everything you need is there.

 

Now if you really want to do this yourself, start learning about the LabVIEW picture control and "invoke node >>> Get image" and queues. Then evaluate the minimal fucntionality (note you will have to make buttons click yourself, etc).

 

So please do yourself a favor and call NI with your serial number and ask them how much it would cost to upgrade.

 

Ben

 

Note: I don NOT work for NI or do I recieve any money from LV sales. My suggestion above is just one user to another and was posted in your best interest.

Message Edited by Ben on 10-28-2009 01:04 PM
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 12
(3,756 Views)

Subpanels would indeed be ideal, but they were introduced in 7.0.

 

What I think you should do is this:

 

Your display of the chassis can be a horizontal array of clusters where each cluster has the following: a ring determining the type of module, a string (or picture control) describing the specific details and configuration of the module and a button for opening a configuration dialog. You decide which configuration dialog to open based on the type of the module. Because you're using a string (or a picture) to show the config, the elements of the array end up being the same. You bulid the display string itself inside the VI belonging to the specific type of instrument you selected.


___________________
Try to take over the world!
0 Kudos
Message 5 of 12
(3,750 Views)

Well, I think I would shy away from your original idea.  Hiding and showing a number of controls problematically sounds complicated.  Plus, if you start adding more plugin modules for your hardware the complexity is just going to increase.  It just doesn't sound like a sustainable design patter to me.

 

How about a switch board main VI that analyizes the hardware for plugins and is presented with a button for each plugin slot that will open the VI associated with the plugin's hardware?  The VIs will then be floating independent windows that control their plugin and present information to the user.

0 Kudos
Message 6 of 12
(3,748 Views)
Important note - in my suggestion the configuration dialog is a separate pop-up window. The array is only used for display.

___________________
Try to take over the world!
0 Kudos
Message 7 of 12
(3,747 Views)

Nickerbocker wrote:

Well, I think I would shy away from your original idea.  Hiding and showing a number of controls problematically sounds complicated.  Plus, if you start adding more plugin modules for your hardware the complexity is just going to increase.  It just doesn't sound like a sustainable design patter to me.

 

How about a switch board main VI that analyizes the hardware for plugins and is presented with a button for each plugin slot that will open the VI associated with the plugin's hardware?  The VIs will then be floating independent windows that control their plugin and present information to the user.


Hi Nickerbocker, (and tst),

 

Thanks for the suggestion.  Stupid question: how do I launch another VI from a button?  How can I tell the child VIs which channel they're connected to?

 

Thanks,

Will

 

ps. Bob, I'm looking into upgrading.  It's expensive.

Message Edited by wsitch on 10-28-2009 01:26 PM
0 Kudos
Message 8 of 12
(3,740 Views)

wsitch wrote:
...

Thanks,

Will

 

ps. Bob, I'm looking into upgrading.  It's expensive.

...

I suspect that post script was aimed at me.

 

My customers pay me by the hour. If it was my customer I would tell them they could pay me twice as much and get half of the functionality and triple the nightmares or upgrade.

The only way I see NOT upgrading being a cost effective approach is if you work for peanuts.

 

The challange you are attempting is not trivial.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 12
(3,736 Views)

I suspect that post script was aimed at me.

 

My customers pay me by the hour. If it was my customer I would tell them they could pay me twice as much and get half of the functionality and triple the nightmares or upgrade.

The only way I see NOT upgrading being a cost effective approach is if you work for peanuts.

 

The challange you are attempting is not trivial.

 

Ben


Hi Ben,

 

Sorry about that, please s/Bob/Ben/. 

 

I understand what I'm trying to do isn't easy.  I've solved difficult problems with LabView 6.1 before.  If I can launch a child VI from the master VI and talk back/forth, then I can do this in 6.1.

 

Of course, I'm not sure I can launch other VIs and talk to them.  Do you know if this is possible?

 

Thanks,

Will

0 Kudos
Message 10 of 12
(3,725 Views)