LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data between two VIs running in parallel

Solved!
Go to solution

select_VI_runtime.png

 

We have four systems (thermal test stand, climate chamber, ventilation unit and evaporative cooling plant). I have programmed them as a different projects because at the time I started I didn't know that there might be communication in between them. Climate chamber and evaporative cooling plant needs ventilation system but test stand can run without it. But I need to find a way to send data (for example temperature and volume flow) from climate chamber/evaporative cooling plant to test stand. 

 

Is there a way to do it when they are all running in parrallel? I can do it by adding everything in a single VI but it becomes huge (doesn't fit in single screen). 

 

 

 

0 Kudos
Message 1 of 12
(1,631 Views)
Solution
Accepted by topic author girish_jadhav

Hi girish,

 


@girish_jadhav wrote:

Is there a way to do it when they are all running in parrallel?


Learn about using notifiers, queues, any kind of network communication, even global variables…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(1,594 Views)

@GerdW wrote:

Hi girish,

 


@girish_jadhav wrote:

Is there a way to do it when they are all running in parrallel?


Learn about using notifiers, queues, any kind of network communication, even global variables…


Hi GerdW,

 

I know the basics of notifiers and queues but that can't used in the scenario I mentioned, no? These are all in different VIs and I wanted to know to if I can send data from one VI to another. when they are running in parallel (I don't know the right word to explain this). 

0 Kudos
Message 3 of 12
(1,588 Views)

I would use User Events.  This way, each VI can send an event and those who register for the event will see it.


GCentral
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 Kudos
Message 4 of 12
(1,583 Views)

Hi girish,

 


@girish_jadhav wrote:
I know the basics of notifiers and queues but that can't used in the scenario I mentioned, no? These are all in different VIs and I wanted to know to if I can send data from one VI to another. when they are running in parallel (I don't know the right word to explain this). 

Why can't you use notifiers/queues in parallel running VIs? I do that all day…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(1,574 Views)

Yea I agree with crossrulz, I use user events a LOT for messaging between processes.

 

I also use async launch with options "call and forget" like in this vi im attaching (i saved it for v8, not sure if it lost anything in it...

 

I explain my usage in this past post actually

 

https://forums.ni.com/t5/LabVIEW/Sub-VIs-One-Reg-events-to-rule-them-all/m-p/4149400/highlight/true#...

 

feel free to critique if i missed anything or ask questions...

 

 

 

edit:  I also have been advised to use the methods used in actor framework for async launching because of some apparent "gotchas" that may arise in certain circumstances...  I have been using the exact "by-name" method for quite some time without issue, I hope im not jinxing myself here...

0 Kudos
Message 6 of 12
(1,572 Views)

@crossrulz wrote:

I would use User Events.  This way, each VI can send an event and those who register for the event will see it.


Hi crossrulz,

 

Can you please show me a short example of this? 

I just tried it with Global Variables as GerdW mentioned and it works. 

0 Kudos
Message 7 of 12
(1,562 Views)

@GerdW wrote:

Hi girish,

 


@girish_jadhav wrote:
I know the basics of notifiers and queues but that can't used in the scenario I mentioned, no? These are all in different VIs and I wanted to know to if I can send data from one VI to another. when they are running in parallel (I don't know the right word to explain this). 

Why can't you use notifiers/queues in parallel running VIs? I do that all day…


VI 1

cc.png

 

VI 2

cc1.png

If both of these VIs are not in a single VI how can we use queues or notifiers? To use them both of these loops should be in single VI as far as I have understood it. 

0 Kudos
Message 8 of 12
(1,556 Views)

i had these lying around from some tests... just had to cut some stuff out...

 

 

Download All
0 Kudos
Message 9 of 12
(1,553 Views)

@p27 wrote:

i had these lying around from some tests... just had to cut some stuff out...

 

 


Hi p27,

 

Thanks for the VIs. I will check it out and come back to you if I have questions.

0 Kudos
Message 10 of 12
(1,550 Views)