PLC: The forerunner to Industry 4.0 and the internet of things

December 18th, 2014, Published in Articles: EngineerIT

 

Industry 4.0 and the internet of things (IoT) are concepts which require a high degree of networking and communication between devices and services. Large data quantities have to be exchanged, from the sensor to the IT level. The corresponding protocols and standards of PC-based control make it ideally suited for this task. Another fundamental factor contributing to the feasibility of IoT and Industry 4.0 is the service-oriented architecture (SOA) PLC. PLC access via web service is not new – so what is SOA and what exactly is new in the “SOA-PLC”? And what added value does it offer?

Fig. 1: In the future, the hierarchy of the conventional ‚automation pyramid‘ will change to a network of automation services through the integration of OPC UA at all levels. Devices and IT Automation MES/ ERP Shop Floor services will “talk” directly with each other by calling up SOA services.

Fig. 1: In the future, the hierarchy of the conventional “automation pyramid‘ will change to a network of automation services through the integration of OPC UA at all levels. Devices and IT automation MES/ERP shopfloor services will “talk” directly with each other by calling up SOA services.

Industry 4.0 concepts enabling fast, dynamic production require suitable networking and communication between devices and services. They must be able to communicate directly with each other. Sensors, measuring devices, RFID chips, PLC controllers, HMI, MES and ERP systems all provide important production data for enterprises. In conventional control architectures, data requests are event-driven or initiated cyclically, and are always in response to requests “from above”, i.e. from the client level. The lower level always acts as a server and responds; a visualisation, for example, can request status data from the PLC or transfer new production recipes to the PLC. The first step is the conversion of electrical sensor signals into digital information. This is followed by the allocation of a timestamp within the PLC and transmission of the information to the MES-IT level via further services (Fig. 1).

With Industry 4.0, this strict separation of the levels and the top-down approach of the information flow will start to soften and mix. In an intelligent network, each device or service can autonomously initiate communication with other services.

B2B – B2M – M2M

Fig. 2: In the communication contexts “IT” and “automation” three potential communication transitions can be distinguished, irrespectively of “hard” and “soft” real-time requirements: “B2B”, “B2M” and “M2M”.

Fig. 2: In the communication contexts “IT” and “automation” three potential communication transitions can be distinguished, irrespectively of “hard” and “soft” real-time requirements: “B2B”, “B2M” and “M2M”.

Generally, all communication scenarios and use cases that are defined in Industry 4.0 and IoT groups can be distinguished from an abstracted perspec – tive into two contexts of the communication architecture: on the one hand, services in “hard real-time” (i.e. the automation context, e.g. the deterministic PLC for control purposes), on the other hand, services in a “soft real-time” context, e.g. in an IT context (Fig. 2).

This results in precisely three potential communication transitions, as defined by the Industry 4.0 WG2 executive committee:

  • B2B communication: Two business processes communicate with each other. Example: An ERP application exchanges information with an MES application. The exchange, e.g. between HMI and MES, MES and MES, or sensor and cloud, can take anywhere from a few milliseconds to several minutes.
  • B2M communication: A “soft real-time” process communicates with a “hard real-time” process. Example: A business application exchanges information with a machine. The time necessary for the exchange, e.g. of live data between HMI and PLC, or MES and PLC controller, can vary from a few milliseconds to several minutes.
  • M2M communication: Two processes communicate in the automation context with one another either in “hard” or “soft” real-time. Example: A robot platform controller exchanges control information horizontally with a handheld robot controller. The exchange must take place in a hard, deterministic real-time cycle ranging from μs to a few ms. Another example: Two controllers exchange data horizontally – fast (in “soft” real-time), cyclically, and fieldbus-independently.

Here, determinism can be seen as a quality of service (QoS) with certain requirements that a communication process might meet or not meet; these requirements would be defined by a guaranteed duration, e.g. a response time of 100 μs.

The term M2M is already used in mobile radio communication, where M2M refers to the interfacing of devices via mobile communication with IT processes. In this context, the view is widespread that M2M is present whenever a SIM card is used.

Whatever terms will eventually define the three categories, the fact is that in IoT and Industry 4.0, communication will no longer be based on pure data and the interoperability of the data communication. It will focus on the exchange of information models and, therefore, semantic interoperability. An important factor will be transmission integrity and security of the access rights to individual data or services. All these requirements are key aspects of the OPC unified architecture (OPC UA). It contains a description language and the communication services for information models. As an IEC 62541 standard, OPC UA is designed to map the information models of other organisations such as BACnet, PLCopen, IEC 61850, AIM AutoID, and MES-DACH, among others. According to the German Federal Office for Information Security, BSI (Bundesamt für Sicherheit in der Informationstechnik), the “security by design” integrated into OPC UA is significantly better than in other protocols, and is therefore being evaluated in a current project, due to the high relevance for Industry 4.0.

Thanks to the standardized consolidation of data as well as their structure and purpose (metadata), OPC UA is particularly suitable for distributed, intelligent applications between machines, without the need for higher-level intelligence or central knowledge. The functionality of OPC UA components is scalable and is already available at the sensor level (e.g. wind turbine manufacturer Areva’s current sensor memory usage, starting at 240 kB flash and 35 kB RAM) right up to SAP systems.

PLCopen: OPC UA client functionality in the PLC

For the “initiate communication” task, the PLC controllers must have a client component – ideally as a standardised interface. In October 2006, Beckhoff proposed to define PLCopen communication blocks based on OPC UA. Three years later, this led to the formation of a joint PLCopen and OPC UA working group under the chairmanship of Beckhoff. In 2010, mapping of the IEC 61131-3 information model in OPC UA (server) was adopted as a common specification. In practice this means that a single IEC 61131-3 compliant PLC program can be loaded unchanged IEC using the different proprietary engineering tools of different manufacturers onto their PLCs. The controllers make their data and information available externally in a semantically identical manner via OPC UA, e.g. for visualisation and MES/ERP tasks. This significantly reduces the engineering effort. In a function block instance with 20 data points, for example, instead of linking each individual data point into a visualisation mask or an MES system, it is now sufficient to link a single instance object – and to do this in the same way even for different manufacturers.

Fig. 3: The PLCopen/OPC UA client blocks enable fieldbus-independent, fast communication. The TwinCAT PLC with integrated OPC UA client initiates the data communication.

Fig. 3: The PLCopen/OPC UA client blocks enable fieldbus-independent, fast communication. The TwinCAT PLC with integrated OPC UA client initiates the data communication.

Further constructive group work resulted in the next step in April 2014 in the form of adopting the PLCopen specification “OPC UA client function blocks for IEC 61131-3”. In this way the controller can play the active, leading part in the communication, in addition or as an alternative to the usual distribution of roles (Fig. 3).

Fig. 4: Block diagram for the the method call-up.

Fig. 4: Block diagram for the the method call-up.

The PLC can thus horizontally exchange complex data structures with other controllers or vertically call up methods in an OPC UA server within an MES/ERP system, e.g. to retrieve new production orders or write data to the cloud. This enables the production line to act independently (Fig. 4).

Customers realised the potential of these function blocks at an early stage and have benefited from the implementation by Beckhoff. Client Zweckverband Wasser und Abwasser Vogtland (Vogtland Water and Wastewater Association) used compact CX9020 Embedded PC controllers to form an intelligent network between 300 local water management systems. Actual objects, such as pumps, were modelled in the IEC 61131-3 PLC controller as complex objects with interaction options. Because the OPC UA server is integrated in the controller, these objects are automatically available as complex data structures
for semantic interoperability with the outside world. The result is a decentralised intelligence that makes decisions independently and transmits information to its “neighbours” or queries statuses and process values for its own process in order to ensure a trouble-free process cycle. With the standardised PLCopen function blocks, the devices independently initiate communication from the PLC to other process devices as OPC UA clients, while at the same time being able to respond to their requests or to requests from higher-level systems (SCADA, MES, ERP) as OPC UA servers.  The company said the solution, both from a technical and a commercial perspective resulted in savings in initial licence costs of more than 90%.

Fig. 5: Efficient communication without handshaking: The TwinCAT PLC transfers the RFID information to the MES system via an OPC UA method call-up and receives an instruction for the next step as a return parameter.

Fig. 5: Efficient communication without handshaking: The TwinCAT PLC transfers the RFID information to the MES system via an OPC UA method call-up and receives an instruction for the next step as a return parameter.

A practical scenario for calling up an OPC UA method was already demonstrated at the 2013 Hannover Messe (Hanover Fair): The Beckhoff PLC acted as an OPC UA client and called a method in the MES system of the company iTAC. An RFID code and process data were transferred as input parameters, registered in the MES system, checked and assigned either “OK” or “failure” grades. The method of call-up ensured performance and data consistency (Fig. 5).

Service oriented architecture PLC

With the mapping of IEC 61131-3 in the OPC UA server and using the PLCopen function blocks, PLC manufacturers have already laid an important foundation. The option to call OPC UA services in other devices from a PLC is an enabling technology for “B2M” scenarios. For example, the PLC can call a service in a vision/camera application or an RFID reader, communicate directly with the PLC, or transfer the data of a big-data application to the cloud. The PLC can call these methods, but how can it offer services itself, and in a manner that is easy to handle?

TwinCAT 3 offers the option to implement IEC 61131-3, C++, and MATLAB/Simulink modules, load them into different CPU cores, and run them in different real-times, while being assured that they will continue to interact with each other reliably. The basis for this is its module language, which describes the characteristics of the modules, e.g. with regard to the process parameters or methods.

Fig. 6: Methods in the IEC 61131-3 PLC can be approved for external application simply.

Fig. 6: Methods in the IEC 61131-3 PLC can be approved for external application simply.

The implementation is very simple for PLC programmers: A PLC method (with freely selectable input/output parameters) is made available as a service call in the OPC UA server, integrated in the PLC controller by adding a simple “Pragma” instruction line. Based on the IT security and permissions integrated into the OPC UA protocol, each OPC UA client can browse the OPC UA server and call up the required service, independently of the operating system and programming language, ensuring data consistency (Fig. 6).

Advantages: Effective, data-consistent services from the SOA-PLC

At present, data exchange between the MES level and the PLC usually takes place via a time-consuming handshake procedure. The MES system signals the transmission of a recipe to the controller, for example, and the PLC acknowledges readiness. Once the recipe data have been received, the transfer is acknowledged. An SOA-PLC now makes it possible to transmit data to the controller in a single communication: Data values are no longer exchanged in multiple transactions, but handled as a single service with input parameters (the recipe) and output parameters (acknowledgement by the PLC). In other words, OPC UA makes the remote procedure call (RPC) available right into the programmed PLC function block. This will shorten the communication roundtrip times between PLC and MES systems significantly and can lead to higher production throughput. In addition, it will reduce engineering costs for the data link between shop floor and top floor quite dramatically.

Current status and future prospects

An SOA-PLC does more than simply support a web service right into the PLC, ensuring security through a VPN. It comprises object-oriented data communication for live and historic data, alarms and services (methods) – including the corresponding metadata linked with the required security right into the service and data level, including the modelling capabilities of information models – all based on an international IEC standard.

Today, the integration of OPC UA server and client functionality into the controller enables the implementation of intelligent networks, and ensures high security standards with access rights to the services layer at the same time. In the future, the exchange of information models will become increasingly important. A PLC should then no longer present itself to the outside world as an IEC 61131-3 controller via OPC UA with process data, but as an ammeter, for example, based on a specification by the organisation of measuring device manufacturers. The operating system used in an embedded controller will no longer be visible from the outside; For security reasons all ports are closed – the device will offer its SOA services only via OPC UA with security right into the services and data levels. In addition to data and method calls, the “file transfer via OPC UA” offers interesting options, not only for local offline measurement data recording, but also for other tasks such as device management.

Fig. 7: Method call-ups from the MES into the PLC increase the performance of previously time-consuming data handshake mechanisms.

Fig. 7: Method call-ups from the MES into the PLC increase the performance of previously time-consuming data handshake mechanisms.

As the only IEC-standardised SOA architecture on the Industry 4.0 standardisation roadmap of DKE (German Commission for Electrical, Electronic & Information Technologies), OPC UA has the potential to establish itself as the de-facto standard for data and information exchange in Industry 4.0 and IoT applications. Safe, horizontal and vertical communication from sensors to IT systems is therefore already feasible today. Beckhoff realised the potential of OPC UA at an early stage and today offers the SOA-PLC with integrated OPC UA client and server even for the smallest CX Embedded PC systems. The control architecture in the PC-based TwinCAT software, which can run on a wide range of device classes, in combination with the large signal variety of the Beckhoff I/O terminals and the performance of EtherCAT with integrated safety, all providee an ideal platform with scalable performance for all future Industry 4.0 requirements.

Contact Kenneth McPherson, Beckhoff Automation, Tel 011 795-2898, kennethm@beckhoff.com

Related Articles

  • Quantum computing. The next big… wait, what is it really?
  • Accurate device characterisation for high bit rates
  • Advanced driver assist system for mining launched
  • EMI shielding ventilation panels
  • Load sensing by light