- What are required configuration steps to set up a Beckhoff TwinCAT PLC System to operate an EPOS4 or IDX (with EtherCAT)?
- Are there any specific motion libraries or PLC application code samples present by maxon?
Some technical background knowledge:
The EPOS4 (as well as the IDX) are based on the standardized "CiA402 - CANopen device profile for drives and motion control" for commanding and data exchange via CANopen or EtherCAT. All motor controllers that comply with this standard can thus be commanded by a PLC in a largely uniform manner (regardless of the manufacturer of the motor and motor controller). Therefore, maxon does not provide its own specific motion control libraries or sample programs. The motion control libraries of the PLC manufacturer can be used directly after the motor controller (= EPOS4) or motor (= IDX-ET) has been integrated into the PLC system environment with the so-called "System Manager" provided by the PLC manufacturer (e.g. Beckhoff) too.
Internals for Insiders and Experts only:
The motion control libraries of the PLC manufacturers usually operate the EPOS4 or IDX (like all CIA402-compliant motor controllers) in the so-called "CSP - Cyclic Synchronous Position" mode. The PLC performs the path planning (or so-called trajectory generation) of each drive axis and commands the CiA402 compliant motor controller (= EPOS4 or IDX) at a fast bus cycle rate (via so-called SYNC PDOs). The "Target position" data calculated by the PLC and the "Controlword" are transmitted to the motor controller via so-called "SYNC PDO" in a precise, fast cycle period of typ. 1 or 2 ms. The PLC motion control library can also execute pure speed controlled functions or homing commands. Although from the application point of view this appears like the "PVM - Profile Velocity Mode" or "Homing Mode", the motion sequences and monitoring are calculated and executed on PLC level and only the resulting "Target position" for the CSP mode and the control are cyclically transferred to the motor control (e.g. EPOS4, IDX-ET).
Solution resp. required steps in Practice:
1.) PLC Motion Control Library
When using a PLC, the PLC manufacturer usually offers a motion control library that can be used to command any motor controllers and drives that comply with the CiA402 standard (which is the case with the EPOS4 or the IDX). In the case of Beckhoff, the PLC system thus consists of TwinCAT plus the Beckhoff "NC Library".
2.) Motor and control configuration
The motor and control configuration (= automatic tuning) must be performed once by the motor controller before it can be used by a PLC and the PLC's setup should be processed. The following wizards of the maxon "EPOS Studio" software are available for this purpose:
- "Startup" Wizard
- "Regulation Tuning" Wizard
Some brief video tutorials about this and other "EPOS Studio" tools are present by the "Videos" tab of each EPOS4 product website, e.g. www.maxongroup.com/maxon/view/product/control/Positionierung/EPOS-4/546047
Most important video tutorials:
- EPOS Studio: Getting Started
- EPOS Studio: Startup Wizard (DC Motor)
- EPOS Studio: Startup Wizard (EC Motor)
- EPOS Studio: Regulation Tuning
3.) Integration of an EPOS4 or IDX into a PLC system environment
The EPOS4 as well as the IDX-ET must be integrated into the system environment of the PLC. The necessary steps and instructions in case of a Beckhoff TwinCAT master and EtherCAT are listed in the following documents:
Chapter "6.3 Beckhoff TwinCAT Integration" of the "EPOS4 Application Notes Collection.pdf"
-> C:\Program Files (x86)\maxon motor ag\EPOS IDX\EPOS4\05 Applications\Application Notes
Chapter "5.3 Beckhoff TwinCAT Integration" of the "IDX Application Notes Collection.pdf"
-> C:\Program Files (x86)\maxon motor ag\EPOS IDX\IDX\05 Applications\Application Notes
Please follow each of the configuration steps described by these documents. If you have any questions, please contact maxon's Support Center.
- Please note that 1 ms is the fastest possible bus cycle time by the EPOS4 and IDX (independent if CANopen or EtherCAT). Ensure that the PLC does not have a faster bus cycle rate (i.e. less than 1000 us) in use. If the PLC's bus cycle time is too fast, you will end up in communication errors or "... invalid DC timing" error messages reported by the master.
- Please take care that the EPOS4's and IDX's "Interpolation time period value" (0x60C2/01) is configured properly according to the PLC's bus cycle time (resp. its configured SYNC period). In case of a mismatching configuration or the default value of '0' the motor motion commanded in "CSP - Cyclic Synchronous Position" mode by SYNC PDOs of the PLC will not be smooth but quite noisy instead. Please find more information about this by the following linked Support Center document:
-> EPOS4 / IDX: CSP Mode -> Relevance of "Interpolation Time Period Value"?
- If you have a PC with a Soft-PLC and EtherCAT in use, please ensure that the Ethernet interface has been approved for real-time EtherCAT communication. There is a list of approved Ethernet interface and chip sets present by Beckhoff's website:
-> Beckhoff website: Supported network controllers
-> Beckhoff website: TwinCAT System requirements
4.) PLC Application code samples
When using the motion control library of the PLC manufacturer, corresponding example programs are usually also provided by the PLC manufacturer. maxon does not provide its own additional examples, since the standard examples of the PLC manufacturer can also be used for the EPOS4, the IDX-ET (and also all other CiA402 motion control slaves).
- In case of a Beckhoff TwinCAT and "NC Library" PLC system, corresponding examples can be found on the Beckhoff website:
Please note the subtree "Tc2_MC2" by Beckhoff's website, which holds all documents describing Beckhoff "MC - Motion Control" function blocks.
Additional support by maxon required?
Please note and understand that maxon cannot provide engineering support for your Beckhoff system environment or even application programming. Anyway we are open to support as fas as possible concerning the integration of the EPOS4 (or IDX) into a Beckhoff's project setup. If you need our assistance in this case, please submit a support request and provide us the following information and files:
- Beckhoff's PLC project file:
-> "Beckhoff Information System: Exporting and transferring a PLC system"
-> "Exporting and importing a PLC project"
- EPOS4's *.dcf configuration file
-> "EPOS / IDX: Export of parameter configuration in a *.dcf file"
- Part number of your concrete maxon motor combination in use
(resp. the data sheets of your motor and encoder if it is a 3rd party product).
- Power supply voltage in use for the EPOS4
- Any information about Beckhoff's TwinCAT or EPOS4's error states (if such are present).
Please find some information how to check EPOS4's error state (in case of an EtherCAT system) by the following linked Support Center document:
-> "EPOS4 / IDX EtherCAT: Which object holds the error codes?"