LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enum elements or buttons?

Solved!
Go to solution

@altenbach I did see your example, question is, would you suggest using a sub panel to display the clicked button? I don't want to run all the sub VIs at the same time, I want to only run the one that I click on, more like a state machine, and stop that specific SubVI as soon as I press another button, or stop. 

Seli6272@D
0 Kudos
Message 11 of 22
(520 Views)

Yes, it would be trivial to adapt so it changes the panel VI whenever the radiobutton changes. Similarly, you can di the same using a listbox. 

0 Kudos
Message 12 of 22
(516 Views)

Hi @Altenbach,

I honestly have trouble to implement the idea in labview. I will try to explain my problem more in details:
I have several (at the moment 17, I might need to add some in the future, but not regularly, so adding manually is not a problem) subVIs, which can run independently. The whole program is quite large, and constantly reading data from SQL, so I want to be able to run ONLY the clicked/chosen subVI, one at a time, and close the last open. How can I use a listbox, and how can I load my subVI by clicking on a cell on the listbox? which property nodes can I use to close the last panel and open the recently clicked? Is there a better way to close a subpanel, rather than abort?
would you be able to maybe attach a small sample VI?
I would really appreciate your help.

Seli6272@D
0 Kudos
Message 13 of 22
(490 Views)
Solution
Accepted by topic author LZD_Sydney

Here's is a very quick simulation that shows the main logic.

 

(Note that I just changed the original attachment, so re-download)

 

altenbach_0-1719415806797.png

 

0 Kudos
Message 14 of 22
(468 Views)

Thank you so much! I really appreciate your solution. 

Seli6272@D
0 Kudos
Message 15 of 22
(454 Views)

Of course you could even use a value change on the listbox instead of a double-click for an even fast response, but it is easier to trigger by accident. Note that the listbox is configured to select 0 or 1 element.

0 Kudos
Message 16 of 22
(449 Views)

I have implemented this solution and I can open my VIs in the subpanel, but I have a problem: all the VIs have multiple MCLBs which are interactive and connected to each other, but they are not reacting to anything! any Ideas?

e.g.: there are buttons to delete, rename, edit the entries. When pressed, nothing happens. A superior MCLB has some entries assigned to each element of it, which should appear in the subordinate MCLB, but it does not. Search  boxes don't work either. The same VIs work perfectly individual.  

LZD_Sydney_0-1720083475529.png

 

Seli6272@D
0 Kudos
Message 17 of 22
(418 Views)
  • What's the point of showing the toplevel VI if the problem seems to be with the inserted VIs?
  • If you throw around acronyms (MCLB), you need to define what they mean. I assume you are not talking about any "Marine Corps Logistics Base", right?
  • Wildly guessing "multicolumn list box"
  • Explain the meaning to "connected to each other". How?
  • Explain your other terms, such as  "anything", "subordinate", and "superior", etc..
0 Kudos
Message 18 of 22
(395 Views)

Sorry for the abbreviations and unclear explanations. Here is the story:

I am loading data from live sql database. (hense, unfortunately cannot upload my files and code, they won't work without the database). I have several VIs, which have multiple multi column listboxes (MCLB). I am trying to build a top level VI to list and insert them individually for the user to choose for different puposes.

 

As an example, in my Tests.vi VI, I have a MCLB which is listing the test names (temperature, optic, relais test...), have a second MCLB which is listing the steps of the particular test clicked in MCLB1, [this is my superior MCLB], (e.g. temperature test: 4 steps of 1.initial measurement, 2.during test, 3.at the end, 4. after 5 min, Optic test:1 step) then I have a third MCLB which lists the type of the result one is expecting from that particular test clicked in MCLB1 (temperature: numeric, optic:passed/failed.) all of these data are populated in the MCLBs by SQL queries. When I click on the temperature in my MCLB1, it  must highlight and list the steps in MCLB2, and also show the type of expected results in MCLB3.

 

At the moment, when I insert it in the top level VI, this is not happening. I see the MCLBs with the initial data loaded, but it seems like a static table. 

 

The inserted VIs all work perfectly fine as a standalone, but when I insert them in this architecture, they are not reacting.

 

with superior I mean the first MCLB which has the entries to be selected, and with subordinate I mean the MCLBs which must react to the selected entry in the first MCLB. 

 

I also have buttons to insert new test or test steps, to delete or rename them. The buttons don't work either. 

 

I have attached a screenshot of my Tests.vi , but as I said, it works perfectly fine without inserting. I must mention there are more functions and MCLBs in this VI, I was just explaining an example. 

 

LZD_Sydney_0-1720160264655.png

 

 

Seli6272@D
0 Kudos
Message 19 of 22
(386 Views)

(Maybe you could attach a much simplified version where the database IO is replaced by a simple simulation (e.g. a map with a queries as key and responses as values)

 

Your image does not contain the gist of the story, for example we don't see where you define the listbox items.

There are a lot of subVIs that I don't recognize.

Why do you use a mouse-up event instead of e.g. value change? Seems convoluted. The ctrlref of your event is guaranteed to be always the same and is not that interesting. It would seem more interesting to get and process the value of the listbox.

0 Kudos
Message 20 of 22
(377 Views)