‎05-03-2012 11:02 AM - edited ‎05-03-2012 11:02 AM
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
Solved! Go to Solution.
‎05-03-2012 11:06 AM
@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.
‎05-03-2012 11:09 AM
@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:
Tell us a little bit more about your applications. What does it need to do?
‎05-03-2012 11:19 AM
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.
‎05-03-2012 11:21 AM
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 🙂
‎05-03-2012 11:29 AM - edited ‎05-03-2012 11:30 AM
@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.
‎05-03-2012 12:59 PM
Global variables ended up working for my application (it was the most non-intrusive method). Thanks