This content is not available in your preferred language.
The content is shown in another available language. Your browser may include features that can help translate the text.
Master: LabVIEW Real-Time Controller with two Ethernet ports, such as CompactRIO, PXI , and industrial controllers. Refer to the Supported EtherCAT Masters section in the NI-Industrial Communications for EtherCAT® Readme
Slave: NI-9144 (not supported as of NI-Industrial Communications for EtherCAT® 20.0) or NI-9145 EtherCAT CompactRIO Chassis with NI C Series I/O modules
Ethernet cable and power supplies
This tutorial uses a cRIO-9074 CompactRIO Controller as the EtherCAT master and NI-9144 as the EtherCAT slave. To set up this hardware system, follow these steps:
Wire an external power supply to each chassis, which then powers on the hardware.
Note: If you use the I/O variables in a Timed Loop, you can synchronize the loop timing source to the NI Scan Engine. When you run the VI, the program automatically deploys onto the CompactRIO master. For more information about the LabVIEW I/O variable and CompactRIO Scan Mode, refer to Understanding CompactRIO Scan Mode.
LabVIEW streamlines the different EtherCAT states (that is, Operational, Init, Bootstrap, and so on) by grouping them into two LabVIEW Scan Engine modes: Configuration Mode and Active Mode. In Active Mode, the LabVIEW program gets real data from the network. In Configuration Mode, the network data is not updated and configuration of the EtherCAT network is enabled, allowing you to add new slave devices and modules and download the NI-9144 EtherCAT slave firmware.
To change the LabVIEW Scan Engine mode, right-click the cRIO-9074 master controller in the LabVIEW project explorer and select Utilities » Scan Engine Mode » Switch to Active (or Switch to Configuration). The LabVIEW Scan Engine mode can also be changed programmatically with the Set Scan Engine Mode function, accessed by right-clicking on the LabVIEW block diagram and selecting the Measurement I/O » NI Scan Engine palette.
You can change an individual slave's EtherCAT state by right-clicking on the slave device in the LabVIEW Project window and selecting Online Device State. The slave device's EtherCAT state can be changed almost completely independently from the LabVIEW Scan Engine mode, with only two restrictions. One restriction is that you cannot place a slave device into Operational or Safe-Operational state unless the LabVIEW Scan Engine is in an equivalent state (Active Mode). The other restriction is that you cannot place your device into Bootstrap state unless the LabVIEW Scan Engine is in Configuration Mode.
To have a third-party slave device show up in the LabVIEW Project window, you must import the slave's device profile XML file before configuring the slave with LabVIEW.
The program written in LabVIEW Real-Time is deployed to the EtherCAT master, which is responsible for collecting, processing, and controlling the I/O in the EtherCAT network. Additionally, each NI-9144 slave chassis contains an embedded field-programmable gate array (FPGA) that can execute custom timing and signal processing to help you create intelligent distributed devices that are synchronized within 100 ns of each other. To take advantage of the programmable FPGA capabilities, you must use LabVIEW, LabVIEW Real-Time Module, and LabVIEW FPGA Module.
If you are familiar with programming in LabVIEW FPGA for CompactRIO and other NI RIO platforms, there are some differences between programming the master's local FPGA and the slave's FPGA. Since LabVIEW 2009, user-defined I/O variables are used to synchronize FPGA data with the Scan Engine. These user-defined I/O variables are also the only means for transferring data between the controller’s real-time VI and the-NI 9144/45 expansion chassis’ FPGA VI.
FPGA Transfer Methods
User-defined I/O variables
FPGA Host Interface
DMA transfer functions
FPGA front panel debugging
An important note is that there is a limit to the number of user-defined I/O variables that can be created in FPGA Mode. Refer to Optimizing an FPGA Application.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.