Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Help on passing data between vi's when built to exe

Solved!
Go to solution

Hi,

I have this problem and appreciate if anyone can give me a heads up to the right direction.

I am trying to writing a program for controlling and data acquisition from two instruments simultaneously.

One instruments is a rotary stage which I control the motion and read data using activex commands. I do this in a vi which I have two separate while loops, one for updating the rotary stage data continuously and other while loop for event structure handles.

The second instrument is a detector that follows rotary stage motion. For this I have another vi again with two for loops, one for data acquisition trough rs232 and other while loop is for event structure.

I use globals to pass data between vi's and this works fine in a labview project environment. However when I try to build these to exe files. I can no longer pass data.

 

Is there a programming method when communicating with more than one instrument. What I mean to ask is, say I have a function generator, oscilloscope motor drive etc. How could I control them in separate windows (as separate programs) and pass data to each other?

 

I'd appreciate for any help. 

 

0 Kudos
Message 1 of 3
(5,819 Views)
Solution
Accepted by topic author mhn05

Hello,

 

Global variables cannot be accessed from separate executables because their memory spaces are not shared. This is listed in the following document: Can I Use a Global Variable to Share Data between Two LabVIEW Executables? The only way to have this work would be to use a Main VI that launches your two separate applications as subVIs. This would allow you to share a global variable between the two. Your other option would be to use the method outlined in the article or to use Shared Variables: How do I Communicate Between Multiple LabVIEW EXecutables Using Shared Variables?

 

-Zach

Message 2 of 3
(5,792 Views)
Hi Zach,
Thank you for the references. I followed through and got what I was looking for though it is slow compared to using globals in the labview environment without building executables. I will also try to use a main vi and try to launch my executable VIs as subVIs and run them independently like executables.
Thanks again.

Mahoni
0 Kudos
Message 3 of 3
(5,768 Views)