Configure EtherCAT Communication and Control Between NI PXI/cRIO and Nidec Unidrive Motor Drive

Updated Aug 18, 2025

Environment

Hardware

  • PXIe-8135
  • cRIO-9038
  • cRIO-9045

Software

  • LabVIEW
  • LabVIEW Real-Time Module

Driver

  • NI-Industrial Communications for EtherCAT

For Kollmorgan and other NI-supported third-party motor drives, we can use the NI LabVIEW Softmotion Module and SDI Plug-ins from the LabVIEW Tools Network to call integrated APIs or Express VIs to develop our control and communication code.
Refer to:

However, LabVIEW SoftMotion is no longer supported as of June 2021. The recommended alternative is to use EtherCAT drives with the NI Industrial Communications for EtherCAT driver instead of SoftMotion. This method would use the controller's EtherCAT command set to program the controller rather than SoftMotion axis and commands.

In this guide, we use Nidec Unidrive M700 as an example on how to configure an EtherCAT communication between NI PXI/cRIO and a third-party EtherCAT device.

Note: The How-To steps are similar for PXI & CRIO platforms. This article uses a PXI controller as an example.

1. Create a LabVIEW project, add a Real-Time PXI controller to the network, and connect to it.
Picture1.png
2. Make sure the NI-Industrial Communications for EtherCAT driver has been well installed on the PXI RT controller.
Picture2.png
3. In NI MAM, set the PXI controller Ethernet Adapter eth1 as EtherCAT. If you cannot find the EtherCAT selection, you need to check your drivers and software environment.
Picture3.png
Picture4.jpg
4. Add your PXI EtherCAT interface resource to the project. (In this case, Intel 82574L)
Picture5.png
5. Switch the Scan Engine Startup Mode to Configuration.

6. Import the Nidec Unidrive M700 XML file into LabVIEW. The firmware is provided by the drive manufacturer and must be compatible with the Industrial Communications for EtherCAT driver. Check with your drive vendor to confirm the correct version.



Note: Do not rename the XML file, as this may cause an unknown error.
Picture7.png

After successfully importing the profile(s), LabVIEW now can detect the existing EtherCAT slave device(s) connected to the PXI controller and will automatically import the PDOs to the project tree.
Picture8.png
If you would like to change opened I/O in LabVIEW, you need to revise the XML file. It is not recommended to change the XML files, so it's best to reach out to an expert on this drive. To change the PDOs on your own, you can refer to the article Change PDO Mappings for a Third Party EtherCAT XML File.

7. To check for the Online state and parameters of the EtherCAT Slave device (the drive), right-click the Slave device in LabVIEW project and select Online Slave Device State.
Picture9.png
Picture10.png
Under normal communication, the green light of the Ethernet network port will continue to blink, if it is steady green on it is successful connected but not established data communication.
Picture11.jpg

8. In the Real-Time target's properties, configure the EtherCAT Slave device's Distributed Clock to be same as the NI Scan Engine period. In this case, the Scan Engine's period is 1ms.
Picture12.png


9. In the EtherCAT Slave Device Properties, enable the Distributed Clock and set Shift Time as half of the Scan period.
Picture13.png

10. Configure some Initial Commands for the Slave device to make sure it works as expected in pre-operational states. In this case, you need to configure 0x60C2, subindex 0x1 as 01, 0x2 as FD. Different hardware has different configuration requirements, ask your drive vendor for specific instructions.
Picture14.png
11. Right-click the RT target and choose Deploy all.

12. Before running your VI code, switch the Scan Engine Mode from Configuration to Active. Check that the device has entered the Operational state in the Online Slave Device State window.

Picture15.png
13. Run your LabVIEW RT VI developed based on the opened PDOs of the drive. Use the attached code as a reference.
Picture16.png

14. Send 0110B, 0111B, 1111b control words in sequence to start the drive. The drive's panel will display "Run."
Picture17.jpg

15. Modify the value of the Target Position. It can be found that in Position mode. The motor shaft rotates as the value changes.

16. Refer to the EtherCAT communication documentation from the drive vendor to check the meaning of the Status Word IO return values, which correspond to the current Status of the drive.

17. Position Actual Value returns the value of the motor encoder. A different value will be returned when the Position of the shaft changes.
Picture18.png

 

Attachments