Error -1950679035 When Using LabVIEW Shared Variables

Updated Jun 28, 2024

Reported In

Software

  • LabVIEW Real-Time Module
  • LabVIEW

Issue Details

I am getting error -1950679035 when trying to access LabVIEW shared variables in my program.

Error -1950679035 occurred at Open Variable Connection in Host.vi

Possible reason(s):

LabVIEW: (Hex 0x8BBB0005) Unable to locate the shared variable in the Shared Variable Engine (SVE). Deployment of this shared variable may have failed, the SVE has not started, or the SVE is too busy to respond to this request.

 

Solution

There are multiple reasons on why this error could be occurring depending on the system and what other software components are being used. The error could be due to one of these causes or a combination of them. 
  • This error can happen when the NI Variable Engine is not running. Please verify that this service is running by opening the Windows Task Manager >> Services and searching for the NI Variable Engine (NITaggerService). If the service is shown as stopped, right-click on it and click Start.
  • The library containing the shared variable may not have been properly been deployed. To check this right-click on the library hosting the shared variable and select one of the deploy options. If you are using an executable take a look at the next troubleshooting step.
  • If you are running the application using an executable, deploy the libraries at execution time by checking the box titled "Deploy shared variable libraries at application execution" under Application Properties >> Shared Variable Deployment. For additional details on this process, take a look at the following article: Deploying Network Shared Variables from a Compiled Executable. If you are running the executable on a deployment pc that does not have the full version of the LabVIEW development environment installed, then you need to install the NI Variable Engine on that computer. You can include this in your installer by selecting "NI Variable Engine" in the "Additional Installers" category of your installer properties.
  • When hosted on Real-Time targets, this may happen if there are not enough resources on the Real-Time target to host the shared variables. To fix this issue, you should try slowing down your loop rates to free up CPU time, to give the shared variable engine time to run. You may also try adding a wait at the begging of your program to give the cRIO services time to start before accessing the variables. This happens predominantly on real-time operating systems because you can more easily starve lower-level threads like the one needed to operate the Shared Variable Engine. Typically, this is a result of higher priority threads such as Timed Loops taking up too much CPU time and preventing the Shared Variable Engine from running. For more information on monitoring Real-Time system performance, refer to the following article: How Can I Monitor CPU and Memory Usage on Real-Time Embedded Targets?.
  • An incorrect shared variable path specified when using Aliasing or programmatic access will cause this error. This could be as simple as a typographical error in the defined path. When using Aliasing, you can double-check the path in the Shared Variable Properties window in the Bind to: section.
  • Firewall or antivirus settings may be preventing your computer from having access to the individual variables in the shared variable engine. One good step to try is making sure that both public network and private network firewalls are turned off, as opposed to just one or the other. Unblocking the specific ports used by the Shared Variable Engine as described in Configuring Software and Hardware Firewalls to Support NI Products will resolve this issue.
  • In some cases, you may need to run LabVIEW with administrator privileges in order to read shared variables properly. You can run LabVIEW as an administrator by locating your LabVIEW version in the Start Menu, right-clicking on it, and selecting Run as administrator.
  • If you get this error when using a property node with the SharedVariableIO class, refer to the following article: Why Do I Receive Error -1950679035 When I Change Shared Variable Properties Programmatically?
  • When using Shared Variables Bound to OPC Tags, there are a number of other potential causes which are covered in-depth in the following article: Error -1950679035 When Using Shared Variables Bound to OPC Tags.
  • When using Shared Variables to access Scan Engine resources, this error may occur. Manually undeploy the resource by going into your LabVIEW project and browsing to your chassis under your target. From there, expand Real-Time Scan Resources, right-click on the Scan Engine resource (such as your module), and press Undeploy. Then right-click again, and press Deploy. Make sure that the VI is running from the RT target and not from the Windows host VI. 
  • When using dual network interface cards at the host PC and referencing the shared variable from the Real-Time target, open the LabVIEW project file and right-click on My Computer >> Properties, put a check on "Specify custom address" and enter the secondary NIC IP address into the Address.
  • If you want to establish a data transfer between a RT target and a PC via Network Published Shared Variables (NSVs) and use therefore a VI on the PC and an exe on the RT target this error can occur. Check Data Transfer Through Network Published Shared Variables Does Not Start Using RT Exe and Error -1950679035 Is Shown for more information.
  • If you are using multiple shared variable libraries in different LabVIEW projects, make sure the names of the libraries are not the same.

Additional Information

To help narrow down the cause of the error, you can use the LabVIEW example "shared variables.lvproj" which can be found at Help >> Find Examples in LabVIEW.

Run the Shared Variable Server.vi on one PC, then open up Shared Variable Client - Variable API and change the string shown below using either an IP or a computer name. This will allow you to use code that is confirmed to work and isolate the network/firewall as a cause of error.