Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Oct 24, 2008


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

Getting Started with Deterministic Distributed I/O Systems

0 ratings | 0.00 out of 5
Read in | Print

Overview

This tutorial provides step-by-step instructions to help you set up your deterministic distributed I/O system using the NI 9144, an 8-slot EtherCAT chassis for C Series modules. Follow these guidelines to go from unpacking your hardware to accessing I/O in NI LabVIEW.

Requirements

Hardware

•    LabVIEW Real-Time controller with two Ethernet ports
     o    NI cRIO-9074 integrated controller
     o    PXI system with an NI PXI-8231/8232 Ethernet interface card
•    NI 9144 expansion chassis
•    C Series I/O modules
•    Ethernet cable

Software

•    LabVIEW 8.6 or later
•    LabVIEW Real-Time Module 8.6 or later
•    NI-RIO 3.0.1 or later
•    NI-Industrial Communications for EtherCAT

Setting Up the Hardware

This tutorial uses a cRIO-9074 as the LabVIEW Real-Time controller. To set up this hardware system:

  1. Insert the C Series I/O modules in the appropriate chassis (the CompactRIO local chassis and/or the NI 9144 chassis).
  2. Connect a standard Category 5 or better Ethernet cable from the cRIO-9074 Ethernet port 2 to the NI 9144 Ethernet port 1. You may daisy chain multiple NI 9144 chassis from the controller in this manner.


Note: Port 1 on the cRIO-9074 is on the bottom. Port 1 on the NI 9144 is on the top.

  1. Wire an external power supply to each chassis, which then powers on the hardware.

Related Links:
NI cRIO-9072/9074 Operating Instructions

Configuring the Master Controller

  1. Once the hardware has been connected, install the required software onto the host computer.
  2. Use an Ethernet cable to connect the cRIO-9074 Ethernet port 1 to the same network as your host PC.
  3. Launch Measurement & Automation Explorer from Start » Programs » National Instruments » Measurement & Automation. Double-click on Remote Systems in the Configuration panel tree on the left to discover the cRIO-9074 on the network, and click on the CompactRIO controller.
  4. Change the name of the controller, and select Obtain IP address from DHCP server under IP Settings. Click Reboot when you are done. (To use a static IP address, see the related links below.)

  1. To install the software on the real-time controller, expand the cRIO-9074 under Remote Systems. Right-click Software and select Add/Remove Software.

  1. Install the recommended software set - NI-RIO with Scan Engine, as well as NI-Industrial Communications for EtherCAT - onto the CompactRIO controller.
  2. Once the controller has rebooted, find the CompactRIO controller under Remote Systems again. Click on Advanced Ethernet Settings in the lower right-hand corner.
  3. Select the cRIO-9074 Ethernet port 2 (the MAC address that is not primary). Select EtherCAT in the drop-down box under Mode, and then click OK.


Note: When the controller’s Ethernet port 2 is in EtherCAT mode, you cannot use that port in an Ethernet network.

Related Links:
Troubleshooting CompactRIO Controllers in Measurement & Automation Explorer

Configuring the Network in LabVIEW

  1. Launch LabVIEW 8.6 or later from Start » Programs » National Instruments » LabVIEW X.X » LabVIEW. Click on Empty Project.
  2. Right-click on Project and select New » Targets and Devices.
  3. In the Add Targets and Devices dialog window, select Existing target or device and expand the category Real-Time CompactRIO to autodiscover the controller on the host PC’s subnet. Select the cRIO-9074 and click OK.
  4. In the LabVIEW Project window, right-click on the cRIO-9074 and select New » Targets and Devices.

  1. In the Add Targets and Devices dialog window, select Existing target or device and expand the category EtherCAT Master Device to auto-discover the EtherCAT port on the controller.

  1. Select the available EtherCAT master port and click OK. The Scan Slaves dialog window appears. The first option auto-discovers any slaves connected to the controller. Click OK.
  2. Once all the slaves have been discovered, you may create a VI on the CompactRIO controller. The LabVIEW Project lists each slave device, its I/O modules, and the physical I/O on each module (called I/O Variables). With the I/O Variables, you can read and write from the physical I/O in the LabVIEW program. To use them, click and drag these I/O Variables from the LabVIEW Project to the VI. 

If you use the I/O Variables in a timed loop, the loop timing source may be synchronized to the Scan Engine. When you run the VI, the program automatically deploys onto the CompactRIO target. For more information about the LabVIEW I/O Variable and CompactRIO Scan Mode, see the related link below.

Related Links:
Introduction to CompactRIO Scan Mode
Adding Real-Time Targets to a LabVIEW Project
Adding Third-Party EtherCAT Slaves in LabVIEW

0 ratings | 0.00 out of 5
Read in | Print

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/).