LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data between VIs using call by reference without actually running the vi

Solved!
Go to solution

Hi, I was wondering if you could pass data between VIs using call by reference without actually running the vi (ie: not having the front panel show up during run-time). Is this possible?

 

While I am here I might as well ask about passing data between VIs. I am trying to pass an indicator value from one vi to another. Due to the way the program is setup I cannot wire this value directly. Is there another way (quick/efficient) to pass data between two VIs during run-time (other than shared variables). For what it's worth this application will be build into an executable so data passing will have to work for that as well.

 

Thanks,

 

Vlad

0 Kudos
Message 1 of 7
(3,752 Views)

@Vlad P wrote:

Hi, I was wondering if you could pass data between VIs using call by reference without actually running the vi (ie: not having the front panel show up during run-time). Is this possible?


Not running a Vi and not showing the front panel are two very (very!) different things.

 

Typically "not running" means edit mode. Typical subVIs don't show the front panel when run, and that's what you need to do.

0 Kudos
Message 2 of 7
(3,748 Views)
Solution
Accepted by topic author Vlad_P

@Vlad P wrote:

While I am here I might as well ask about passing data between VIs. I am trying to pass an indicator value from one vi to another. Due to the way the program is setup I cannot wire this value directly. Is there another way (quick/efficient) to pass data between two VIs during run-time (other than shared variables). For what it's worth this application will be build into an executable so data passing will have to work for that as well.


You have plenty of choices:

 

  • shared variables (as you mentioned)
  • global variables
  • queues
  • notifiers
  • control references and value properties
  • action engines
  • ...

Tell us a little bit more about your applications. What does it need to do?

 

Message 3 of 7
(3,745 Views)

This application performs a test on a particular system we're building. The test is of indefinite length (time-wise), and when the test is complete a test report needs to be generated. I need to take data from a Vi which runs somewhere near the start of the application, and send it to the test report Vi which gets called towards the end of the application run-time. I am trying to find the most efficient way of passing data between these two Vis. I know it can be done brute-force and have the respective VIs just write/read the information to a data file, but that seems like a bad programming practice and it would be nice if I can keep the data flow within the labview environment.

0 Kudos
Message 4 of 7
(3,739 Views)

As an aside, I just recently undertook this Labview project with only minor experience in Labview programming so that's why I'm trying to find the best way to go about it. Also out of that list I am unfamiliar with a couple of them I'll have to read up on them 🙂

0 Kudos
Message 5 of 7
(3,738 Views)


@altenbach wrote:
Not running a Vi and not showing the front panel are two very (very!) different things.

 

   Typically "not running" means edit mode. Typical subVIs don't show the front panel when run, and that's what you need to do.

 


 

Yeah I realize my confusion hehe. A Vi must "run" in order to be able to extract data from it, correct?. However the problem is that the VI I am calling by reference has a "continue" button on it that must be clicked to proceed. So the front panel lingers there until I click it. All I want is to obtain a data value by reference in the background, without any VI front panel popping up to ask for user input, etc.

 

0 Kudos
Message 6 of 7
(3,731 Views)

Global variables ended up working for my application (it was the most non-intrusive method). Thanks

0 Kudos
Message 7 of 7
(3,709 Views)