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.
Cause 1: 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 cause 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?.
Cause 2:
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.
Cause 3: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 National Instruments Products will resolve this issue.
Cause 4:
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.
Cause 6:
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.
Cause 7: 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. You can find more information on investigating this cause in
Troubleshooting Network-Published Shared Variables.
Cause 8: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.
Cause 9:When using dual network interface cards at host PC and referencing the shared variable from Real-Time target, open the LabVIEW project file and right click on My Computer -> Properties, then put a check on 'Specify custom address' and enter the secondary NIC IP address into the Address.
Cause 10:If you want to establish a data transfer between a RT target and a PC via Network Published Shared Variables (NSVs) and uses therefore a VI on the PC and a RT exe running 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.
Cause 11:If you are using multiple shared variable libraries in different LabVIEW projects, make sure the names of the libraries are not the same.