LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Share data between built exe:s.

Hello.

How do I share data between two built exe:s ? I now use a global variable between two VI:s and it works exactly as I want. However, when I build the application
the communication between the two exe:s is lost.

All help appreciated. Real examples are really appreciated to.


Regards

Andreas
0 Kudos
Message 1 of 8
(4,025 Views)
Hi Andreas

If you have an application, it allocates memory. All global variables are located in this memory. The same happens for the second application.

So that's why it doesn't work. If you have to vis and start them with LV, they both are running in the memory range of LV.

One way to solve your problem is some kind of client-server architecture. You could have a third application which acts as a data-server and the other two apps act as data-clients.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 8
(4,016 Views)
Hello again.

Thanks for the quick answer.

I just looked into tcp and that should do the trick I think. But when I compile and run the program with the TCP vi:s it just pops up a dialogbox saying "choose vi to open:"

Do I need some extension to the run time engine in order to get the tcp working?


Regards

Andreas

Ps. Im running the application on a Linux system.
0 Kudos
Message 3 of 8
(4,012 Views)
Hi

I didn't use tcp-vis up to now and so I don't know about problems.

But in general it sounds as if the necessary vi is not distributed. So in the application builder, where you add the top-level vi you can also add dynamic vis. Add all the necessary vi that are needed by the application - I think it should be mentioned in the dialog.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 8
(4,006 Views)
Take a look in the \examples\comm\ subdirectory. There are two libraries, TCP.LLB, and UDP.LLB. Both have examples that should help you out.

Good luck

Dave
0 Kudos
Message 5 of 8
(3,979 Views)
Hello Andreas!
 
Can you please give me a quick update regarding this issue? Does the problem remain?
 
Regards,
Jimmie A.
Applications Engineer, National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 6 of 8
(3,950 Views)
You can use NI DSTP server. For your problem i think that is it most simple approach.
0 Kudos
Message 7 of 8
(3,935 Views)
If you plan to use only LV applications on Windows OS then consider using Datasocket service of Labview. It is very easy to implement and LV handles the data protocol w or w/o data buffering. Using TCP or UDP you should create the protocol for clients and server but of course it will work with non LV applications too.
 
When you create executable you have to enable Datasocket library for installer.
 
As one already mentioned   here you can find examples for datasocket too.
C:\Program Files\National Instruments\LabVIEW 7.0\examples\comm
 
A good example is for example:
C:\Program Files\National Instruments\LabVIEW 7.0\examples\comm\datasktxwin.llb
   DS 3D Graph Writer.vi   and  DS 3D Graph Reader.vi
0 Kudos
Message 8 of 8
(3,931 Views)