If you’re working on real-time (RT) control systems such as machine tools in factory automation or new automotive systems, you should know that some new and improved solutions in designing and implementing these systems are now available. A combination of Texas Instruments’ new C2000 series microcontrollers plus the networking technology of EtherCAT genuinely makes real-time system monitoring and control possible. Good solutions for demanding RT systems are hard to come by. This one delivers higher performance.
- Real-time controllers get new connectivity capabilities
- Not sure which real-time controller is right for you?
- Ready to add EtherCAT to your design?
Real Time Defined
Real time (RT) means “right now.” The term infers not so much of an instantaneous response, but one that’s fast enough to satisfy some predefined requirement. Any system declared as being real time must be able to respond to commands within a certain time period demanded by the application. There should be minimum or no delay or latency.
Almost every component or subsystem has latency. Nothing is perfect, but a response should be fast enough to deal with the application. Real-time systems guarantee a response within a specific period. Factory automation with its machine tools, robots, and controllers often require RT response to some monitor or control signal. Some modern automotive applications like advanced driver-assistance systems (ADAS) need such response, too. Other applications that often require RT control include electric vehicles (EVs), building automation, medical/healthcare products, telecom systems, and solar-power equipment like inverters.
Where does the delay or latency come from? It’s usually a mix of the timed operations of the controlled device plus processing operations. Another source of latency is the communications medium. It takes time to transmit data from a controller to the controlled device. Real-time controllers must deal with this connectivity issue. The solution lies in speeding up the communications and processing. Microcontrollers are fast but oftentimes not fast enough. Furthermore, the communications time over the link from controller to controlled device may be a critical issue. Both must be sped up.
When building real-time controllers today, multiple chips are usually required to meet the connectivity, application processing time, and related control-system needs.
Such demands add complexity and cost to your design. TI’s C2000 F2838x microcontrollers help solve this problem by integrating enhanced connectivity and increased control performance in one chip. And the adoption of a low-latency network like EtherCAT produces a solid real-time system.
One way to achieve RT status is to adopt a communications networking technology that offers support. An example is EtherCAT, short for Ethernet for Control Automation Technology. It’s a special version of Ethernet (IEEE 802.3) that’s been improved for factory automation and process control. The popular Ethernet LAN is widely used, but a major downside is its inherent non-deterministic characteristic. The EtherCAT version solves this problem and makes Ethernet suitable for RT applications.
The EtherCAT standard is managed by the EtherCAT Technology Group (ETG) with its 4300+ members. Some of its responsibilities include compliance testing and formal certification to ensure interoperability between the equipment of its members. Keep in mind that EtherCAT is also an International Electrotechnical Commission (IEC) standard—IEC 61158.The overall goals of EtherCAT are to keep transactions short (<100 µs) and to minimize communications jitter to less than 1 µs. Here’s how it does that.
First, EtherCAT uses the same PHY and MAC as standard Ethernet. It uses the 100-Mb/s version of Ethernet 100Base-TX that implements full duplex operation. The network topology can be any of the standard formats like bus, tree, star, and ring made up of a master and multiple slaves. The master initiates all operations. The overall objective is to keep all links between nodes as short as possible and within the maximum 100-meter connections allowed by the standard.
The EtherCAT principle is to use the standard Ethernet frame; the payload is put within this well-known frame. The slave nodes read the data addressed to them and then process the data on the fly or insert data into the frame as it passes through the node. The whole protocol is based on the idea that data processing is initiated and carried out before the whole frame is received. This results in a minimum of delay over the network. Each frame contains the EtherCAT datagrams that identify the node to which the master wants to communicate. Any desired reading or writing operations then takes place.
Additional features of EtherCAT include:
- No network switches.
- TCP/IP and UDP/IP protocols aren’t normally used.
- The standard allows dc power to be distributed over the network for remote nodes.
- Since timing is critical, EtherCAT uses distributed clocks for high-precision synchronization.
Building a System
A master node can be implemented with software on any Ethernet MAC. Slaves require significant processing power, so it’s important to use a powerful processor. That processing power is available in Texas Instruments’ C2000 series of processors, specifically the TMS320F28388D. This group of processors includes multiple connectivity options to support the increased control performance. The devices are flexible enough to build an EtherCAT system.
The F2838x series is optimized for advanced RT closed-loop control applications. Each device in the series achieves this flexibility with its own 32-bit Arm Cortex-M4 MCU, which implements EtherCAT and many other interfaces, such as 10/100-Gb Ethernet, CAN-FD, USB, UART, I2C, SPI, SSI, and others. General processing is handled by two C28x DSP cores that have 64-bit floating-point capability with hardware divide, a trigonometric math unit (TMU), up to 32 PWM channels, a configurable logic block (CLB), and a 16-bit ADC.
The figure shows the sophisticated architecture of the F2838D.
The F2838D is the only microcontroller chip you will need to design EtherCAT products.
The F2838x series is available in six versions. You can choose amongst 200 or 400 MIPS; 1.0 or 1.5 Mb of flash. All include Ethernet; two models implement EtherCAT. Four of the models have CLBs.
The F2838D was designed to replace multiple MCUs in RT and EtherCAT applications. It can execute a software stack while performing real-time motor or other control functions. It is an ideal choice for implementing an EtherCAT slave node. The TI EtherCAT controlCARD provides a good starting platform to experiment and design. The F2838D software includes a reference solution to creating a slave-node application.