‎03-07-2025 06:21 AM
Thanks a lot, this works perfectly!
One more thing though: if I run the Main.Vi, use it, stop it and then run it again. The manual/automatic.vi's obviously keep running and the Main.vi gives me Error 1198. The only way I got around this problem, is by just aborting everything in the end (which is not a very smart idea), wiring a stop button from the Main.vi to the stop-case in the manual/automatic.vi's (by using them as subVI's) does not seem to work.
I feel like I misunderstand some very fundamental LV concepts here, I tried a lot of other sources and examples before starting a new topic for this basic stuff but I can't get it to work.
‎03-07-2025 06:37 AM
Hi Phlop,
@PhlipPhlop wrote:
I feel like I misunderstand some very fundamental LV concepts here, I tried a lot of other sources and examples before starting a new topic for this basic stuff but I can't get it to work.
I would reorganize the whole project!
‎03-07-2025 07:09 AM
Hi, I wanted to use two VI's because the "manual mode" is going to be password protected. A lot of students will be using the station, not everybody should be able to open valves at will and accidenticaly destroy multiple thousand € of equipment. That's why the manual is full of controls and the automatic full of indicators.
@GerdW wrote:
- You also should think about separating the UI from the internal program logic (in the long run). This would help to implement your "automatic logic" as it will not depend on UI elements…
That's probably a good idea, I wanted to use subVI's for the automatic processes (e.g. press "dock new shuttle" and have the valves toggle depending on pressures and some user inputs).
@GerdW wrote:
- If you insist on using separate VIs for both modes: implement them as QMH and have them communicate with your main VI. Now it is VERY easy to send a "QUIT" command to your message handler(s)…
Okay, can't say anything to that as I don't know what QMH is. Will have to take a crack at it!
Thanks for the tips!
‎03-07-2025 07:14 AM - edited ‎03-07-2025 07:15 AM
Hi Phlop,
@PhlipPhlop wrote:
Okay, can't say anything to that as I don't know what QMH is. Will have to take a crack at it!
QMH = Queued Message Handler
LabVIEW comes with an example…
@PhlipPhlop wrote:
Hi, I wanted to use two VI's because the "manual mode" is going to be password protected. A lot of students will be using the station, not everybody should be able to open valves at will and accidenticaly destroy multiple thousand € of equipment.
So you should start in "automatic" mode and enable the "manual" mode only after password check.
Still only one VI…
‎03-07-2025 08:33 AM
@PhlipPhlop wrote:
Thanks a lot, this works perfectly!
One more thing though: if I run the Main.Vi, use it, stop it and then run it again. The manual/automatic.vi's obviously keep running and the Main.vi gives me Error 1198. The only way I got around this problem, is by just aborting everything in the end (which is not a very smart idea), wiring a stop button from the Main.vi to the stop-case in the manual/automatic.vi's (by using them as subVI's) does not seem to work.
I feel like I misunderstand some very fundamental LV concepts here, I tried a lot of other sources and examples before starting a new topic for this basic stuff but I can't get it to work.
Did you see my note in the "Panel Close?" case?
‎03-07-2025 08:45 AM
Yes I did. That's exactly the problem. A "clean" way to shutdown to me, is to let the programm finish executing (stop the subVI's while-loop in my case). But as I said, it didn't work the way I tried.
‎03-07-2025 08:50 AM
Then I'll have to find a way to lock all the valve-controls in "automatic" mode. I still need to see the valve-state (open/close, green/red) on the FP. I've seen a lot of "locked and greyed out" in connection with controls in other VI's. Maybe that's a more elegant solution in combination with the "Multi-Segment Pipe"-control from Paul.