Archived:Using a Crossover Cable to Connect to a LabVIEW Real-Time Target

Updated Oct 7, 2022

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Hardware

  • CompactRIO Controller
  • PXI Controller
  • CompactDAQ Controller

Software

  • LabVIEW Real-Time Module

Driver

  • NI CompactRIO
  • PXI Platform Services

Issue Details

I am connecting over a crossover cable to a LabVIEW Real-Time (RT) target from a Windows machine. I am unable to communicate properly with the controller. Am I configuring the system properly?

Solution

Crossover Cables:
If the Ethernet port on your device does not support automatic crossover detection, you must use a crossover cable for a direct connection between your computer and your Real-Time controller. Many Ethernet cards can perform Automatic Crossover detection. To determine if your device supports Automatic Crossover, check your card's specifications. The specifications may refer to Automatic Crossover as Automatic MDI/MDI-XAuto Uplink and TradeUniversal Cable Recognition or Auto Sensing
 
 
Troubleshooting the Connection:
A common indicator that you are using the incorrect cable is the LINK LED, which will not light on the Real-Time (RT) controller if you have the wrong cable connection. This is not foolproof; however, since the LINK LED may be off for other reasons.  Additionally, if the computer in use has multiple network adapters, be sure that you only enable the adapter that the device is plugged into. You may also check for more information on this topic by visiting Connecting to my PXI Real-Time Target on the Network.

Computer Network Settings:
When making a direct connection to a LabVIEW Real-Time controller using an Ethernet cable, you must first disable DHCP on your Host PC. If you do not disable DHCP, you may find that some communication with the controller is not working properly. For example, the system may fail to appear in Measurement & Automation Explorer (MAX), or the system may fail to install software on the system. Below are instructions for various operating systems.

Windows 7/8/10
  1. Go to Start»Control Panel.
  2. Select View network status and tasks. 
  3. On the left hand side, select Change adapter settings.
  4. Right-click on Local Area Connection, and select Properties.
  5. Under the Networking tab, highlight Internet Protocol Version 4 (TCP/IPv4). Click the Properties button.
  6. On the General tab, select Use the following IP Address.
  7. At this point, you can enter your own IP Address and Subnet Mask. A typical set of settings for a standalone computer are an IP Address of 169.254.1.1 and subnet mask 255.255.0.0. Press the OK button and exit the Network control panel.
  8. Reboot may not be necessary.
Windows Vista
  1. Go to Start»Control Panel.
  2. On the left hand side, switch to Classic View.
  3. Select Network and Sharing center.
  4. On the left hand side, select Manage network connections.
  5. Right-click on Local Area Connection, and select Properties.
  6. Under the Networking tab, highlight Internet Protocol Version 4 (TCP/IPv4). Click the Properties button.
  7. On the General tab, select Use the following IP Address.
  8. At this point, you can enter your own IP Address and Subnet Mask. A typical set of settings for a standalone computer are an IP Address of 169.254.1.1 and subnet mask 255.255.0.0. Press the OK button and exit the Network control panel.
  9. Reboot may not be necessary. 

Notes: Make sure your static IP address assignment takes effect by going to Start»Run, then typing cmd. In the window that opens, type ipconfig and verify that the IP address appears as assigned. If it is inconsistent with what you've assigned (for example 0.0.0.0), there may be IT restrictions limiting which IP addresses you can assign yourself. In that case, contact your network administrator.  

If the RT controller already has a static IP address, make sure that the controller's settings are consistent with the IP settings on your host computer. The host and RT controller will need unique IP addresses that are on the same subnet.
 

For the example above, an IP address of 169.254.1.2 and a subnet mask of 255.255.0.0 would be on the same subnet.  If the controller has not been configured, you could also use the Suggest Values button in MAX to select a valid IP address and subnet mask now that the host computer has a static IP address.

Additional Information

Most Ethernet cables are straight (patch) cables, not crossover cables. To determine the type of cable you have, look at the 8 colored wires that are visible through the clear-plastic connectors on both ends of the cable. If the green and orange wire position is swapped between one end and the other as seen in the images (top: 10baseT/100baseTX crossover cable, bottom: below: 10baseT/100baseTX/1000TX/T4 Crossover Cable) below, then the cable is a crossover cable; however, if the green and orange wires are in the same relative positions on both ends of the cable, then it is a patch cable. The 1000baseTX/T4 (Gigabit) standard specifies that crossover cables have all wires swapped in position.
 
For older Versions of Windows:
Windows XP
  1. Go to Start»Control Panel.
  2. Switch to Classic View if necessary.
  3. Select Network Connections.
  4. Right-click on Local Area Connection, and select Properties.
  5. Select the General tab and highlight Internet Protocol (TCP/IP). Click the Properties button.
  6. On the General tab, select Use the following IP Address.
  7. At this point, you can enter your own IP Address and Subnet Mask. A typical set of settings for a standalone computer are an IP Address of 169.254.1.1 and subnet mask 255.255.0.0. Press the OK button and exit the Network control panel.
  8. Reboot may not be necessary.
Windows NT/2000
  1. Go to Start»Settings»Control Panel»Network.
  2. Select the Protocols tab and highlight TCP/IP. Click the Properties button.
  3. On the IP Address tab, select Specify an IP Address.
  4. At this point, you can select your own IP Address and Subnet Mask. A typical set of settings for a standalone computer are an IP Address of 169.254.1.1 and subnet mask 255.255.0.0. Press the OK button and exit the Network control panel.
  5. Reboot the computer.
Windows 95/98/Me
  1. Go to Start»Settings»Control Panel»Network.
  2. On the Configuration tab, highlight the entry for your network card (the one with the icon of a green board next to it) and click the Properties button.
  3. Select the Bindings tab and confirm that your network card has bindings to TCP/IP. Click the OKbutton.
  4. Select the TCP/IP entry and click the Properties button.
  5. On the IP Address tab, select Specify an IP Address.
  6. At this point, you may select your own IP Address and Subnet Mask. A typical set of settings for a standalone computer are an IP Address of 169.254.1.1 and subnet mask 255.255.0.0. Press the OK button and exit the Network control panel.
  7. Reboot the computer.