How to Connect Legacy Factory Automation Systems to Industry 4.0 without Disruption
Contributed By DigiKey's North American Editors
2023-08-14
Factories are transforming as Industry 4.0 and the Industrial Internet of Things (IIoT) gains momentum. Among other large-scale automation functions, Industry 4.0 brings widespread machine-to-machine communication (M2M) to the shop floor. This creates the opportunity for more data gathering and analysis to increase productivity and improve efficiency.
While M2M has been accelerating in recent years, it is not new, having been a part of the digitalization of the factory stretching back decades. Modern wired and wireless M2M technology, such as Industrial Ethernet and Wi-Fi, are streamlined and efficient, but this long history means there are many legacy networks in place. Such networks use older technologies such as programmable logic controllers (PLCs), which transfer data over wired networks employing serial data technologies such as RS-232 and RS-485.
This presents factory managers with a dilemma. Retaining older communication systems means missing out on the productivity benefits brought by Industry 4.0, but upgrading the factory to bring in Industrial Ethernet is expensive and disruptive. Worse, many older machines are typically controlled by a generation of PLCs that are not compatible with newer Industrial Ethernet protocols such as Ethernet/IP and ModbusTCP. Yet those machines could have many years of useful life left. An industrial gateway can provide a cost-effective interim solution by bridging between legacy infrastructure and an Ethernet backbone as it is phased in.
This article briefly describes the benefits of an Industrial Ethernet network and modern industrial protocols for improving factory productivity and efficiency. It then addresses how an industrial gateway can provide a quick and easy solution for bridging legacy infrastructure and the Ethernet backbone. The article will introduce two industrial gateway examples from Weidmüller and describe how to use them to link a PLC running an RS-232/RS-485 serial data technology to an Ethernet/IP backbone.
A short history of industrial automation
The digitalization of factories really got started with the invention of the PLC in 1969. A PLC is a specialized type of computer that continuously runs a single program. A key advantage of a PLC is its virtually real-time and highly repeatable program execution. They are also relatively inexpensive, reliable, and robust. A good example is the Siemens SIPLUS unit which features an RS-485 serial interface (Figure 1).
Figure 1: PLCs are the mainstay of factory automation and are inexpensive, reliable, and robust. (Image source: Siemens)
In the early days of factory automation, manufacturers linked their PLCs to a central supervisory system using RS-232. This was a wired, serial data link with a maximum throughput of a few hundred kilobits per second (Kbits/s) at best. It used ground voltage to represent digital “0” and ±3 to 15 volts to represent digital “1”. Later, RS-422 and RS-485 took wired communications to a more advanced level using differential signaling over a twisted pair cable. The systems allowed one controller to supervise up to 32 PLCs and offered a data rate of up to 10 megabits per second (Mbits/s) over a distance of up to 1,200 meters (m).
It is important to note that RS-232 and RS-485 are standards that specify the physical layer (PHY); they do not specify the communication protocol. In the industrial automation sector, several protocols have been developed to run on the RS-232 or RS-485 PHY. Examples include Modbus Remote Terminal Unit (RTU), Modbus American Standard Code for Information Interchange (ASCII), DF1-Common Industrial Protocol (CIP), DF1-Programmable Controller Communication Commands (PCCC), Point-to-Point Interface protocol (PPI), DirectNET, Coprocessing Communication Module (CCM), and HostLink. The protocols have been developed and supported by many PLC makers.
PLCs proved to be a robust, reliable, and flexible way to bring automation to the shop floor, and RS-485 and its associated industrial protocols offered an inexpensive and simple-to-install network technology. Today, PLCs are typically used to control entire assembly lines, and most industrial automation uses some type of PLC. Many thousands of factory automation installations are based on venerable RS-232 and RS-485 networks.
Ethernet enters the factory
However, since the turn of the century, Ethernet has provided the most accessible and proven solution for a modern factory network. It is the most widely used wired networking option with extensive vendor support. Ethernet typically uses TCP/IP (part of the Internet Protocol (IP) suite) for routing and transport, ensuring cloud interoperability, a capability that is well beyond RS-232 and RS-485 technology.
“Industrial Ethernet” describes Ethernet systems adapted for factory use. Such systems are characterized by rugged hardware and industrial standard software. Industrial Ethernet is a proven and mature technology for factory automation that allows a remote supervisor to easily access drives, PLCs, and I/O devices on the manufacturing floor. The infrastructure typically uses line or ring topologies because these help to shorten cable runs (mitigating the impact of electromagnetic interference (EMI)), reduce latency, and build in a degree of redundancy.
Standard Ethernet’s communication mechanism is prone to disruption and lost packets, which increase latency and make it unsuitable for the near real-time demands of fast-moving and synchronized production lines. Such an environment requires a deterministic protocol to ensure machine instructions arrive on time, every time, no matter how high the network load.
To overcome this challenge, Industrial Ethernet hardware is complemented by customized software. There are several proven Industrial Ethernet protocols available, including Ethernet/IP, ModbusTCP, and PROFINET. Each is designed to ensure a high level of determinism for industrial automation applications.
Standard Ethernet comprises the PHY, data link, network, and transport layers (which use either TCP/IP or UDP/IP as the transport), and can be viewed as a communication mechanism that brings efficiency, speed, and versatility. In contrast, Industrial Ethernet protocols, for example, PROFINET, use the application layer of the Industrial Ethernet stack (Figure 2).
Figure 2: Shown is the Industrial Ethernet software stack. Industrial Ethernet protocols such as PROFINET operate in the application layer. (Image source: PROFINET)
For more, see “Design for Rugged IoT Applications Using Industrial Ethernet-Based Power and Data Networks”.
A Gateway to Industry 4.0
Updating legacy RS-232 and RS-485 factory automation systems to Industrial Ethernet is daunting for designers. There could be thousands of PLCs in a large factory and tens of kilometers of wiring. The cost and disruption caused by ripping out old systems for new replacements is not viable for many companies. Yet, without upgrading, a production facility will not be able to take advantage of the productivity gains promised by Industrial Ethernet.
One strategy to limit cost and disruption is to commit to an Industrial Ethernet backbone while retaining legacy serial buses, PLCs, and machines. Then, when machines are replaced or when new machines are added to the factory, they can be specified such that they’re interoperable with the Ethernet backbone. This allows the factory to be gradually updated to the latest communications standards without production interruptions or major cashflow issues.
However, such a strategy creates a discontinuity between the RS-232/RS-485 and Industrial Ethernet networks. This discontinuity can be bridged with an Industrial Gateway Communication Device such as the 7940124932 or the 7940124933 (Figure 3) from Weidmüller. Each gateway is a single solution providing a cost-effective way to move data between PLCs and peripheral devices, using different protocols and without having to add wiring or multiple gateways.
These Weidmüller gateways offer two Ethernet ports and either two (in the 7940124932 model) or four serial ports (7940124933). They support EtherNet/IP, EtherNet/IP-PCCC, ModbusTCP, and S7comm (a Siemens Industrial Ethernet protocol) at up to 10 Mbits/s. The Ethernet ports accept an 8 pin RJ45 connector. On the serial side, the gateways can handle Modbus RTU, Modbus ASCII, DF1-CIP, DF1-PCCC, PPI, DirectNET, CCM, and HostLink serial protocols. Note that while the serial support is for RS-232/RS-485 standards, the serial input to the gateway is via the Ethernet-style 8-pin RJ45 connector rather than the RS-232/RS-485 type. The gateways are interoperable with PLCs from Automation Direct, GE, Rockwell Automation, Schneider, and Siemens. The gateways can be DIN rail mounted, and they operate over a 0˚ to 55˚C temperature range using a 12-to-24-volt input.
Figure 3: The 7940124933 Industrial Gateway Communication Device bridges the gap between Industrial Ethernet and up to four RS-232/RS-485 serial networks. The 7940124932 version supports two serial ports. (Image source: Weidmüller)
Once configured via a browser, the Weidmüller gateways require no other equipment to transfer serial data formatted for one of the supported RS-232/RS-485 serial protocols into one of the supported Industrial Ethernet protocols, or vice versa. Data can be transferred to and from any port in any combination without the need to edit any PLC code.
Getting started with industrial gateways
Configuring the Weidmüller gateway simply requires connecting the device to an Ethernet switch and then plugging in a PC into the other side of the switch (Figure 4). Once that’s done, the gateway can be connected to the 12-to-24-volt supply. The PC can then be used to log in through a browser window where the main gateway dialog appears. Dialogs then simplify the setup of the Industrial Ethernet network, as well as the addition of Ethernet and serial network devices to the gateway. Finally, the gateway serial ports are set to match the serial port configuration of the connected controller.
Figure 4: The industrial gateway setup involves connecting the device to an Ethernet switch and a power supply, then connecting a PC to the switch and configuring the gateway via a browser. (Image source: Weidmüller)
The key to the gateway’s ability to communicate between devices that use different protocols is the use of “tag” data. The gateway enables the movement of tag data between different connected devices.
Tags are key when programming modern PLCs. They are names assigned to variables of any type stored in the PLC memory. Some examples of tag names are: “#DATETIME”, “HEARTBEAT”, and “Switch_Group1_IP”. The tags are stored in the PLC’s memory in a tag database.
In this tag database, all function blocks (for example, relays, timers, and counters) and program variables (for example, a timer value called “Transmitter_ RF_ Mute_Timer”), as well as all other objects, are stored as tagged variables with attributes such as initial value, float, string, integer, Boolean (on/off), ASCII text, discrete inputs, and discrete outputs. The tag approach allows for a more efficient approach to more complex programming but does require (as with other structured programming languages) that the developer assigns the variable tags as well as the data type in advance of their use in the program. Data arrays can also be defined in the tag database.
For each PLC connected to the gateway, the developer must specify the tags from which data will be read and the tags to which that data will then be written. This first requires the tags from each PLC connected to the gateway to be programmed into the gateway before it can use them for communication across the network.
This is done from the PC connected to the gateway via the Ethernet switch. By selecting the “Add Tag” icon in the configuration browser window, a dialog is activated that allows the developer to specify the tag name, data type, address, and other related information if required. It is also possible to speed things up by importing tags from a .csv file (Figure 5).
Figure 5: Dialog for programming the Weidmüller gateway with PLC tag properties. The tags are names assigned to variables of any type stored in the PLC memory. (Image source: Weidmüller)
Once the tags for all the connected devices have been entered, the next step is to create a “tag map.” The tag map enables the gateway to read the data in the registers of a source PLC and write them to the correct destination device. The data in the registers is effectively the communication payload. The payload is extracted from the source tag using the source PLC protocol, and then delivered to the gateway memory for transmission to the destination tag using the destination device protocol. It’s not critical that the source and destination tags have the same data type.
Creating the tag map is again performed from the PC connected to the Ethernet switch via the “Add Tag Map” icon, which initiates the Tag Map Editor dialog (Figure 6). Each PLC connected to the network will need its own tag map. In the dialog, the target device is selected, and each tag to be used as a data source is “mapped” to a data destination. The process is then repeated for all connected devices.
Figure 6: For each connected PLC, the Tag Map Editor enables each tag data source to be mapped to a data destination. The process is repeated for all connected devices. (Image source: Weidmüller)
The final step in the process is to activate the tag map to initiate communication between the source and destination tags hosted on the network devices. A tag map viewer on the PC allows for a check that the right source data is heading to the right destination.
Conclusion
Industry 4.0 enhances manufacturing productivity and efficiency. However, it requires new Industrial Ethernet infrastructure, which is expensive and disruptive to install. As shown, industrial gateways allow for a staged introduction of Industry 4.0 by bridging the gap between existing RS-232/RS-485 networks and the phasing in of Industrial Ethernet infrastructure. Using these solutions, equipment and networks can be gradually upgraded over months or years with minimal disruption.

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 DigiKey or official policies of DigiKey.