Error -1967357949 When Using Static IP on CompactRIO

Updated Jul 31, 2024

Reported In

Hardware

  • CompactRIO Controller
  • PXI Controller
  • Controller for Compact FieldPoint
  • cRIO-9030

Software

  • LabVIEW Real-Time Module

Issue Details

My stand-alone application works fine when deployed on my CompactRIO as an executable if the CompactRIO IP address is configured as DHCP/Link local. If the IP address is configured as static, the network shared variables on the host PC are returning the error code -1967357949.

Unable to query Measurement & Automation Explorer for the Network Variable Engine. Make sure the Network Variable Engine (which installs support for network-published shared variables) exists on the RT target and check that the network connection is valid.

Solution

It is possible that network shared variables do not have the time to get properly started before your programs starts reading them when using the static IP mode for your real-time target. This can also happen in DHCP/Link Local mode. In all situation, it is necessary to have an initialization step at the beginning of your real-time program, to wait for the network variables to be properly started before your program starts using them: In the provided example code you can see that all the network-published shared variables have initial values and only after making sure that no errors occur on shared variables the program will go to the next steps.
 

Additional Information

One way to understand what is happening on the CompactRIO is to use the remote debugging method on the Real-Time executable.