Overview
This document addresses ways to troubleshoot the initial installation and configuration of CompactRIO Real Time Controllers in Measurement & Automation Explorer (MAX).
Table of Contents
- Common Issues with Windows
- Discovering cRIO Controllers in MAX
- Resetting the Controller to an Un-configured state
- CompactRIO Controller Configuration FAQ's
Common Issues with Windows
The following section discusses some common issues that can occur while Configuring Real-Time Targets with Windows PCs.
1. Windows Firewall
If the PC has a Windows Firewall enable then cRIO controllers may not be discovered in MAX. Windows XP introduced a Internet Connection Firewall and when enabled {Control Panel»Network Connections » Local Area Network » Properties »Advanced}, it will filter out the necessary UDP packets for MAX to be able to discover cRIO RT systems on the local subnet. If you are using the Windows Firewall, you may notice the following behaviors in MAX:
• Windows XP with Service Pack 1 (SP1) installed
If the Windows XP Internet Connection Firewall (ICF) is enabled, you cannot discover or install software to LabVIEW RT targets unless you disable the ICF before browsing to these devices. Perform the following steps to disable the Internet Connection Firewall:
1. From your desktop, open Network Connections by selecting Start»Settings»Control Panel»Network Connections
2. Double-click the connection you want to modify.
3. Click Properties.
4. On the Advanced tab, clear the Protect my computer and network by limiting or preventing access to this computer from the Internet checkbox.
• Windows XP with Service Pack 2 (SP2) installed
When you update software on a LabVIEW RT target while the Windows Firewall is enabled, a dialog box may prompt you to allow MAX to receive information over the network. Select Unblock this program so that MAX can communicate with your LabVIEW RT target. For more information on MAX and the ICF in Windows XP SP1, refer to the NI KnowledgeBase document 2WTAMTPK. For more information on Windows XP SP2 and NI products, go to ni.com/info and enter winxpsp2.
2. Multiple Network Cards
If the Host PC has multiple network cards it is possible you will not be able to discover your cRIO Controller. During configuration of the RT controller it may be necessary to disable the network card not in use. To disable a Network Card go to Control Panel»Network Connections, right click on your device and select disable. Enable the controller after configuration of your cRIO controller.
3. NI-RIO Software Not Installed on the Host PC
If the Host PC does not have NI-RIO Software installed the cRIO controllers may not be discovered in MAX. Check to see if NI-RIO is installed by launching MAX and expanding the Software Section. If NI-RIO is installed you will see an Icon for NI RIO. The current version of the NI-RIO driver can be found at the drivers and updates page
Discovering cRIO Controllers in MAX
The following Section describes ways to troubleshoot a cRIO Controller that is not discovered in MAX.
1. Checking Status using LEDs
There are two LEDs of interest to view to determine if the controller is booting into Real-Time: Power and Status.
-
Power LED - Ensure Power is connected to the cRIO controller. The Power LED is lit while the controller is powered on. This LED indicates that the power supply connected to the controller is adequate, and that the controller is supplying power to the CompactRIO system.
-
Status LED – The Status LED is off during normal operation. The controller indicates specific error conditions by flashing the Status LED a certain number of times as shown below.
2. Console Out Switch
The Console Out switch provides useful diagnostic information from the controller's COM1 port when it is connected to a computer using serial port. This functionality is particularly useful for troubleshooting systems in the following scenarios:
-
Troubleshooting a controller that is not showing up in Measurement & Automation Explorer (MAX).
-
Displaying the controller's current firmware version and IP address.
-
Diagnosing an unresponsive controller or a controller with errors indicated by the LEDs.
-
Assisting an NI Applications Engineer with troubleshooting the controller.
To view the output from the Console Out, follow the following procedure:
1. Shut down the controller in question.
2. Connect the controller to a PC using a null modem cable (NI Controllers are DTE devices).
3. Open a terminal program to monitor the output from the controller.
1.Start HyperTerminal, located in Start » Programs » Accessories » Communications » HyperTerminal
2. Fill out the Location Information form if prompted.
3. Create a new connection and enter a name.
4. Select the COM port that the cable is attached to on the PC (frequently COM1).
5. Apply the following serial port settings:
1. Bits Per Second: 9600
2. Data Bits: 8
3. Parity: None
4. Stop Bits:1
5. Flow Control: None
Note: Other Operating Systems:Most OS's ship with a terminal program capable of monitoring the serial port. Configure it using the settings above.
4. On the controller, flip the Console Out DIP switch to the ON position.
5. Power on the controller, and observe the output on the PC's terminal window.
6. Flip the Console Out switch back to OFF when done troubleshooting.
3. Checking the Network Connectivity
In checking the network connectivity of the controller the first thing to check is the physical connection of the network. On the cRIO controller, there should be two LED’s on the Ethernet connector. The 10/100 LED should stay a solid color, while the Link/Act LED should blink, to represent activity on the network. If these two wires are not active, chances are that the physical connection is broken or the network is not active. Either change the Ethernet cable or ensure the Network is active. It is also useful to determine if the cRIO Controller will respond to Network Communication by sending a PING command to the controller. Ping is a really simple utility that ships on Windows, Unix, Linux, and practically any operating system that has TCP/IP on it. Ping is really simple to use. Go to a command prompt, type "ping x.x.x.x" where x.x.x.x is the IP address that you want to ping. Ping will send some packets (usually 4) to that host and ask it to reply. You will either get 4 messages back from that host or you will get "Request timed out" meaning that the host never replied.
4. Using a Crossover Cable
If using a crossover cable to connect the cRIO controller to the host PC you must also check that the Host PC has a static IP address. Crossover cables are Ethernet cables which have the transmit and receive lines swapped when comparing the two ends of the wire.
A crossover cable is required to connect the host machine directly to the chassis. When a crossover cable is used, then the Host machine DHCP Enabled should be set to “No”. “No” indicates that the IP address is a static address. If the host DHCP is set to “Yes”, set the IP address to static by doing the following steps:
1. Go to Start Menu > Control Panel and select “Network Connections”
2. Within the “Network Connections” window, double click “Local Network Connection.
3. Select “Properties”
4. Select “Internet Protocol (TCP/IP)” within the connection items
5. Click on the “Properties” button.
6. Under the General tab, select “Use the following IP address”
For IP address, enter the static IP address <Typically 192.168.0.1>
For Subnet Mask, enter 255.255.255.0
5. Finding and Adding a Device on a Remote Subnet
If the IP address of the cRIO controller is on a remote subnet MAX may not discover the device and it will need to be manually added. To manually add the controller in MAX do the following steps.
1. Right Click Remote Systems in MAX.
2. Click Create New » Remote Device ( not on Local subnet )
3. Enter the IP address
4. Click Finish
This is also a useful trick for attempting to add Real-Time devices were the IP address is known but it was not discovered in MAX.
6. Finding the Manual for cRIO controllers
Additional Information for CompactRIO Controllers can be found in the User manual. You can find the appropriate user manual for a cRIO Controller by visiting ni.com and searching for the CompactRIO controller.
Resetting the Controller to an Un-configured state
To reset the Controller to the Un-configured state push the IP Reset switch to the ON position and reboot the controller to reset the IP address of the controller to 0.0.0.0. If the controller is on your local subnet and the IP Reset switch is in the ON position, the controller appears in MAX with IP address 0.0.0.0. You can configure a new IP address for the controller in MAX.If the controller is not able to communicate with the network, you can manually restore the unit to the factory network settings. When you reset the controller, the IP address, subnet mask, DNS address, gateway are set to 0.0.0.0. Resetting does not affect power-on defaults, watchdog settings, or VIs.
Complete the following steps to reset the controller.
1. Move the IP Reset DIP switch to the ON position.
2. Push the Reset button to cycle power to the controller. The Status LED flashes once, indicating that the controller IP address is unconfigured.
3. Move the IP Reset switch to the OFF position.
The controller settings are reset. You can reconfigure the settings in MAX from a computer on the same subnet. Refer to the Measurement & Automation Explorer Help for more information about configuring the controller.
CompactRIO Controller Configuration FAQ's
Q. I moved my RT controller to a different switch and now I cannot see it.
A. Make sure that the IP address on the controller is similar in the first 3 numbers as the host machine. MAX cannot find remote machines that are on different subnets. In this case, the user will have to manually add their system to see the controller.
Right Click Remote Systems in MAX.
Click Create New>Remote Device (not on local subnet)
Enter IP Address.
Click Finish
If this does not work, the most likely reason is the computers do not have the same gateway. See KnowledgeBase 27DAB9R6: Why Can't LabVIEW Real-Time Connect to an RT Series PXI System on a Different Subnet.
Q. I run my program on the RT Controller, and then it just suddenly lost communication. Why does this occur?Is MAX crashing or the Real Time Controller?
A. New programmers to the Real-Time domain often write their while loops without any waits, or have their time critical loop running too fast. The communication between MAX and the RT controller is a separate thread running on the Real Time controller, and if it gets no time to run on the CPU because the application is taking up all of the CPU time, then communication will stop. This is not a bug on MAX or the real time system. It is just the way that that real time operating systems work. Consider the reverse situation. If the communication thread constantly ran at a higher priority to the application, the application would no longer be deterministic
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
