USD

Use Sitara’s Specialized Subsystem for Industrial Automation Communications and Processing

By Stephen Evanczuk

Contributed By Digi-Key's North American Editors

Delivering reliable communications for industrial automation systems presents unique challenges for developers. These systems rely on multiple communications protocols designed to maintain reliable real-time connections among the diverse subsystems used in an industrial environment. Within that environment, conventional general purpose processors may be unable to consistently meet real-time communications requirements as they execute application software.

Developers need a development platform that they can easily adapt to meet the diverse demands of industrial applications.

This article shows how developers can use an off-the-shelf development kit from Texas Instruments to accelerate development of industrial communications solutions. At the heart of this kit, the Texas Instruments Sitara processor delivers the combination of computational resources and dedicated communications capabilities required in industrial applications.

Industrial communications requirements

As the key enabler for advanced manufacturing strategies, industrial communications systems face increasingly stringent requirements for real-time response and reliability in linking groups of sensors, motors, and actuators to programmable logic controllers (PLCs) and human-machine interfaces (HMIs).

Along with this diverse collection of subsystems, an industrial application might face a combination of performance requirements, specialized equipment, and legacy systems that drive the need to support multiple networking technologies and protocols. As a result, a single environment could potentially need to support multiple fieldbus protocols such as Control Area Network (CAN), Modbus, and Profibus as well as industrial Ethernet protocols such as Profinet, EtherCAT, Sercos III, and others.

As with fieldbus standards, each industrial Ethernet standard has emerged to address a specific set of requirements. Each provides the kind of real-time performance missing in conventional Ethernet but required in industrial communications. How they realize that capability can differ markedly from one industrial Ethernet standard to another.

For example, Profinet allows the master controller to communicate with all devices in the network. Slave devices can in turn exchange frames with the controller but only communicate with other devices acyclically. For communications, this protocol provides a standard transmission control protocol/internet protocol (TCP/IP) channel for conventional non-real-time data exchange. For real-time data exchange, a Profinet real-time channel supports cyclic or acyclic exchanges between a controller and slave devices (Figure 1, left).

Diagram of Ethernet stacks for Profinet (left) and EtherCAT (right)Figure 1: Different industrial Ethernet stacks for Profinet (left) and EtherCAT (right) might provide similar services such as conventional Ethernet but differ markedly in their approach for supporting real-time communications in their higher-level protocols and underlying Media Access Control (MAC) and Data Link Layer (DLL) services. (Image source: Texas Instruments)

In EtherCAT, the master communicates with slaves by including commands and data for each slave in a frame that is transmitted from node to node. As the frame passes through, each slave node reads its designated commands and data and adds its own data to the frame as it continues on. Like Profinet, EtherCAT combines a conventional TCP/IP channel for Ethernet compatible communication with a real-time channel for time-sensitive communication (Figure 1, right).

Although different industrial Ethernet standards rely on significantly different mechanisms, they all share the ability to provide the kind of real-time performance missing in conventional Ethernet but required in industrial communications. In implementing these standards, however, developers can find themselves caught between performance limitations of typical design options and real-time performance requirements of their application.

Real-time applications depend on low-latency responses delivered within a consistent amount of time following a command, input, or other driving stimulus. In the cycle-based processes used in industrial systems, low latency systems ensure that processes occur as close as possible to the beginning of each cycle. Jitter or other factors in these systems can cause unpredictable variation in the cycle, eroding the system's ability to handle high cycle rate processes in a reliable, consistent fashion.

In the past, developers often found themselves forced to design their own hardware solutions to meet the real-time challenges associated with industrial connectivity. Complicating most approaches, software and hardware designed for general purpose computing focuses on optimizing overall performance of application execution rather than addressing real-time performance requirements.

At the software level, industrial application developers need low latency, deterministic response capabilities, typically provided with real-time Linux and, at a more exacting level, with a real-time operating system (RTOS). Ultimately, latency and deterministic performance depend on the processor used in the underlying hardware platform.

A general purpose processor like the Arm® Cortex®-A core is ideal for executing software that performs the higher-level tasks of any application including those needed for industrial automation. Typical general purpose processors take advantage of multi-level cache memory hierarchies and multi-stage instruction pipelines to speed processing (Figure 2).

Diagram of Arm Cortex-A uses multiple layers of interconnect and resources to optimize execution of diverse workloadsFigure 2: In a general purpose processor such as the Arm Cortex-A, the architecture uses multiple layers of interconnect and resources to optimize execution of the diverse workloads encountered in application execution. (Image source: Texas Instruments)

For industrial communications developers, those same architectural features complicate the ability to achieve the real-time performance required in industrial automation in general and in real-time Ethernet systems. Each layer of cache, memory, and interconnect extends the time required to satisfy cycle-based processes (latency). Because the degree to which the processor must reach through these layers can change from cycle to cycle, the response time can vary dramatically.

In the past, developers facing this problem have implemented the time and performance-critical portions of their systems with dedicated hardware, field-programmable gate arrays (FPGAs), or even application-specific integrated circuits (ASICs). For supporting real-time Ethernet, for example, this approach has meant implementing the MAC and other real-time functionality in an FPGA or ASIC.

Although custom hardware can offer a very effective solution in terms of performance, the significant increase in cost and complexity of the resulting design makes this approach practical only for applications where performance requirements dominate all other considerations. For industrial communications, Texas Instruments provides a more practical, cost-effective solution by taking full advantage of the multiprocessor architecture of its Sitara processor family.

Industrial communications subsystem

The Sitara processor family combines a high-performance Arm Cortex-A application processor with one or more instances of its Programmable Real-Time Unit and Industrial Communication SubSystem (PRU-ICSS). While the Cortex-A processor executes the main application, the PRU-ICSS provides real-time processing and IO capabilities needed for industrial Ethernet protocols and other control functions (Figure 3).

Diagram of Texas Instruments Sitara processor familyFigure 3: Members of the Texas Instruments Sitara processor family combine a general purpose Arm Cortex-A processor with a specialized programmable real-time unit specially optimized to provide the low latency, deterministic performance required in real-time applications. (Image source: Texas Instruments)

Each Sitara Programmable Real-Time Unit (PRU) subsystem includes two 200 megahertz (MHz) real-time cores (PRU0 and PRU1 as shown in Figure 3) that run with a cycle time of five nanoseconds (ns) per instruction. The cores are designed with a small set of instructions that are processed without an instruction pipeline to ensure deterministic single-cycle instruction execution. To reduce latency of peripheral operations, the cores access shared resources through a dedicated 32-bit interconnect that connects them directly with multiple peripherals including Management Data Input/Output (MDIO) and Media Independent Interface (MII) needed for real-time Ethernet. In addition, each PRU core connects directly to the device's external pins through its own set of up to 30 inputs and 32 outputs (Figure 4).

Diagram of Texas Instruments Sitara processorsFigure 4: Integrated in Texas Instruments Sitara processors, the PRU uses its direct access to input and output pins as well as other hardware resources to reduce latency in industrial applications. (Image source: Texas Instruments)

With this tightly coupled peripheral architecture, real-time cores can operate independently and avoid delays associated with working through the multiple interconnects and layers in a typical general processing system. The combination of fast single-cycle execution and direct access to peripherals enables the subsystem to execute cycle-based processes deterministically and respond quickly and predictably to external events. As a result, the PRU subsystem can perform IO operations and reach external pins much more efficiently than the companion general purpose processor (Figure 5).

Diagram of Programmable Real-Time Unit (PRU) subsystem built into TI Sitara processorsFigure 5: With its single-cycle instruction execution and direct access to device pins, the Programmable Real-Time Unit (PRU) subsystem built into TI Sitara processors needs to work through far fewer layers to read or write signals to device pins (right), providing faster peripheral operations than is possible with the companion Arm Cortex-A processor (left). (Image source: Texas Instruments)

The combination of high-speed IO and 5 ns cycle time available with the PRU cores provides the low latency, deterministic performance capability required for industrial communications. At a higher level, this architecture provides flexible mechanisms designed to optimize coordinated use of the Arm Cortex-A and PRU subsystem to maximize performance of industrial applications.

By using dedicated and shared resources as appropriate, the various cores are able to operate at maximum performance on their own and together for complex real-time task execution. Tasks suited to an individual core can independently run on that core, while more demanding real-time tasks can share the processing load across different tightly coupled cores. The ability for the PRU cores to directly access the Cortex-A core's resources helps ensure high-performance execution of real-time operations and peripheral interactions in either operating mode.

To optimize resource allocation and management in tightly coupled execution, the Sitara system architecture provides coordinating mechanisms in both hardware and software. At the hardware level, interprocessor communication features including hardware-based mailboxes and resource lock registers help ensure synchronization of the Cortex-A processor and PRU-ICSS.

At the software level, support for Linux multiprocessing services provides a standard operating environment for coordinating task execution in tightly coupled operation. At runtime, the operating system kernel running on the Arm Cortex-A core coordinates PRU system operations using standard RemoteProc (Remote Process) control and rpmsg (Remote Process Messaging) services with its own drivers and matching drivers in PRU firmware. While RemoteProc services handle PRU firmware loading and subsequent processing, the rpmsg framework enables message exchange from the application to the PRU using the virtio virtualization interface (Figure 6).

Diagram of Texas Instruments Sitara processorsFigure 6: Texas Instruments Sitara processors support a standard set of services for application interaction and coordination of the Arm Cortex-A host processor and PRU subsystem. (Image source: Texas Instruments)

The advantages of this architecture become particularly evident in its ability to simplify development and boost performance of industrial connectivity options ranging from serial communications interfaces such as Serial Peripheral Interface (SPI) to complex industrial Ethernet protocols. TI Sitara processors can efficiently execute real-time Ethernet protocols such as Profinet through a combination of protocol software stacks running on the Cortex-A processor and real-time services handled by PRU firmware (Figure 7).

Diagram of Texas Instruments Sitara processor can meet the requirements of an industrial Ethernet protocolFigure 7: By coordinating software execution in its Arm Cortex-A host processor and firmware execution in its PRU subsystem, a Texas Instruments Sitara processor can meet both general purpose processing and real-time requirements of an industrial Ethernet protocol such as Profinet. (Image source: Texas Instruments)

This approach provides a simple solution for supporting multiple protocols in a single application. Developers need only run the stack and firmware required for each protocol concurrently in the Sitara processor (Figure 8).

Image of Texas Instruments Sitara processor provides concurrent support for industrial communications interfaces and protocolsFigure 8: The firmware execution efficiency of PRU and the software execution performance of its Arm Cortex-A processor enable a Texas Instruments Sitara processor to provide concurrent support for multiple industrial communications interfaces and protocols. (Image source: Texas Instruments)

TI provides full protocol stacks for several different serial communications protocols, fieldbus protocols, and real-time Ethernet protocols including EtherCAT, Profinet, and Sercos III. By combining protocol stacks on the same Sitara-based system, developers can support the diverse connectivity requirements for a typical PLC or industrial switch that needs to support, for example, an industrial Ethernet such as Profinet on the host side as well as a fieldbus such as Profibus or IO-Link on the peripheral side.

Available standard industrial Ethernet packages are provided as black box binaries, but TI provides developers with a number of examples of industrial communications services. For application development, a family-specific TI Processor Software Development Kit (Processor-SDK) such as the Processor SDK for AM437x Sitara processors, provides an application programming interface (API) for the respective processor family. In delivering family-specific functionality, these APIs provide intuitive abstractions for low-level operations such as GPIO or IO-Link transactions (Listing 1).

Copy
/* GPIO LED toggling*/
...
Board_init(boardCfg);
GPIO_init();
While(1)
{
GPIO_write(Board_LED1, GPIO_PIN_VAL_HIGH);
Delay();
GPIO_write(Board_LED1, GPIO_PIN_VAL_LOW);
Delay();
}

/* IO-LINK status */
...
Board_init(boardCfg);
...
IOLINK_socGetFwCfg(peripheralNum, &iolink_cfg);
...
IOLINK_socSetFwCfg(peripheralNum, &iolink_cfg);
...
IOLINK_init();
...
iolinkHandle = IOLINK_open(peripheralNum, &iolinkParams);
...
status = IOLINK_control(iolinkHandle, iolinkCmd, &iolinkCmdArg);
...

Listing 1: As these snippets demonstrate, the Texas Instruments Processor SDK API for each Sitara family lets developers focus on functional abstractions rather than spend time dealing with low-level bit manipulation or register access. (Code source: Texas Instruments)

Accelerated development

In addition to the code and tools offered by TI for implementing industrial communications protocols on Sitara processors, developers can accelerate development of their own industrial communications software using protocols, drivers, and PRU firmware in add-on packages from TI and third-party protocol stack providers. Similarly, the TI TMDSIDK437X Industrial Development Kit (IDK) speeds development by providing a comprehensive Sitara-based hardware platform for industrial applications (Figure 9).

Image of Texas Instruments TMDSIDK437X IDKFigure 9: The Texas Instruments TMDSIDK437X IDK combines a Sitara processor, memory, and a comprehensive set of peripherals, interfaces, and communications channels providing developers with a platform for evaluation of industrial communications protocols and rapid development of industrial automation applications. (Image source: Texas Instruments)

The TI TMDSIDK437X IDK board includes 1 gigabyte (Gbyte) of double data rate 3 (DDR3) random-access memory (RAM), quad-SPI NOR flash, and a TI AM4379 Sitara processor. The AM4379 processor combines an Arm Cortex-A9 processor with two PRU subsystems, each containing two PRU cores.

In a typical industrial automation network, the Sitara AM4379 can play multiple roles. Besides use in multi-protocol systems like PLCs, switches, and gateways, Sitara AM4379 processors find use in end equipment requiring HMI support thanks to their integrated graphics and display subsystems.

Along with multiple peripherals and communications ports, the IDK board includes Ethernet interface chips including the Texas Instruments TLK105 10/100 Mbits/s PHY transceiver for industrial Ethernet connections and the Microchip Technology KSZ9031RNXIA-TR gigabit (Gbit) transceiver PHY for conventional Ethernet connections.

Implementing an industrial communications application with this kit is straightforward, requiring only a 24 volt supply and an Ethernet cable connection to the development system.

The TI PRU-ICSS Industrial Software set provides software packages for the industrial communications protocols mentioned earlier. Using the TI Code Composer Studio integrated development environment (IDE), developers can quickly load, build and run sample applications provided with the packages as a starting point, or use them during production for their own applications.

Using TI software and PRU-ICSS Industrial Software packages, developers can quickly implement sophisticated industrial automation systems such as an Ethernet connected motor drive controller (Figure 10).

Diagram of Texas Instruments TMDSIDK437X IDK and Texas Instruments softwareFigure 10: The combination of the Texas Instruments TMDSIDK437X IDK and Texas Instruments software provides a particularly effective development platform for rapid implementation of industrial systems such as the EtherCAT connected motor controller shown here. (Image source: Texas Instruments)

For the motor drive controller application, the PRU subsystem would collect motor position data using the TMDSIDK437X board's analog-to-digital converter (ADC) interface or its EnDat digital bidirectional encoder interface. Using this data, the Arm Cortex-A processor would execute a Field Oriented Control (FOC) algorithm to create a new set of motor control parameters for delivery through a Sitara pulse-width modulation (PWM) channel. Finally, a TI DRV8313 motor driver included on the TMDSIDK437X board would output the adjusted motor parameters.

Using the TMDSIDK437X IDK hardware board with TI software, developers can quickly implement industrial automation applications connected through a variety of interfaces and communications protocols. For custom applications, the kit serves as a comprehensive reference design that can help accelerate hardware development. Combined with this hardware base, the TI Processor SDK and PRU-ICSS Industrial Software package provide a development platform capable of meeting requirements of emerging applications built on diverse industrial communications protocols.

Conclusion

Among an expanding set of requirements, high-performance execution of industrial communications protocols is critical for realization of advanced industrial automation systems. While general purpose processors are required to execute algorithms and higher-level processes in these systems, specialized devices are typically needed to deliver the low latency, deterministic performance required to support real-time industrial communications protocols for fieldbus and industrial Ethernet connectivity.

As shown, the Texas Instruments Sitara family provides both the general purpose and real-time processing units required to meet these diverse requirements. Using a Texas Instruments Sitara-based industrial development kit in combination with prebuilt communications protocol stacks, developers can rapidly deploy sophisticated industrial automation applications able to support a broad array of industrial communications options.

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Stephen Evanczuk

Stephen Evanczuk has more than 20 years of experience writing for and about the electronics industry on a wide range of topics including hardware, software, systems, and applications including the IoT. He received his Ph.D. in neuroscience on neuronal networks and worked in the aerospace industry on massively distributed secure systems and algorithm acceleration methods. Currently, when he's not writing articles on technology and engineering, he's working on applications of deep learning to recognition and recommendation systems.

About this publisher

Digi-Key's North American Editors