LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array transfer from a supervi to subvi, which runs independently of supervi.

Hello,

 

I have been stuck on this issue for the past few weeks. I am using LabView 2014, and I have been asked to integrate a VI I worked on with another VI worked on by a colleague. For ease, let's call my colleague's VI as A, and mine as B

 

 

Basically, my colleague's VI is so large, with an i7 quad core, 8gb ram laptop to lag everytime I make any modification. To mitigate this, I made his VI to run my VI on start. It's not really a "subvi", it doesn't take any input or output. Important part is that they run in parallel.

 

Now, one import part is that I need to transfer an array of 10 numbers from A to B. B is quite large itself, and it has many inputs and outputs. It also has to work independently of A, because A has a delay of 0.5 seconds per cycle of its main while loop, and B has to make over 100,000 while loop cycles under an hour. In short, B MUST run in parallel with A, and I need to take 10 inputs(or an array of 10 numbers) from A whenever I hit a button from B.

 

 

I have read many discussions and used google search engine regarding this, I haven't found a definite way to make one vi to take input from the other vio without creating a new vi.

 

Any help would be appreciated. Thank you.

-SJL

0 Kudos
Message 1 of 6
(2,834 Views)

Queues, notifiers, global variable, functional global variables, user events... pick your passion!

0 Kudos
Message 2 of 6
(2,816 Views)

Hello, 

 

could you provide an example please? Global variable sounds most attractive to me.

 

-SJL

0 Kudos
Message 3 of 6
(2,807 Views)

Well it depends how critical the timing is. If you want it "at the press of a button" then it sounds like the timing might be critical. Otherwise all you could do in the VI that needs the data is see the most recent data written to the global variable.

0 Kudos
Message 4 of 6
(2,797 Views)

Or pass a control refernce to the array to B and use a property node to read the value.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(2,784 Views)

Since it sounds like you only care about the latest data when the button is pressed, I would say the global variable is the way to go here.  Use the File->New... menu item to open up a dialog.  In there is the option to create a global variable VI.  I'm sure you can figure it all out from there.


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 6 of 6
(2,762 Views)