DigiKey-emag-PLCs-Vol-5

We get technical

Programmable Logic Controllers I Volume 5

Programming PLCs: A technical summary with Siemens examples Making use of IO-Link in industrial applications What is the Modbus protocol? EtherNet/IP versus PROFINET Five-Five-Five: The story of Interdesign Inc.

we get technical

1

Editor’s note

Programmable Logic Controllers (PLCs) have become indispensable in the world of industrial automation and control systems. Their robustness and versatility allow for complex operations to be managed with precision and reliability, catering extensively to the needs of engineers who require efficient and flexible control solutions. PLCs are essentially industrial digital computers that have been ruggedized to operate within harsh manufacturing environments. They are used to automate various processes by receiving inputs from devices such as sensors and switches, processing the data, and then outputting commands to machinery and other systems. This allows for precise control over manufacturing processes, leading to improved productivity and safety. One of the key strengths of PLCs is their programmability. Originally designed to replace hard-wired relay systems, PLCs can be reprogrammed without changing any physical wiring. Engineers use various programming languages, such as Ladder Logic, Functional Block Diagrams, and Structured Text, which are defined by the international standard IEC 61131-3. This versatility enables PLCs to be adapted quickly to different operations and makes them a valuable asset in industries that require frequent changes in manufacturing processes. As technology evolves, the integration of PLCs with the Internet, Cloud computing, and other modern industrial technologies such as the Internet of Things (IoT) enhances their capabilities. This integration allows for real-time data acquisition, analysis, and remote process management, further extending the functionality and application scope of PLCs in modern industrial environments. For engineers, understanding the capabilities and programming of PLCs is fundamental. Their ability to streamline complex processes and adapt to various industrial needs makes them a pivotal part of modern automation and control systems.

4 Address industrial automation

challenges with a new generation of PLC hardware

10 Programming PLCs: A technical summary with Siemens examples 14 Making use of IO-Link in industrial applications 20 What is the Modbus protocol? 24 EtherNet/IP versus PROFINET 30 Five-Five-Five: The story of Interdesign Inc. 36 How to connect legacy factory automation systems to Industry 4.0 without disruption 42 Supporting mass customization, high quality, and sustainable operations in Industry 4.0 factories 48 Vertical Farming: leveraging KUNBUS’ Revolution Pi for enhanced efficiency and productivity

For more information, please check out our website at www.digikey.com/automation.

we get technical

2

3

This article briefly discusses the challenge of deploying IIoT technology and explains how advances in open systems and factory automation hardware offer solutions. The article introduces an example implementation of next-generation PLC hardware and software from Phoenix Contact and shows how it simplifies gathering data and sending it to the Cloud for analysis and automated decision making. The importance of the PLC The mainstay of the factory is the PLC, a digital device invented in the late 1960s to replace earlier relay logic systems. PLCs are designed to work in difficult environments without fail for many years. The key to this reliability is a focus on

Automation founded on the Industrial Internet of Things (IIoT) promises faster time-to- market, improved productivity, greater safety, lower costs, and higher quality. That said, there are still obstacles. Legacy systems that are difficult to upgrade, overly conservative engineering departments, closed systems, and a lack of specialist knowledge are some of the problems that are holding back the Industry 4.0 revolution. While suitable standards- based technologies provide the backbone of the connected factory, many legacy, or ‘workhorse’, programmable logic controller (PLC) hardware and software have limited capabilities. This makes it challenging for engineers to quickly implement the factory- wide upgrades that are needed to take full advantage of the IIoT. Further complicating matters, engineers risk basing expensive factory upgrades on technology that could become outdated or unsupported as new technologies are introduced. Lessons can be learned from other parts of the IoT, such as the smart home, where open systems, collaborative platforms, and accessible software make it easier to implement future-proof intelligent solutions. Industrial automation manufacturers are embracing this experience and knowledge.

Address industrial automation challenges with a new generation of PLC hardware

Written by: Steven Keeping, Contributing Author, DigiKey

Figure 1: Rugged and reliable, PLCs are the backbone of factory automation. Image source: Phoenix Contact

we get technical

4

5

Address industrial automation challenges with a new generation of PLC hardware

PLC is bridged by gateways. (See, ‘How to Connect Legacy Factory Automation Systems to Industry 4.0 without Disruption’.)

From a software perspective, a product such as the Phoenix Contact 1069208 PLCnext controller represents a significant move toward the open solutions that are starting to dominate other areas of the IoT. For example, PLCnext is compatible with a wide range of software, so innovative factory automation apps can be easily downloaded from the Internet and installed on the PLC, like apps on a smartphone. PLCnext uses the Linux operating system (OS). It can still be programmed using the languages defined under IEC 61131-3, but Linux makes it easy for engineers to program the PLC using the higher-level languages C++, C#, Java, Python, and Simulink. These simple-to-use languages make modern factory automation accessible to a much wider cohort of engineers. In addition, PLCnext features task handling that enables program routines from different sources to run as legacy PLC code, with high-level language programs automatically becoming deterministic (Figure 3).

The next generation of PLCs

A factory that uses a mix of modern and legacy systems can make it difficult for engineers to leverage the full benefits promised by Industry 4.0. However, lessons from other parts of the IoT, such as the smart home and logistics sectors, reveal that open systems, collaborative platforms, and accessible standards-based software make it easier to implement future-proof intelligent solutions. The knowledge gained from these other sectors encourages manufacturers of PLCs and associated systems to introduce a new generation of products that operate like traditional PLCs without being constrained by the limitations of legacy hardware and software. An example of this new generation is Phoenix Contact’s PLCnext Control technology.

Connectivity is through Industrial Ethernet hardware; the control system runs under the IP- interoperable PROFINET protocol and uses the PROFICLOUD IoT platform for Cloud computing support. The PLC also supports other open-standard protocols such as http, https, FTP, SNTP, SNMP, SMTP, SQL, MySQL, and DCP. The hardware is based on an Intel Atom microprocessor running Figure 4: PLCnext PLCs use the Linux operating system and support legacy languages defined under IEC 61131-3, plus higher-level lang uages. Image source: Phoenix Contact

Figure 2: Industrial Ethernet forms the communication backbone of the modern factory. Image source: Phoenix Contact

simplicity. In the rare event that something does fail, PLCs are designed to troubleshoot and fix issues so that volume production can resume quickly. The units comprise an input module (receiving data from digital and analog input devices such as keyboards, switches, relays, and sensors), a power supply, a programmable CPU with associated memory, and an output module to send information to connected devices (Figure 1). Conventional PLCs are programmed using one of five languages defined by IEC 61131-3. These include Instruction List (IL),

Symbolic Flowchart (SFC), Ladder Diagram (LD), Function Block Diagram (FBD), and Structured Text (ST). The most popular is LD, or ladder logic, which uses symbols to represent functions like relays, shift registers, counters, timers, and math operations. The symbols are arranged according to the desired sequence of events. PLC makers are rapidly adapting to the progress in factory automation that has been made through the implementation of Industrial Ethernet. Industrial Ethernet is IP interoperable, is the most widely used wired networking option, and has extensive vendor support. Industrial Ethernet is characterized

by rugged hardware and industrial standard software, and it is a proven and mature technology for factory automation (Figure 2). The hardware is complemented by Industrial Ethernet protocols, including Ethernet/IP, Modbus TCP, and PROFINET. Each is designed to ensure a high level of determinism for industrial automation applications. (See ‘Design for Rugged IoT Applications Using Industrial Ethernet-Based Power and Data Networks’.) Many of today’s PLCs offer built-in Ethernet connectivity. For legacy devices featuring non-Ethernet interfaces, the divide between the Ethernet infrastructure and the

IEC 61131-3

Task 1

C/C++

IEC 61131-3

MATLAB

C/C++

Task 2

Figure 3: PLCnext features task handling that enables program routines from different sources to run as legacy PLC code. Image source: Phoenix Contact

we get technical

6

7

Address industrial automation challenges with a new generation of PLC hardware

Environments (IDEs) such as Eclipse or Microsoft Visual Studio. The software can then be imported into PLCnext Engineer as a library for use with any compatible PLC (Figure 5). A key advantage of PLCnext technology is that it allows several developers to work independently and in parallel on a single PLC program, even if they are using different programming languages. This enables fast development of complex applications and allows developers with legacy language skills and those with higher-level language skills to combine their talents.

The IIoT promises to transform the factory. However, while engineers are installing Industrial Ethernet, the full potential of factory automation is being held back by traditional PLCs that offer limited connectivity and dated software.

Improving decision making in the factory Optimization of factory production is essential because manufacturing demands precision and repeatability. The key to ensuring high levels of precision and repeatability is process control. In the modern factory, IIoT sensors and cameras can monitor machines and measure finished components to pick up any minor deviations in the product and correct the process accordingly. Other sensors keep track of the health of machines to predict maintenance requirements before a worn machine starts to fail. Even more sensors keep track of the factory’s temperature, humidity, and air quality. A key feature of PLCnext Control is that, unlike traditional PLCs, it can tap into this factory data. According to Phoenix Contact, it is sufficient to connect the PLC to just 3 to 5% of the system’s analog and digital inputs and outputs (I/Os) for it to be able to map the manufacturing

at 1.3 gigahertz (GHz). The PLC features 1 gigabyte (Gbyte) of flash memory and 2,048 megabytes (Mbytes) of RAM. The IEC 61131 runtime system has 12 Mbytes of program memory and 32 Mbytes of program data storage. The unit can support up to 63 local bus devices and requires a 24 volt supply with a maximum current draw of 504 milliamps (mA) (Figure 4). Phoenix Contact’s PLCnext range includes PLCs and other critical elements of an industrial automation system, such as communications modules and managed switches. Specific examples are the 2403115 communications module and

the 2702981 managed network address translation (NAT) switch. The communications module adds an extra gigabit-capable Industrial Ethernet interface to the PLC. The module has an independent MAC address, offers PROFINET support, and includes electrical isolation between the Ethernet interface and the logic. The managed switch is used for storing and forwarding Ethernet- transported information and features four Ethernet RJ45 ports, two small form-factor pluggable (SFP) ports, and two combination ports (RJ45/SFP). The switch is a PROFINET Conformance Class B product.

processes comprehensively and without significant intervention. PLCnext Control can then connect to any Cloud service, including Phoenix Contact’s Proficloud. io, Amazon’s AWS, or Microsoft’s Azure. As a result, the factory system gains access to powerful computing resources to ensure that the operations management and maintenance processes run as efficiently as possible. The result is higher productivity, better product quality, and lower costs.

To use the starter kit, the PLC and analog/digital module units must first be connected to the 24 volt DC (VDC) supply. Next, an Ethernet cable is connected between the PLC and PC and the PC’s IP address is set. Then, the IP address of the PLC is typed into a browser window on the PC. The PLC becomes operational after users log in with their username and password. Further instructions are supplied from the web-based management system. Programming of the PLC is done using the PLCnext Engineer software. The software allows an engineer to configure, diagnose, and visualize an entire automation solution. PLCnext Engineer enables programming and configuration using the legacy languages defined under IEC 61131-3. It is also simple to program in higher- level languages such as C++ and C#. In addition to PLCnext Engineer, code can be built in other popular Integrated Development

Conclusion

The IIoT promises to transform the factory. However, while engineers are installing Industrial Ethernet, the full potential of factory automation is being held back by traditional PLCs that offer limited connectivity and dated software. PLCnext technology from Phoenix Contact is based on open systems, collaborative platforms, and accessible software. It can combine routines coded in legacy languages with those written in higher-level languages to open industrial automation to future- proof solutions with enhanced productivity, higher yields, better product quality, and lower costs.

Getting started with PLCnext

Working with PLCnext controllers and related units is relatively straightforward. To assist in starting a PLC programming project, Phoenix Contact has introduced the 1188165 PLCnext Technology Starter Kit. The kit comprises a 2404267 PLCnext control module (PLC), a module carrier, and a choice of analog or digital modules.

Figure 5: PLCnext PLCs can be programmed using legacy languages from PLCnext Engineer, higher- level languages from IDEs, or from model-based design systems. Image source: Phoenix Contact

we get technical

8

9

error-free, editable, and universally applicable databases of symbol, variable, or tag names. These are human-readable alphanumeric names assigned to the addresses of components (including PLCs) and improving upon the direct use of complicated register addresses — which was once standard practice. Complementing these sortable and searchable device tags are informative machine and workcell tags as well as those for common machine functions such as Auto, Manual, MotorOn, Fault, or Reset. Consider Siemens STEP 7 Totally Integrated Automation (TIA Portal) software, which includes various use-specific packages and is accessible through the Siemens SIMATIC (Siemens Automatic) software-management environment. STEP 7 software is convenient for illustrating the most common approaches to PLC programming, as it’s the most widely used software in the world for industrial automation — with copious verification of functionality and reliability. By most estimates,

legacy SIMATIC STEP 7 software to support the programming of S7-1200, S7-1500, and S7-1500 controllers — as well as ET 200SP I/O CPUs and legacy S7-300 CPUs (an enduring industry staple) along with S7-400 and SIMATIC WinAC controllers. Professional-grade and specially licensed copies of STEP 7 include additional functions, logic editors, and integration of traditional engineering software. Though beyond the scope of this article, it’s worth noting that industrial control alternatives to multi-function PLCs are configurable and programmable through complementary software. The vast ecosystem of Siemens controls provides copious examples.

1. LOGO! logic modules satisfy small and modest automation applications to bridge the gap between relays and microprocessor-based industrial controllers. They’re programmed via Siemens LOGO! software with Soft Comfort engineering software, a LOGO! Access Tool, and a LOGO! Web Editor for simple configuration and design operation 2. Process control systems employ Siemens SIMATIC PCS 7 controller products

Programming PLCs: A technical summary with Siemens examples

and complementary power supply modules, application-specific function modules, and digital as well as analog I/O modules. Of course, PLCs aren’t the only option for automation control. Relay-based systems maintain their indispensability in a vast array of applications, and programmable automation controllers (PACs) or industrial PCs (IPCs), as well as panel PCs (HMIs with control electronics), are other alternatives for many machine designs and systems needing varying degrees of distributed control. PACs and IPCs running industrial-grade Microsoft Windows OSs especially offer top design flexibility. Each of these control systems is configured and programmed with software of diverse sophistication to render all types of control design more advanced and user- friendly than ever. This in turn allows OEM machine builders and plant engineers to quickly institute system builds, upgrades, and migrations with maximal efficiency, productivity, and IIoT connectivity.

The tools to program controls — including PLCs Nearly all PLCs today are configured and programmed through PC-based software. Large vendors with broad programmable motion control, sensing, actuation, and machine-interface component offerings (in addition to general automation and PLC products) typically allow programming of all these components in their own proprietary unified programming environments — PC-based Windows-compatible software with design, configuration, programming, and even operating and management modules. That’s especially true where vendor lineups include pre-integrated offerings — such as smart motors or HMIs having PLC functionality, for example. While potentially daunting to learn, unified programming environments (once mastered) dramatically speed machine design. One benefit of such software environments is how they provide

Written by: Lisa Eitel, Contributing Author, DigiKey

programmable through SIMATIC PCS 7 system software

3. Rack (rail), panel, and box industrial PC (IPC) products

Programmable logic controllers (PLCs) are ruggedized microprocessor-based electronics essential to all modern automation, including: ■ The process-heavy industries of oil and gas, nuclear, steelmaking, and wastewater treatment ■ Industries with an emphasis on control of discrete tasks — including general factory automation, automated warehousing, packaging, food and beverage, and medical- device manufacture In these installations, PLCs are traditionally found on DIN-rail mounted or control-cabinet rack systems with slots to accept PLC modules (having CPUs to run logic and dispatch commands)

Siemens PLCs are employed in nearly one-third of all PLC installations worldwide.

With this software, engineers can create process control, discrete automation, energy management, HMI visualization, or simulation and digital-twin programming related to the functions of PLCs and other industrial controllers. For PLCs, Siemens’ STEP 7 (TIA Portal) engineering software evolved from

Figure 1: PLCs offer all the strengths of purpose-built hardware — including reliability. In contrast, PACs offer top flexibility. Some suppliers allow engineers to program both control types in the same unified software environment. Image source: Siemens

we get technical

10

11

Programming PLCs: A technical summary with Siemens examples

for distributed controls and machines needing IIoT connectivity rely on Siemens SIMATIC IPC software modules, including an IPC Image and Partition Creator; IPC DiagMonitor; IPC Remote Manager; IPC FirmwareManager; and the SIMATIC Industrial OS

■ The level of motion control required (where applicable) — from simple speed and position control to electronic camming and advanced kinematic controls ■ The hardware preference and whether a software PLC program running on an IPC might be most suitable PLC program projects ■ PLC programming written in PLC supplier software is often contained in projects. These are associated with focused application-specific operations such as: ■ Heating, mixing, filling, metering, and irrigating ■ Moving, steering, cycling, positioning, and braking ■ Gripping, cutting, punching, and slicing ■ Welding, gluing, marking, and dispensing ■ Sensing, tracking, sequencing, and indicating

forcing. This ‘tricks’ the PLC into operating as if certain feedback is at some value when it isn’t — a tactic employed when the stations downstream of a malfunctioning actuator must be cleared, for example. Other times, a machine or workcell might require in-field adjustment of an installed PLC’s parameters via modifying. Such adjustments must reference suitable triggers, variable values or tables, counters, and timers.

Simulation tools within PLC supplier software environments also can speed time to market for a given product — and boost throughput of finished product. Completing the suite of software- based improvements are energy- management functions and diagnostics. Verifying and loading PLCs with programs written in software Core to optimal PLC functionality is the quality of its programming. All code should satisfy software- development industry standards and best practices. Beyond that, verification processes (both manual and automated) can reveal everything from critical errors to code inefficiencies. Reconsider the programming of SIMATIC S7 products. Within the Siemens ecosystem, a TIA Portal Project Check application can automatically compare certain code against rules defined by a programming style guide for these specific PLCs. Then engineers can export comparison results to an XML or Excel file. User-defined rule sets (even complex types) can also be added via a Project Check software development kit (or SDK) in C# or Visual Basic (.NET). This SDK primarily proofs a program’s style. After a project destined for a PLC is fully written and verified, it must

Figure 2: Siemens SIMATIC PLC and automation systems were first introduced in the 1950s. Today, SIMATIC S7 products (including the SIMATIC S7-1500 PLC components shown here) have evolved to support various industrial automation applications. Image source: Siemens

4. 4. HMIs serving as panel

PCs for on-machine controls employ SIMATIC WinCC Unified (TIA Portal) software as well as SIMATIC WinCC (TIA Portal), WinCC flexible,

Conclusion

be loaded onto that PLC. In many cases, a PC (often a laptop) is temporarily connected to the PLC via an Ethernet cable or a specialty PC USB to PLC COMM adapter — to load that programming onto PLC microelectronics. The PLC then connects to controlled components via I/O modules. After additional verification upon startup, the PLC executes its programs by commanding networked actuators

(via various signal types) and making real-time adjustments in response to returned feedback from field devices. Occasionally, a machine or automated workcell will require adjustment, troubleshooting, or repair — and (through some type of programming PC connection to the PLC) the overriding of PLC default responses to feedback with

Working with the vast array of Siemens automation and industrial- controls offerings can provide design engineers with a deeper understanding of today’s control options — including PLCs and other hardware types. That’s true no matter the brand or hardware subtype ultimately chosen for an automated installation.

WinCC V7, WinCC OA, ProAgent process diagnostics software, notification software for mobile devices, and more Choosing between SIMATIC PLCs and other machine controls is simplified with still more software — in the form of an online Cloud-based Selection Tool (or the offline variation ) that asks engineers about a given design’s physical arrangement (whether necessitating a control cabinet or distributed control) and: ■ The number of anticipated I/Os including sensors, switches, and actuators ■ The programming language to be used, whether ladder diagram (LD), structured control language (SCL), or Function Block Diagram (FBD); more advanced structured text (ST), graph-based sequential function chart (SFC), and continuous function chart (CFC); or more advanced languages

Programming Aspect

Goal

Quality

Realization • Tool

The most advanced options support digital planning and

Style

Comprehensibility

Empirical

Code review • Style check

integrated engineering as well as transparent operation that’s easily accessible through HMIs with user- specific screens one in operation. In other words, such PLC software can allow for the presentation of pertinent PLC information on different displays to serve the divergent informational needs of machine operators, technicians, plant managers, or even business managers.

Technique

Conformity

Pragmatic

Static code analysis • Lint

Dynamic code analysis • Profiling

Technique

Efficiency

Pragmatic

Function test • Unit/ integration test

Test cases

Functionality

Syntactic

Formal verification • Model check

Mathematical model

Correctness • completeness Semantic

Table 1: Verification of PLC programming can leverage manual and automated approaches — with the latter especially useful for verifying style and technique. Chart source: Siemens

we get technical

12

13

With the advent of the fourth industrial revolution and Industry 4.0, comprehensive and intelligent automation came to be defined by advanced controls, monitoring, and diagnostics. Such capabilities are only possible through industrial connectivity — through which controls and machine devices are unified on some platform (such as IO-Link) for continual data exchange.

The key enabling technologies underpinning industrial connectivity are standardized networks and devices with onboard communications features. Protocols abound for these functions. However, not all industrial protocols satisfy the data-exchange and intelligence requirements required by today’s automation. IO-Link was created to satisfy a wide array of these modern applications. As covered in a previous digikey. com article, IO-Link is a wired point-to-point communication

protocol that facilitates smart bidirectional data communication between devices. Typically, IO-Link primaries (local controllers) have several IO-Link ports (channels) into which various IO-Link devices independently plug. These node- to-node endpoint connections are what render IO-Link a point-to-point communication protocol. Launched in 2009 by a consortium of 41 members that is now hundreds of members strong, IO-Link is has become a widely accepted communication protocol to harness data crucial for:

Making use of IO-Link in industrial applications

Written by: Etiido Uko, Mechanical Engineer & Technical Writer + Lisa Eitel, Contributing Editor, DigiKey

Figure 1: IO-Link complements existing network protocols by easily integrating into fieldbus or Ethernet networks via the IO-Link primary. The connection between an IO- Link primary and its IO-Link devices is through unshielded and unscreened three or five-wire cable also capable of supplying power to the IO-Link devices. Here, power from the primary is 24-Vdc. Image source: Pepperl+Fuchs

we get technical

14

15

Making use of IO-Link in industrial applications

Figure 2: The type of connector used with the connecting cable depends on the type of port. IO-Link class-A primary ports accept M8 or M12 (like the AL1120 from ifm efector shown here) connectors with up to four pins, while class-B counterparts accept connections with devices having five-pin M12 connectors (for bidirectional data communication). Image source: ifm Efector

■ Optimizing operations ■ Reducing downtime and streamlining maintenance ■ Trimming raw material costs and making strategic operational decisions. The harmonized IO-Link interface is defined by the IEC 61131- 9 standard and supported by Siemens, Omron Corp., ifm Efector, Balluff, Cinch Connectivity, Banner Engineering, Rockwell Automation, SICK, Pepperl+Fuchs, and dozens of other component and system manufacturers. No wonder IO-Link connectivity is widely leveraged in operations involving assembly automation, machine tools, and intralogistics. Its three main uses in these and other industrial settings include status communications, machine control, and rendering devices intelligent. IO-Link controller modes correlate to uses Recall from previous digikey. com articles that the IO-Link communication protocol renders each connector port on an IO-Link high-level primary (controller) capable of four communication modes. These include a fully deactivated mode as well as IO- Link, digital input (DI), and digital output (DQ) operating modes. The modes loosely correlate to the three main IO-Link uses listed above. The IO-Link operating mode supports bidirectional data

diagnostics and monitoring data from the sensor is requested by the primary.

IO-Link application 1 of 3: actionable status communications Machine monitoring is possible with IO-Link devices set up to report status that can, in turn, inform the system of necessary adjustments and corrections. Consider one use in the machine- tool industry — that of IO-Link pressure sensors which verify workpieces are clamped with a pressure appropriate for damage- free yet secure holding during material-removal operations. Here, IO-Link sensors essentially support the optimization of machine tasks for fewer rejected workpieces. IO-Link devices can also make actionable status communications to support enhanced maintenance routines for minimized downtime. For example, IO-Link position sensors on an assembly machine might continually report the locations of end effectors to ensure none are out of range or alignment.

communications with field devices and is typically used during data collection for monitoring, testing, and diagnostics. A primary’s port in DI mode accepts digital inputs and works when the port is connected to sensors — in this context, acting as input devices. In contrast, a port in DQ mode acts as a digital output, typically when the port is connected to an actuator (in this context, effectively an output device) or when a system PLC is set up to directly send instructions to another IO-Link device. Though beyond the scope of this article, it’s worth noting that the ports on an IO-Link primary can readily switch between modes. For example, a primary’s port connected to a sensor can run in DI mode — and then switch to IO- Link communication mode when

fieldbus or Ethernet ports for such connections. Devices in advanced control applications involving IO-Link systems integrate in one of three ways: ■ They directly connect to the host computer or PLC ■ They connect to an IO-Link primary and communicate via the IO-Link protocol ■ They use IO-Link compatible communications and connect to an IO-Link primary via an IO-Link hub The latter essentially acts as an intermediary to connect non-IO- Link devices to the primary.

Figure 3: IO-Link facilitates the creation of highly advanced control and automation systems. The machine-tool industry makes copious use of IO-Link sensors to verify appropriate workpiece clamping and milling end-tool pressures and positions. Image source: Getty Images

provided by IO-Link devices, a plant’s machine technicians can predict and correct errors and potential breakdowns before they happen. Technicians can also identify weak links in a machine or plant — to inform enterprise-level operational changes, purchasing decisions, and captive machine designs in the future.

application functions supported by IO-Link. Where an IO-Link installation supports functions that run sans intervention of personnel, the IO-Link primary often connects to a host system or higher-level PLC that processes received data and then directly or indirectly commands actuators in the design to the appropriate coordinated responses. Such automated control requires that the IO-Link system connect to a higher-level controller via standardized fieldbus or Ethernet protocols and cabling. In fact, most IO-Link primaries have

IO-Link application 2 of 3: advanced control and automation

An added benefit of IO-Link

Control and automation are other

By analyzing diagnostics data

we get technical

16

17

Making use of IO-Link in industrial applications

with field devices such as cameras, which can generate many MB of data per minute.

Input devices such as pushbutton switches from RAFI can leverage IO-Link functions to support smart-device features — including color-coded indicator lights.

Conclusion Uses for IO-Link systems abound to complement existing protocols underpinning virtually limitless controls and data-collection systems. Spurring adoption has been the simplicity of IO-Link systems — comprising only an IO-Link primary and its devices and their connectorized three or five-wire cables. Plug-and-play installation and cost-effectiveness are other IO-Link benefits. Efforts by the IO-Link consortium of member companies have ensured wide compatibility between controllers, devices, and actuators from various manufacturers, which has given design engineers the widest selection of equipment for their specific use cases.

sensors that go beyond reporting high or low temperature status by continually reporting the exact temperature value of a monitored zone or volume. Another benefit of IO-Link for smart field devices is the way in which its physical connections are compact. That’s in contrast with the physical connections of fieldbus and Ethernet interfaces, which can sometimes be too big to fit on field microdevices. IO-Link smart components can also be precisely controlled. For example, instead of basic off- and-on controls, an actuator can be commanded to turn off once a scenario satisfies a set of

conditions.

Input devices such as pushbutton switches from RAFI can leverage IO-Link functions to support smart- device features — including color- coded indicator lights. There are some caveats to the use of IO-Link for smart-device applications. Though there is a wireless form of IO-Link under development, it’s still a wired communication protocol — so it is still subject to all the limitations of hard wiring. To maintain data integrity, IO-Link primary-to-device cabling mustn’t exceed 20m. Plus, because the IO-Link protocol can only transmit up to 32 bytes of data per cycle, it’s insufficient for use

Figure 4: An IO-Link system involved in advanced controls includes an IO-Link primary (controller), like the Omron NX-ILM400 shown here, and various IO-Link-enabled sensors, power supplies, and mechatronic devices connected to that primary. IO-Link systems for such applications typically yoke the IO-Link primary and devices to a PLC or other automation system. Image source: Omron

systems having fieldbus and Ethernet-communications

connectivity is that long-distance connections are allowable — which in turn lets installers locate IO-Link primaries in a control cabinet or at the outermost machine reaches if that makes the most sense for a given application. Consider how IO-Link primaries benefit advanced assembly applications by serving as low-level controllers capable of processing both digital and analog signals. Here, primaries might: ■ Accept the data generated by IO- Link linear encoders on the axes of an XY stage ■ Process that data as a gateway ■ Submit that processed IO-Link field-device data to the PLC or other system controller

IO-Link application 3 of 3: device intelligence The third application of IO-Link is to render devices smart. Especially common in sensor designs that resemble legacy sensor options with no (or more modest) programming, these IO-Link-enabled devices can receive instructions, monitor, and execute self-testing routines — and generate data. Because IO-Link also lets devices provide more than basic two-value (yes-no or pass-fail) data, the reporting of precise values is also possible. For example, process-automation tasks benefit from IO-Link temperature

Figure 5: The IO-Link connection interface is very small and can fit on most compact field devices. Shown here is a Balluff BUS004Z proximity sensor with IO-Link connectivity. Image source: Balluff

we get technical

18

19

What is the Modbus protocol?

Similar to CAN, Modbus is an older yet widely used industrial communication protocol allowing data exchange between devices in a network. Read on to learn more about the protocol, its functionality, and how you can apply Modbus to your day-to-day projects.

Figure 1: shows the general composition of request frames in Modbus RTU.

Written by: DigiKey Maker.io staff

uses the server’s internal register addresses to retrieve data from a device. Modbus is commonly used to transmit signals from instrumentation and control devices to a centralized controller. One example of this configuration could involve a system consisting of sensors measuring the temperature and vibrations of an electric motor in a factory crane. The collected data is then submitted to a computer for anomaly detection and to trigger safety measures when necessary. For such purposes, several

versions of the Modbus standard exist to support common physical communication standards, such as RS-232, RS-485, and Ethernet. Modbus object types and function codes The server devices store information and the client can either request register values or write values to registers. However, as Modbus is an older standard originally intended for use with industrial PLCs (Programmable Logic Controllers), the data tables defined by the protocol reflect this

A high-level view on the Modbus protocol Modbus is a serial communication protocol that primarily focuses on describing the message format, encoding, and addressing on a high level without dictating the underlying implementation on the physical layer. Each network comprises precisely one Modbus client and can accommodate anywhere from one to 247 Modbus servers. Each device on the bus has a unique address.

In Modbus RTU (Remote Terminal

Unit), the client is the only device capable of actively requesting data on the network. Conversely, the servers can supply data via their internal registers when instructed by the server. Each server has a unique address in the network, and the client

Figure 2: shows the general composition of some example responses in Modbus RTU.

we get technical

20

21

What is the Modbus protocol?

original design decision.

article focused on Modbus RTU on RS-232. In Modbus RTU, the client is the only device that requests data on the network. Servers can supply data via their internal registers. Each server has a unique address in the network, and the client uses the server’s internal register addresses to read data. Modbus RTU data frames generally consist of an eight-bit address field, an eight-bit function code, several bytes of data, and a 16-bit CRC field for error correction. Normal response frames copy the address and function code values from the response and supply the answer via the data field, which typically varies in length. Response frames also end with a CRC field. In addition to normal responses, clients can send an error frame that replaces the function code with the hexadecimal value 0x80. The error frame’s data field can contain an error code to describe what went wrong.

Modbus RTU frames

Similar to CAN, Modbus is an older yet widely used industrial communication protocol allowing data exchange between devices in a network. Read on to learn more about the protocol, its functionality, and how you can apply Modbus to your day-to-day projects.

The binary coil object type represents discrete outputs and is typically used for controlling devices. Discrete inputs are the counterpart to the coils. These binary variables represent the state of binary inputs. Input registers are 16-bit read-only registers that hold analog data such as temperature readings or other sensor values. Furthermore, holding registers are 16-bit registers that the client can read from and write to, used for transmitting general data. Finally, function codes enable the server to know what operation a client wants to perform. In Modbus RTU, function code 01 represents a read from multiple coils operation, 05 corresponds to writing a value to a single coil, 02 initiates a read from a discrete input, 04 lets the client read an input register, and function codes 03 and 06 let a client read and write holding register values.

Each request frame in Modbus RTU begins with 28 bits of silence to begin the transmission. Next, the server sends the eight-bit address of the client it wants to communicate with, followed by the eight-bit function code. Following is the data field, whose field length, contents, and meaning depend on the function code. The frame concludes with a 16-bit CRC error- correcting code followed by the end condition, which consists of 28 bits of silence on the data line. While all frames adhere to the same overall structure, the data field varies widely depending on the specific operation being performed and the quantity of coils or registers involved to read or write. Figure 1 shows a few examples of requests in Modbus RTU.

the response, and the subsequent bytes contain the requested values. However, when writing a value, the first two bytes contain the address of the modified coil, and the last two bytes in the data block contain the newly written value that must match the one found in the request. Aside from the normal response, the server can also reply with an error frame. In the normal frame, the response always repeats the function code in the request. In an error frame, the server replies with a function code of 0x80, and the response only contains a single

data byte describing the error:

field typically follows the same structure, where the first two bytes define the starting address and the next two contain either a value to write or the number of registers/ coils to read. The figure 2 shows examples of responses to these requests. Note how the address and function code remain equal in the request and matching response. Read- request responses commonly adhere to a similar structure as well, where the first data byte denotes the number of bytes in

Figure 3 shows the general composition of a Modbus RTU error frame with some common exception codes. Summary Modbus is a relatively old industrial communication standard that describes the composition and structure of messages and data types without restricting the underlying physical implementation. Common standard options for implementing Modbus include RS-232 and Ethernet. This

Across the requests, the data

Figure 3: shows the general composition of a Modbus RTU error frame with some common exception codes.

we get technical

22

23

EtherNet/IP employs: ■ The application layer just mentioned ■ An Internet Protocol networking layer ■ The standard Ethernet link layer Note that the IP in EtherNet/IP is short for industrial protocol and refers to network protocols originally developed to allow communication over serial connections such as RS-232 and RS-485 — both standards for industrial data transmission. Many such connections now operate over Ethernet using protocols such as TCP/IP, so common for Internet communications. EtherNet/ IP communications and its very standardized hardware (including hubs, switches, routers, Ethernet cables, and Ethernet network cards) is defined by the IEEE 802.3

Transmission Control Protocol and the Internet Protocol. Developed in 2009, EtherNet/IP arose from collaboration between the Open DeviceNet Vendors Association (ODVA) and ControlNet International (CI) under the auspices of ODVA and its members. ODVA itself was founded in 1995 as a consortium of automation companies (including Rockwell Automation, Cisco, Schneider Electric, Omron, and Bosch Rexroth) to advance open and interoperable communications for industrial automation. According to ODVA, EtherNet/IP leads industrial- Ethernet adoption — representing 25% share of market in 2017 and 28% in 2018 with the most nodes of industrial Ethernet networks shipped.

Adoption of industrial Ethernet continues to outpace other options as companies become digitally connected. That’s especially true where Internet of Things (IoT) functionality is employed in automation and industrial control systems to boost data accessibility and usability. EtherNet/IP and PROFINET are the top options here. Structure of EtherNet/IP and expanding EtherNet/IP applicability EtherNet/IP is an industrial network protocol that employs the Common Industrial Protocol (CIP) to standard Ethernet. It works on a network application layer — which (in the two conceptual models of networks) is at the ‘topmost’ device and user-facing layer to allow communication between controls and input- output (I/O) devices. More specifically, EtherNet/IP is the top layer of the Open Systems Interconnection (OSI) and transmission control protocol/ internet protocol (TCP/IP) models.

Written by: Bill Schweber, Contributing Author at DigiKey

EtherNet/IP versus PROFINET

Figure 1: The two most common models used to describe networks are the OSI model and the TCP/ IP model. Image source: Design World

Written by: Lisa Eitel, Contributing Editor, DigiKey

we get technical

24

25

EtherNet/IP versus PROFINET

PROFINET and PROFIBUS communications are deterministic, which allows support of automation systems with precise I/O structure limits and their defined I/O structures allow precise calculation of maximum update times. PROFINET can also provide isochronous real- time (IRT) data exchange. IRT essentially leverages the ultra- precise time clock of PROFINET to prioritize the passage of some types of data traffic and buffer the rest. IRT excels in demanding applications such as motion control and other applications that need more deterministic operation than real-time operation. In a real-time data exchange, bus cycle times are less than 10 msec. In contrast, IRT data exchanges occur within a few dozen μsec to a few msec. For example, PROFINET in a packaging and labeling operation can support data transmission to ensure bottles are filled to a precise level in less than a second — to within just an msec or so. PROFINET can also detect, quantify, and alert operators of any anomalies in the bottling process and immediately shutdown processes as well. Side note on PROFINET hardware Standard Ethernet is only suitable for data transmission in home, office, and select industrial-monitoring settings. In

contrast, the industrial Ethernet of PROFINET is suitable for installation in harsh industrial facilities requiring deterministic data communications. PROFINET cables and connectors differ from those employed in standard Ethernet — and includes connectors with heavier lock mechanisms and ruggedized industry cables. PROFINET routers (whether integrated into other hardware or built as standalone elements) function on network layer three (from the network models mentioned earlier) and communicate using IP addresses. These routers connect local area networks (LANs) and form wide area networks (WANs) while employing algorithms to determine the best data-transmission routes between networks. Some PROFINET switches also employ fiber-optic connections. These ultra-fast components integrate PROFINET-capable devices into Ethernet networks (or PROFIBUS) via gateway elements for copper- to-fiber-optic conversions. PROFINET managed and unmanaged switches PROFINET switches work on the second data layer of the conceptual network model covered earlier. They function to control the receipt and transmission of data signals through the network. Unmanaged PROFINET switches send incoming Ethernet data through the proper ports connected

Data transmission via EtherNet/IP

PROFINET for deterministic communications PROFINET is another technical standard that defines a mode of data communication via industrial Ethernet. PROFINET modifications to standard Ethernet ensure proper and prompt data transmission even in challenging applications. Its definitions dictate a means of data collection from industrial equipment and systems to satisfy specific and often tight time constraints. PROFINET arose from PROFIBUS — a standard for fieldbus communication to support automation. While PROFIBUS is a classical serial fieldbus based on industrial Ethernet, PROFINET goes further with additional capabilities to allow faster and flexible communications to control automation components. In fact, PROFINET had 30% of the industrial-network market share as of 2018, making it the world’s leading Ethernet-based communication solution for industrial automation. More than five million PROFINET-ready devices come to market every year.

Figure 2: Because EtherNet/IP works on the application layer, it allows communications between industrial controllers and I/Os. NT24k switch image source: Red Lion

TCP and the user datagram protocol (UDP) are the underlying communication protocols of the Internet and many private networks as well. EtherNet/IP employs a TCP port for what is called explicit messaging. Such messaging is when the system sends data to a client in response to a specific request for that data. It uses TCP/IP — a connection-oriented protocol that explicitly manages links between clients and servers. Core to TCP/IP networking, TCP helps fragment data packets so that data messages reach their destination. Note that IP deals only with packets; TCP lets two hosts establish connection and exchange data streams. TCP guarantees delivery of data as well as that packets will be delivered in the order in which they were sent. EtherNet/IP employs a UDP port for implicit messaging — system communications sent from preset memory locations to a controller or other client at some prescheduled interval. Such communications are far faster than explicit messaging, and the one-way data transmission of UDP connections (sans validating receipts) simplifies cyclical system updates.

At present, EtherNet/IP is one of four ODVA networks that have adopted CIP for industrial networks. The others are DeviceNet, ControlNet, and CompoNet. CIP is a conduit of organizing and sharing data in industrial devices. More specifically, it uses different types of messages and services to exchange data in industrial automation applications that include process and system control, safety, synchronization, motion, configuration, and information. CIP lets these applications integrate with enterprise-level Ethernet networks and the Internet. It is a unified communication network used for manufacturing and industrial applications and widely adopted by vendors around the world. For industrial protocols, data is ordered as objects with data elements or attributes. These data objects typically sort into required objects and application objects. The former are found in every CIP.

EtherNet/IP is rather easy to implement, and it’s compatible with standard Ethernet switches for industrial automation. However, the basic form of EtherNet/IP is non-deterministic and therefore unsuitable for strict real-time industrial applications. CIP Motion can complement EtherNet/IP to help the latter satisfy demanding requirements for deterministic real- time control (including closed-loop motion control) with unmodified Ethernet in full compliance with IEEE 802.3 and TCP/IP Ethernet standards. EtherNet/IP complemented with CIP Motion technology delivers multi-axis distributed motion control. It is scalable and offers a common application interface for motion designs.

Figure 4: EtherNet/IP is most common in the United States. PROFINET is widely used in Europe. Image source: PI North America

Figure 3: EtherNet/IP and PROFINET are leading industrial Ethernet protocols. Both are supported by the ODVA. Image source: ODVA Inc.

we get technical

26

27

Page 1 Page 2-3 Page 4-5 Page 6-7 Page 8-9 Page 10-11 Page 12-13 Page 14-15 Page 16-17 Page 18-19 Page 20-21 Page 22-23 Page 24-25 Page 26-27 Page 28-29 Page 30-31 Page 32-33 Page 34-35 Page 36-37 Page 38-39 Page 40-41 Page 42-43 Page 44-45 Page 46-47 Page 48-49 Page 50-51 Page 52-53 Page 54-55 Page 56

Powered by