LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying Network Shared Variables From a Compiled Executable

I am trying to setup a communication between a RT PXI system and a windows computer using network shared variables (shortened to "shared variables" in the further text). Both of the computers shall run compiled executables. The documentation concerning this topic has been spread over several places and this is what I ended up with.

There are three different possible setups.

1. I am using shared variable nodes both on the RT PXI and on the windows computer. The shared variables on the RT PXI are defined as "target absolute" and are residing in a library on the RT PXI. The shared variables on the windows computer will be set to "target relative" and are residing in a library on the windows computer. The variables used on the windows computer will be bound to the corresponding variables on the RT PXI. If I run the applications on computers different from the ones I used during development, I have only to change the .aliases file for the windows computer and set there the correct IP for the RT PXI.

Additionally, I have to deploy the library both on the RT PXI and on the windows computer. This can be done from the windows computer, as the RT PXI target does not support the invoke node that has to be used for this purpose. Running the invoke node twice, once for localhost with the client library and once for the IP of the RT PXI system and the host library, I can deploy the libraries containing the shared variables programmatically. At this point, the magic of the .aliases file will fail and I have to find the IP of the RT PXI either by user input or maybe by running the RT ping controllers.vi. The "Target IPAddress" property of the "Deploy Library" invoke node makes sense in this combination as we can deploy libraries also to other computers or platforms.

See attached Shared Setup 1.png.


2. I am using shared variable nodes both on the RT PXI and on the windows computer. The shared variables on the RT PXI are defined as "target absolute" and are residing in a library on the RT PXI. The shared variables on the windows computer will also be set to "target absolute" and will be taken from the library that resides on the RT PXI. If I run the applications on computers different from the ones I used during development, I have only to change the .aliases file for the windows computer and set there the correct IP for the RT PXI.

Additionally, I have to deploy the library only on the RT PXI. Again, this can done by a helper application on windows when the IP of the RT PXI is known or found by using RT ping controllers.vi.

See attached Shared Setup 2.png.

3. I am using shared variable nodes only on the RT PXI. The shared variables on the RT PXI are defined as "target absolute" and are residing in a library on the RT PXI. On the windows side, I use direct access to the PSP by using DataSocket functions. I can address a variable by using a DataSocket Open function and inputting psp://IP_or_Hostname_of_RT_PXI/LibraryName/VariableName. The magic of the .aliases files will fail already at this step. So I have to find the correct IP or hostname by user input, setting a DNS server to point to the correct IP or using the RT ping controllers.vi.

As always, I have to deploy the library containing the shared variables to the RT PXI. Again, this can done by a helper application on windows when the IP of the RT PXI is known or found by using RT ping controllers.vi.

As I can use this approach to setup an array of valid variable names and process the array by one single DataSocket read function inside of a for loop more conveniently than using a case selector inside of a for-loop and reading from different shared variable nodes, I prefer this approach over the others.

See attached Shared Setup 3.png.

For approaches 2 and 3, at least the deploy process can be run by an installer application independently of the main application as the library will remain on the PXI until I manually undeploy it, even if I reboot the PXI controller.


My questions are:

1. Did I describe the possible setups regarding the use of the shared variables correctly?
2. Is there any means to get the IP address mapping from the .aliases file, needed for deploying and for approach 3, other than opening and reading the file itself?
Download All
0 Kudos
Message 11 of 15
(1,974 Views)
Hi Christian,

Since this is a new issue, please post it in a new thread. That will allow you to get more traffic since this is an old post as well. Thanks.
0 Kudos
Message 12 of 15
(1,947 Views)
Thank you for the hint. I believed that the explanation on what the "Target IP address" property is good for would justify a post in this thread.

Repost

0 Kudos
Message 13 of 15
(1,931 Views)

Hi Boris,

 

Sorry to butt in to your old thread.

But it looks exe of shared variables running on different machines works for you.

So far, i am still getting Error 1950679023.

Do you have a sample VI for reference only? I would appreciate for any help.

 

thanks a lot.

0 Kudos
Message 14 of 15
(1,409 Views)

Hello JTC,

 

I am also having trouble running two different .exe's with shared variables on two different computers on the same network.  I have tried reading the links attached to this thread, but haven't had any luck.  If you could, could you show me a simple VI that Boris might have sent to you, or if you have one?  Your help is much appreciated.

 

Thanks

 

0 Kudos
Message 15 of 15
(1,303 Views)