Showing results for 
Search instead for 
Did you mean: 

Sending data from one VI to another?

Hi there,


I was wondering if there is a way I can send data from one VI to another. 

Currently i have a an array that is auto-indexed into a for loop with a wait delay. My array contains elements "1,2,3,4,5", and i am looking to sequentially transfer these elements every ___ ms to another VI (hence the use of the wait delay), which will perform operations on these elements as they come in.

Can someone please help me understand how i can do this? Would i need to create an indicator, and then create a reference from this indicator? Or would i need a global variable?

Thank you!!!

0 Kudos
Message 1 of 9

VI#1 output to VI#2 input

0 Kudos
Message 2 of 9

Right, but i am unsure of how to create an 'output' variable from VI #1 under my desired conditions unfortunately. 

0 Kudos
Message 3 of 9

The answer is yes.  Now as to the how, that is more dependent on what you are trying to achieve.

  1. You could have one vi call the other
  2. Have both vi's under control from a main vi
  3. ...

Are these running sequentially or in parallel?  Would this be event driven (do X when Y is selected)? Is one of these vi's an instrument interface?  Is a timeout involved? ...


The more data that you provide, the better the results.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 4 of 9

Thanks for the response,

I am still very new to LabVIEW so I apologize for the lack of detail 

These VIs would be running in parallel, and neither VIs are instrument interfaces.


Ultimately this is what I am trying to do:


VI#1 - Generates an array, and then sends the elements of that array sequentially every so often. I was hoping to achieve this by having the array auto-index into the for loop with the wait timer implemented.


VI#2 (running simultaneously to VI#1 for now) - Takes the outputted elements from VI#1 and creates a data string for each of the elements, which is then sent to a client device as a data packet.


I am not really sure if this constitutes as an event driven situation


Right now I am just trying to find the best way to send that data from VI#1 to VI#2. Maybe for my purposes it seems like having VI#2 call VI#1 would be the best option?



0 Kudos
Message 5 of 9

Use a queue or channel wire to transfer the data.

Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 9

If you still have questions, posting your vi (not just a picture of it - unless it is the .png snippet), will get you even better results.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 7 of 9

Use a Queue.  You can use the Producer/Consumer as a quick reference.

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 8 of 9

I am a bit confused about why you want to delay transmitting an array element by element to your other vi???

Just send the whole array at once, easier, then you can do whatever you want with the individual elements in the second vi...

0 Kudos
Message 9 of 9