Festo has released application note 100201, a step-by-step guide to integrating the CMMT servo drive into a TwinCAT 3 project on a Beckhoff industrial PC (IPC), with the axis controlled through the NC (Motion) element. The document covers the whole workflow, from connecting to the IPC to activating the configuration, and leaves the system ready for programming with PLCopen function blocks.
Components and software versions
The example was built with the CMMT-AS-C4-3A-EC-S1 (EtherCAT variant) and the following tools:
| Component | Version |
|---|---|
| Servo drive | CMMT-AS-C4-3A-EC-S1 |
| CMMT plug-in | 1.0.1.10 |
| Festo Automation Suite | 1.0.3.6 |
| TwinCAT 3 | 12.0.21005.1 REL |
| TwinCAT 3 (IPC) | Build 4022.22 |
Festo notes that the CMMT-AS and the extra-low-voltage CMMT-ST share the same software platform, so the settings described can serve as a reference for the latter. It adds, however, that this has not been explicitly tested and that correct operation cannot be guaranteed.
Connecting to the IPC and installing the ESI file
The first step is to create a new TwinCAT 3 project and connect to the IPC. From SYSTEM > Choose Target…, run a Broadcast Search over Ethernet and select the laptop network adapter the IPC is plugged into. Both devices must be on the same network. If the IPC does not show up and its network settings are unknown, a monitor can be attached via DVI, plus a mouse and keyboard over USB, to change the settings from the IPC’s own Windows desktop.
Once the device is found, set Address Info to IP Address and click Add Route. The default password of a Beckhoff IPC is 1, and an “X” in the Connected column confirms the link.
Next, the CMMT EtherCAT device description (ESI) file, downloadable from the Festo support portal, has to be installed. Copy it to C:\TwinCAT\3.1\Config\Io\EtherCAT, preferably before starting TwinCAT. If TwinCAT is already running, refresh the repository with TwinCAT > EtherCAT Devices > Reload Device Descriptions.
Scanning the EtherCAT network
With the ESI installed, right-click Devices under I/O and run a Scan, select the EtherCAT interface and accept Scan for Boxes. If the CMMT is detected, choose to append the linked axis to the NC configuration (Append linked axis to: NC – Configuration).
After the scan, the CMMT appears under the EtherCAT master in I/O and Axis 1 under MOTION > NC Task. DC (Distributed Clocks) must be enabled on the drive for synchronization. Optionally, Free Run can be used to test communication between the IPC and the CMMT.
PLC project and I/O variables
The PLC project is added with Add New Item… on PLC, choosing a Standard PLC Project. In a global variable list (GVL), declare one USINT output and one USINT input; the output is initialized to 8.
That value selects the Cyclic Synchronous Position (CSP) mode of operation. In this mode the CMMT does not control the move to the target position by itself: the IPC’s NC element defines and controls the trajectory and sends the intermediate positions to the drive.
After building the project without errors, the variables show up under PLC Task Inputs/Outputs and are linked to the CMMT’s Modes of Operation Display (input) and Modes of Operation (output). If they are not visible, the PLC project has usually not been compiled or the PLC program contains an error.
The Tc2_MC2 library, which contains the PLCopen function blocks, is then added under PLC > References > Add Library, and an AXIS_REF variable is created in the GVL to be linked to the NC axis.
NC axis configuration
Under MOTION > NC Task 1 SVB > Axes > Axis 1 > Enc, set the Scaling Factor Numerator according to the CMMT fieldbus settings, with a value of 10-6 (0.000001).
The CMMT, motor and actuator settings defined in Festo Automation Suite must also be checked against the NC axis parameters (MOTION > NC > Axes > Axis 1 > Parameters): velocity, acceleration, quick-stop ramp and maximum velocity, among others. Finally, link the AXIS_REF variable via Axis 1 > Settings > Link To PLC….
Activating the configuration and Run mode
Use Activate Configuration to download the scanned network and settings to the IPC. If licenses required for the NC application are missing, TwinCAT 3 can generate trial licenses that expire after a set period; full licenses can be purchased from Beckhoff once testing is successful. License codes are listed under SYSTEM > License > Online Licenses.
Then switch the IPC to Run mode. Hardware or network changes must be made in Configuration mode (blue icon), and PLC code can only be downloaded once the IPC is in Run mode.
Why it matters for integrators
With the configuration complete, the PLCopen Softmotion function blocks can be integrated just as in CODESYS, linked to the AXIS_REF created for the axis. For integrators and machine builders already working with TwinCAT, the guide condenses the work of adding a Festo servo drive to a Beckhoff architecture into a few steps, with trajectory control handled by the IPC’s NC and no extra motion controller required.
More on the drive is available on the official Festo CMMT servo drive page and in the CMMT-AS listing at the EtherCAT Technology Group. On Automation Fair, see more Festo news, the related guide Festo CMMT with Allen-Bradley PLC over EtherNet/IP and our motion, motors and drives section.
