LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down Menu Advice

Solved!
Go to solution

I was wondering if anyone could give some advice as to how I could use drop down menus to switch between 50 different indicators and charts.

 

So I am building a program to monitor 50 motors. Right now, I have a program (attached) that can monitor one motor. I want to use a drop down menu to select which motor info (out of 50) I can see at a certain time. Selecting from the drop down menu should update all buttons/ indicators/ charts associated with the motor selected. I would also like the motors that aren't visible, but have been selected (with a boolean called Start   End Data Collecting) to collect data in the background.

 

Right now, there is a subVI called Main Station that controls everything needed for one motor. I'm not sure how I'd expand this to 50. The Main Station subVI is in a while loop (while loop is part of main VI) which collects data from a daq on every loop. The Main Station is a case structure that runs or stops if the ON  OFF boolean is switched (like a state machine). So all the motors switched to ON should run and collect data even if they aren't visible/selected on the front panel.

 

Here is a view of the front panel.Front Panel.jpg

 

As you can see, there are four sections for the indicators/controls and two sections for the charts. Each section will/has a drop down menu. Each menu has a selection of 50 motors (labeled Motor 1, Motor 2,... Motor 50).

 

I would like the information in the indicators/ chart to show info specific to the selected motor, while the program updates the other motors (that are set to data collection) to continue collecting data. The only data stored is in the charts, but I would also like the controls to remain selected (even if not visible on the front panel) if a user selected them.

 

Any help/suggestions would be appreciated. Let me know if the zip is missing files. Thanks

0 Kudos
Message 1 of 4
(3,925 Views)
Solution
Accepted by topic author msiwk

Subpanels will be your friend here.  The idea is that you have 50 copies of the same VI running, each looking at the data for a different motor.  So with the subpanel, you just select the reference of the VI instance you want to display in it.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,909 Views)

Ok thanks for the advice. I've never used subpanels before so I'll have to explore how they work and if they'll work for this project. If I get it to work, I'll be sure to come back here and accept your answer as a solution.

0 Kudos
Message 3 of 4
(3,900 Views)

Once I started looking at subpanels, that opened up a lot of other discussions about problems similar to mine. In case someone finds their way to this post, here are two links that discuss the topic more. I didn't realize they existed because subpanel was the key word when searching for info on problem and I didn't know subpanels existed (how to search for info on something you don't know about? wish I knew haha).

 

http://forums.ni.com/t5/LabVIEW/Any-suggesstions-on-how-to-manage-100-indicator-and-containers/td-p/...

 

and

 

http://forums.ni.com/t5/LabVIEW/Looking-for-an-elegant-way-to-manipulate-main-VI-from-Sub-VI/m-p/309...

Message 4 of 4
(3,847 Views)