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?
Right, but i am unsure of how to create an 'output' variable from VI #1 under my desired conditions unfortunately.
The answer is yes. Now as to the how, that is more dependent on what you are trying to achieve.
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.
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?
Use a queue or channel wire to transfer the data.
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.
Use a Queue. You can use the Producer/Consumer as a quick reference.
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...