Failed to Connect to the Target When Using a NI Real-Time Target in LabVIEW

Updated Feb 1, 2024

Reported In

Hardware

  • CompactRIO Controller
  • roboRIO
  • CompactRIO Single-Board Controller
  • PXI Controller
  • myRIO Student Embedded Device
  • NI ELVIS III

Software

  • LabVIEW
  • LabVIEW Real-Time Module

Driver

  • NI-RIO

Issue Details

  • I have a LabVIEW project containing a Real-Time (RT) target that I used to be able to connect to. I moved the project to a new computer, and can no longer connect to the RT in LabVIEW, even though it is on the same network.
  • When I try to deploy Real-Time code to my CompactRIO, LabVIEW attempts to connect to the target before failing. What is causing this?
  • My NI Real-Time Target is detected correctly in NI MAX. However, 
    • When I try to use it from LabVIEW, I can add it to my project but I can't connect or deploy to it
    • When I try to use it from LabVIEW by clicking Connect in the target, I see a message that displays one of the following errors:

 





 

 

 

Solution

  1. Make sure the device shows up in NI Measurement and Automation Explorer (NI MAX). If it does not show or comes up as disconnected, follow the guide to troubleshoot getting the device to show up in NI MAX: NI Networked Device Doesn't Show Up or is Missing in MAX.
  2. Make sure LabVIEW Real-Time Module is installed on the host PC.
  3. Make sure that the IP address in the LabVIEW project is the same as the IP address shown in NI MAX.
    1. If the IP addresses do not match, right-click the RT target and select Properties. Then, in the General category, modify the IP address to match the IP address shown on NI MAX.
Screenshot_2.png
 
Screenshot_3.png
  1. Once you find your device in NI MAX, click on it and then look at the System Settings tab on the right. 
    1. Make sure that under the Startup Settings section, Force Safe Mode is not checked and LabVIEW Project Access is checked.
    2. Make sure that Status is showing Connected - Running
      • If it shows disconnected, go back to step 1.
      • If it shows Safe Mode, check again to make sure that Force Safe Mode is not selected and that if your cRIO controller has DIP switches that the Safe Mode switch is not in the on position. Power cycle your device and check again. Refer to the hardware's manual for more information regarding its Safe Mode.
    3. Run Remote Systems >> Troubleshoot Remote System Discovery wizard. This should check software compatibility and firewall settings. If your firewall settings are shown as blocking NI software, use Add Rules to correct this.
  2. Check that you have the correct software installed on your computer: Preventing Software Compatibility Issues for CompactRIO Systems.
    1. Make sure that your version of the CompactRIO Driver installed is compatible with the version of LabVIEW you are using.  You can check for this information in CompactRIO Device Drivers and LabVIEW Compatibility or your CompactRIO Device Driver Readme file.
  3. It's possible that LabVIEW can't connect to your target because there is a problem with the software installed on the target. Follow the article Restore LabVIEW RT Target to Factory Default Configuration to fix this problem.
    1. Make sure the version of LabVIEW you are using matches the version installed on your Real-Time controller: NI-RIO and LabVIEW Version Compatibility. For example: If you are using LabVIEW 2022 (with its 2022 Real-Time Module), you would install LabVIEW Real-Time 2022 from NI MAX.
Screenshot_1.png

​Image: Using NI MAX, install the corresponding NI LabVIEW Real-Time version that you will use in your target. It must be the same version of the Real-Time module (and LabVIEW version) that you will use to program it. You can access this window from the Software tab of the Remote Device in NI MAX.
 

Additional Information

Real-Time targets can be in safe mode for a number of reasons, including:
  • user forced software safe mode (via NI MAX)
  • user forced hardware safe mode (via DIP switches)
  • there is no software installed on the CompactRIO controller
  • the CompactRIO has crashed a number of times and has then booted into safe mode
It is always recommended to install software to the Real-Time Targets via a direct cable connection. This can be USB or Ethernet. This protects the integrity of the installation.

Also you can try using a different USB port on PC or reseat the cable on both ends in order to ensure connection is good.

If having the issue when using 2023 Q3 base image system, consider upgrading to the 2023 Q4 base image system.