04-27-2020 10:07 AM
Hello,
i'd like to know how to call and run a second VI in parallel to my main one with both windows open because i want to acces controls on both.
In my case i have a userinterface for a machine on the Main.vi and i want to simulate some machine behaviour and mechanical actions that have to be performed in the second VI.
I am communicating over a third VI keeping my global variables.
Lets call them Main.vi, Controls.vi and Globals.vi for this case.
I'm new to labview and would be happy for some advice to a simple solution.
Solved! Go to Solution.
04-27-2020 10:18 AM
04-27-2020 10:22 AM - edited 04-27-2020 10:24 AM
04-27-2020 10:24 AM
Thx, is there an option to kill Controls.vi when i stop the Main.vi?
04-27-2020 10:26 AM
Figured it out by myself, just put a terminal to the stop button of my Controls.vi and wired it to the stop of Main.vi.
04-27-2020 10:51 AM
@MT_at_home wrote:
Figured it out by myself, just put a terminal to the stop button of my Controls.vi and wired it to the stop of Main.vi.
But that would either mean your Controls.vi is in series with your main loop or you are not getting an updated value. I would use a Queue, Notifier, or User Event to have your main VI send a message to your Controls.vi to command it to stop.
04-27-2020 11:33 AM
Okey, found some buggy behavoiur in my way...
So what's the correct way of doing it then, i have no idea sadly.
04-27-2020 12:02 PM
Hi mt,
as said before: call both subVIs in parallel without dataflow dependencies!
(That's basic LabVIEW knowledge, so I suggest to take the training resources offered in the header of this LabVIEW board. Also note the self-paced courses are free until end of April!)
04-28-2020 06:07 AM
@MT_at_home wrote:
Okey, found some buggy behavoiur in my way...
So what's the correct way of doing it then, i have no idea sadly.
You've been told the correct way of doing it. You've not shared your code so we can't tell you what you're doing wrong. Buggy behavior is not a proper explanation.
05-05-2020 12:04 PM
You were right, putting them in parallel without any wire-connections was the correct way i didn't know to use in the first place.
By creating local variables and using these instead of wiring from one loop to the other the problem was solved, thx 4 the advice.