02-13-2023 06:08 PM
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.
Solved! Go to Solution.
02-14-2023 06:21 AM
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.
02-14-2023 09:04 AM
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)
02-14-2023 12:22 PM
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
02-14-2023 12:26 PM
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
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-16-2023 01:53 AM
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).
02-16-2023 09:12 AM
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.
02-16-2023 09:27 AM
I meant NI Variable Engine and not NI Shared Variable
02-16-2023 09:38 AM
@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)
02-16-2023 12:26 PM
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.