07-27-2015 01:04 PM - edited 07-27-2015 01:06 PM
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.
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
Solved! Go to Solution.
07-27-2015 01:21 PM
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.
07-27-2015 01:27 PM
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.
07-27-2015 02:48 PM
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).
and