LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Data from LabView executable to LabView executable

Solved!
Go to solution

Gentlemen

I am trying to pass data from one application to another. So far, no luck. I am trying to use a shared variable. I am using LabView 2021 32bit on Windows 10. I have included 2 simple projects to demonstrate what I am trying to do. I have read https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MFPSA2&l=en-US and https://www.ni.com/en-us/support/documentation/supplemental/06/using-the-labview-shared-variable.htm... but there must be something I'm missing. Any insight would be greatly appreciated.

Download All
0 Kudos
Message 1 of 10
(1,586 Views)

If you are using shared Variable make sure you are able to see the values in NI Distributed System Manager.

 

Any possible method could be using TCP/IP with Local Host for data transfer between two different applications within a host computer.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 2 of 10
(1,521 Views)

Help -> Find Examples -> Shared variable.lvproj

It shows 5 different ways to connect to a Shared Variable.

I can't open your code so can't say which one is closes to yours, but it needs some services active apart from the code itself. (I couldn't run the example right now since i've turned off services due to other stuff)

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

Qestit Systems
Certified-LabVIEW-Developer
Message 3 of 10
(1,501 Views)

Yamaeda

Thanks for looking at this so quickly. I have looked at the examples but, I just want to have it communicate on 1 PC with 2 executables and all the examples are network. I don't want external communication

 

0 Kudos
Message 4 of 10
(1,476 Views)

I don't have experience with Shared Variables, but I did present on Network Streams and gave examples of EXEs talking to each other between versions, and bitness.  This also works talking between RT and Windows targets.

 

https://youtu.be/NMYbTlsNlpk?t=1763

 

I made the code and examples into a VIPM.IO package here:

 

https://forums.ni.com/t5/North-Oakland-County-LabVIEW/Network-Streams-11-3-21/td-p/4189767

Message 5 of 10
(1,473 Views)

The joy of networking is that at the application level all of the network usage looks like network usage... but it's still usable between local applications it just doesn't touch hardware.

 

All of the networking examples will apply even when 2 local applications are communicating to each other. They just use the "loopback" adapter which is "fake" and doesn't communicate over network hardware. (localhost or 127.0.01) I'll second the recommendation to look at the examples for usage. Share any difficulties or anything you don't understand about how to apply their usage to your application(s).

~ Self-professed LabVIEW wizard ~
Helping pave the path to long-term living and thriving in space.
Message 6 of 10
(1,393 Views)
Solution
Accepted by topic author JackTK

I figured it out with the help of all your comments. I think I was just so bent on not using network variables I didn't read carefully one of the documents indicating that to communicate between apps on the same computer you need to use network shared variables. Also, I thought that this new feature in LabView, (LabView selecting the appropriate additional installers), It's not. It doesn't select the NI Shared Variable. I needed to do this manually. Then, I had to change the Log On for the service. to get it to start. Also found out from the NI community

I figured out all this because of the support of members like you. So Thank You.

Message 7 of 10
(1,361 Views)

I meant NI Variable Engine and not NI Shared Variable

0 Kudos
Message 8 of 10
(1,355 Views)

@JackTK wrote:

Yamaeda

Thanks for looking at this so quickly. I have looked at the examples but, I just want to have it communicate on 1 PC with 2 executables and all the examples are network. I don't want external communication

 


As you figured out, communicating between 2 executables are external communication (to the application), and a localhos network is one of the easier solutions to that (or just a file)

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 10
(1,350 Views)

I am also hesitant to ever use NSVs outside of short-lived tests/demos as I generally want messaging-like interactions between applications. TCP and other network communications work between two applications just like other networking techniques and give me better control over things like timeouts, not having to worry about variable libraries being deployed, etc.

~ Self-professed LabVIEW wizard ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 10 of 10
(1,328 Views)