LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy Shared Variables

Solved!
Go to solution

I'm having an issue with using SVE. I'm using LV 8.6 (cannot upgrade to 2010 at this time, have to "make it work").

I've used shared variables before with an HMI and PXI but my setup is different now:

 

PXI (called my target) that "talks" to different controllers via Modbus TCP/IP. Separate PC to interface to the PXI to provide a user-interface (called my host).

 

I've run across posts talking about calling the Deploy Library method in the top-level VI of the application. I want the PXI to deploy the shared variables since it will be running constantly and the PC is optional. Do I "manually" transfer the shared variable library, in this case called the NetworkVars, to the PXI so the PXI application can find it? The PXI will be running independently once the program is completely developed.

 

I've used Labview a long time but have never had to do much with networking/sharing.

 

Thanks for any help.

0 Kudos
Message 1 of 9
(3,836 Views)

First you have to decide on which machine you want to setup the shared variable engine. If your PC's are optional, the PXI system controller ( RT or WIN ) should host the SVE. Once the process is loaded into the engine, it's permanent even after a reboot. So it's not really necessary to deploy the library ( process with variables ) each time the app starts. From my point of view it's more or less a step in the systems setup. If you place the *.lvlib file under the PXI system in the LV project explorer you can manually deploy it via the context menu.

 

Hope it helps

Christian

0 Kudos
Message 2 of 9
(3,826 Views)

Yes, they need to be deployed in the PXI because the PC is optional. I've tried to do that but it's not working correctly. I have a development PC which downloads and deploys the program in the PXI and I'm using my laptop to run the "host" program. The indicators show that they are "bound" correctly (green light) but the variables do not "talk" unless I run the PXI program on the development computer. I can see the variables updated using the Distributed System Manager but not on the instruments I'm talking to. Looking into that issue but I also have simple calculations (area) going back and forth from the host to the PXI and those are not updating.

I see there are better options for doing all this in Labview 2010, may make the jump (boss will be upset, but oh well).

Thanks for the help. 

0 Kudos
Message 3 of 9
(3,819 Views)

I still cannot figure this out, have read NUMEROUS white papers, help entries, etc. but I cannot get it to work properly.

 

PXI system with analog I/O, TCP/IP connections to Watlow controllers. This is where I set up NI-PSP variables, autodeploy enabled, run as startup when I transfer the program to the PXI.

 

Separate computer running an interface program to the PXI, the front panel controls and indicators are "bound" to the PSP variables.

 

I download to the PXI, reboot it, start my PC program and there is no communication. The PSP LEDs on the bound items are all green but there is nothing going back and forth, UNLESS I run the PXI program on the other development computer.

 

I know I'm missing something simple, just getting a little aggravated!  LabVIEW 8.6, no DSC module, just the RT module.

0 Kudos
Message 4 of 9
(3,783 Views)

Beside each (RT/WIN) executable that uses Shared Variables there's an <exe_name>.aliases file that is used for name resolution. Maybe that is the problem. For the PC's executable check that file for the PXI systems IP address.

 

Hope it helps

Christian

 

0 Kudos
Message 5 of 9
(3,763 Views)

The PXI alias file is:

[WO1781]

WO1781=localhost

[My Computer]

My Computer=169.254.1.108

 

.108 is the development computer used to generate the PXI program.

 

The PC running the "host" program has the following alias file:

 

[WO1781]

WO1781="169.254.1.100"

[My Computer]

My Computer="169.254.1.105"

 

.105 is the host PC's address, .100 is the PXI.

Besides the difference of the use of "" for the IP addresses (don't know why that is different", I don't see the PC address listed anywhere in the PXI alias file. Could this be the issue? Looking up more info...

0 Kudos
Message 6 of 9
(3,745 Views)

From my point of view that seems to be ok.  The PC should be able to get the WO1781 IP to r/w the process variables.

I suggets you to use the Shared variables error output to get more detailed informations.

If you can read the variables but you're not able to change it's values there's also the Single Writer option on a shared var that can prevent a change.

 

br Christian

0 Kudos
Message 7 of 9
(3,719 Views)

The problem of trying to track errors is that it works fine if the development computer is running the program, doesn't work when it's not so there's no way for me to see any errors.

I just purchased Labview 10, now trying to decide if I should do a complete removal of previous versions or not. I do have a new PC here for a different job so I may just load that one for now to get a clean start.

I'll post my results later.

Thanks for the info.

0 Kudos
Message 8 of 9
(3,713 Views)
Solution
Accepted by topic author teritask

I ended up upgrading to Labview 2010 and now everything works as it should. I will mention that it was a complete horror show trying to upgrade...including having to reload WinXP on my development computer because files became corrupted. Now I have to reload a ton of programs, at a later date, because they are there but are not linked. Fun stuff.

Thanks for all the help.

0 Kudos
Message 9 of 9
(3,688 Views)