12-05-2023 09:55 AM - edited 12-05-2023 10:07 AM
Hello, please see the attached code. I'm trying to do the following: when user presses a button data1, a new window pups up with corresponding data, data2 opens up windows with second set of data, etc. I've achieved this but making my subvi reentrant, but I don't want to display three sets of data if user presses data1, then data2, and then data3, I only want to display one at a time. If I set my subvi to non-reentrant, no matter what user presses, the subvi gets the last set of data.
Is there a way to change my code so that only one instance of subvi can be ran with corresponding data? Thanks
edit: there's one way I could accomplish what I want with having compound OR gate to each case selector with FP.Close controlled by the Boolean buttons, but the amount wires that would involve is not acceptable (shown in picture below)
.
Solved! Go to Solution.
12-05-2023 03:47 PM - edited 12-05-2023 03:48 PM
I suggest you look at using "Radio Buttons" instead of three separate Boolean controls.
Radio buttons have the option of only allowing one button to be "pressed" at a time..
12-05-2023 05:00 PM
Using Radio Buttons wouldn't really work, I want latching action, but it can only do switching action. IF user presses the middle radio button, then closes subvi, and then wants to press the same button again to reopen the same subvi, they won't be able to easily do that, they'd have to switch back and forth. I want my code to be copyable, with Radio Buttons I'd have to drag that enum to ALL of my inputs, not a good solution.
12-05-2023 06:56 PM
Please explain why you have such a crazy wiring layout.
Clean it up and I'll take another look.
12-05-2023 08:03 PM
So you have three processes running in parallel and while all do some processing, you only want to show one of the front panels.
Your things where SubVIs provide their own reference to the caller is somewhat of a "tail-wagging-the-dog" kind of thing. But OK, Here's one possible solution. See if you understand it. Many things could be improved, of course.
And no, this is probably not something I would consider doing in any kind of serious application.
12-06-2023 10:56 AM
This is the solution I came up with. It works for my application. Thanks