LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Preserving Global Variable Functionality with Application Builder

I am working with two vi's in the same project which will be compiled as separate executables using Appplication Builder. The first one allows me to control and read out positional data for a stage controller. The second vi reads temperature and time data from an Optris USB infrared camera. I have successfully used global variables to transfer the positional data from the Position VI to the Temperature VI and write the position, temperature and time data to a file in the development environment. When I build my applications this functionality fails with no errors or way to determine why. Since the project works in development, I can only assume that this must be some incorrect setting or path in Application Builder. I'm including the entire project so that my Builder settings can be analyzed, thanks in advance.

0 Kudos
Message 1 of 6
(1,454 Views)

Global variables scope is limited to within an application. If you need two applications to communicate, you would need to look at other methods such as TCP port.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(1,452 Views)

If both VI's are always going to run, you could use a single "launcher" VI that dynamically launches the other two. Run the launcher VI in your application builder.

 

Or, if one will run all the time and the other only some of the time, you could have a button to launch the second VI from within the first one.

 

Or use subpanels and combine the two.

0 Kudos
Message 3 of 6
(1,428 Views)

Or change the Global to a Network shared global.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 6
(1,404 Views)

@Yamaeda wrote:

Or change the Global to a Network shared global.


Sure, if you want your variable to be dog slow and wide open to anybody on your network being able to change that value.

Spoiler
I am a defender of Global Variables, but I fully believe that Network Published Shared Variables are actually evil.

Back to the original issue...There are 2 solutions here:

1. Combine your two applications into a single application.  You apparently already have this in the development environment.  So with what we know, this would be the simplest solution.

2. Create an interface for the two applications to communicate.  TCP/IP is what is typically used here.  In theory, you could also use Network Streams or UDP.



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 5 of 6
(1,380 Views)

Thanks everyone for your ideas. It sounds like the TCP/IP solution is going to be the way to go, combining these two individual programs would be an option, but a difficult one at best due to the complexity of one of them and the way it was implemented. I'll give the TCP solution a look see and report back.Thanks again!

0 Kudos
Message 6 of 6
(1,375 Views)