取消
显示结果 
搜索替代 
您的意思是: 

Run two different VIs in parallel

已解决!
转到解答

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.

Best Regards,
MT_at_home
0 项奖励
1 条消息(共 11 条)
3,976 次查看

Hi MT,

 

just run them in parallel - with no dataflow dependencies!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
2 条消息(共 11 条)
3,962 次查看
解答
已被主题作者 MT_at_home 接受

Hello,

A simple option is to put Controls.vi in the main and select "Show front panel when called" in Vi properties->Window appearance->Customize. It will need to be in parallel of your other processes.

 

Yddet 

3 条消息(共 11 条)
3,959 次查看

Thx, is there an option to kill Controls.vi when i stop the Main.vi?

Best Regards,
MT_at_home
0 项奖励
4 条消息(共 11 条)
3,954 次查看

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.

Best Regards,
MT_at_home
0 项奖励
5 条消息(共 11 条)
3,950 次查看

@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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
6 条消息(共 11 条)
3,933 次查看

Okey, found some buggy behavoiur in my way...
So what's the correct way of doing it then, i have no idea sadly.

Best Regards,
MT_at_home
0 项奖励
7 条消息(共 11 条)
3,924 次查看
解答
已被主题作者 MT_at_home 接受

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!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
8 条消息(共 11 条)
3,917 次查看

@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.

9 条消息(共 11 条)
3,805 次查看

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.

Best Regards,
MT_at_home
0 项奖励
10 条消息(共 11 条)
3,752 次查看