Troubleshooting Network-Published Shared Variables

Updated Oct 1, 2018

Reported In

Hardware

  • FP-2000
  • FP-2010
  • FP-2015

Software

  • LabVIEW Real-Time Module

Driver

  • NI-RIO

Issue Details

I am having trouble communicating with my network-published shared variables over the network. My shared variables work in the development environment but not when they're built into an executable. 

Solution

There are a several things that can prevent network-published shared variables from updating on other network machines.

General Troubleshooting

1. Make sure that the shared variable is set to Network-Published. To check this right-click on the variable and select Properties

2. Make sure that the library containing the shared variable has been deployed. To check this right-click on the library hosting the shared variable and select one of the deploy options. You can use the Distributed System Manager to check if the variables has been deployed by navigating to Tools » Distributed System Manager.  If you're using LabVIEW 8.5 or earlier, you can use the Variable Manager, which can be accessed by selecting Tools » Shared Variable » Variable Manager.

3. Make sure that there is not a personal firewall enabled on either computer that could be blocking the NI-PSP packets. You can check the status of the firewall by going to the Security Center in Control Panel. For more information on potential firewall problems please see Configuring Software and Hardware Firewalls to Support National Instruments Products.  Firewall issues would result in Error -1950679034: The shared variable has no value

4. If your antivirus software has a firewall, be sure to disable it or include exceptions there as well.

5. Check to see whether the shared variable is hosted on a computer that is on the same IP subnet. If it is not, you can register the remote computer by going to Tools » Shared Variable » Register Computer... 

6. If there are multiple network cards on the PC attempting to access the shared variable try disabling the network cards not being used. Also, check that the appropriate network card is set as the primary network by referring to How do I Connect to Ethernet Targets with Multiple Network Cards in the Host? 

7. Ensure the Shared Variable Engine is running. Navigate to Windows Services and check that the NI Variable Engine process is present and running. If it is not present, install the LabVIEW Run-Time. If it is present and not running, right-click the process and start it. To ensure it starts automatically, enter the properties for the services and ensure the Startup Type is set to Automatic. On the Recovery tab of the service properties, you can also set the variable engine to retry on the first, second, and all subsequent attempts if starting the shared variable engine fails.

8. Restart your NI Services.

Troubleshooting for a Real-Time (RT) System

1. Verify that the dip switches are set correctly on your real-time target. If shared variables work when running from the development environment, but not when setting a startup executable, make sure that the dip switch for No Startup App is switched OFF.

2. Check the DNS IP on the RT target.  If this IP is set to something that is not a valid DNS server, the shared variables will update slowly due to DNS timeouts that occur.  By changing this entry to 0.0.0.0, the shared variables should update at the appropriate rate.

3. Adjust the timing or add a Wait to the Timed Loops that write to the shared variables.  If the Timed Loop runs at a high frequency and starves other processes, the variable will seem like it's updating very slowly or not at all.

4. If using shared variables with a real-time executable, make sure that no front panel objects are bound to shared variables. Front panel objects are removed when you build a real-time executable, causing the shared variables not to update.  If you are intending to deploy your application as an executable, use shared variable nodes on the block diagram.

5. If you are trying to read a shared variable from a real-time target, ensure that Variable Client Support has been installed on the target. This can be checked in Measurement & Automation Explorer by expanding the [+] next to the real-time target under Remote Systems, and expanding the [+] next to Software. If the shared variable is being hosted by the real-time target, ensure that the Network Variable Engine is installed by using the same method. The Network Variable Engine will not work correctly on FieldPoint 2000, 2010, and 2015 controllers because they do not have sufficient memory.

WAS THIS ARTICLE HELPFUL?

Not Helpful