Skip Navigation Links.

    
 

 
   




-天気予報コム-


    

Convenient and useful OPC UA












1 Introduction

When sending and receiving data between a personal computer and a PLC using Ethernet, it was necessary to develop a personal computer program for each PLC manufacturer.
For example, you can connect a PC to a PLC using the MC protocol for Mitsubishi Electric, FINS for Omron, and the open source Snap7 for Siemens.
You can also connect to the above PLC maker using OPC UA instead of MC protocol, FINS, Snap7.
This is because each PLC manufacturer has added a function called OPC UA server of the OPC Foundation to the PLC.
The source of the program that connects to the OPC UA server is released by the OPC Foundation as an OPC UA client.
PLCs of each manufacturer that have the OPC UA server function can be connected with the OPC UA client of the personal computer of the office network.
OPC UA is convenient because it can be connected to PLCs from various manufacturers.
What is useful is that the data between the PLC and the personal computer can be information modeled. This is an XML file, so it's easy to understand and easy to maintain.
Note>
Source code of OPC UA client of GITHUB
Siemens also publishes sample source code for OPC UA. I think this is easier to understand.
Creating of OPC UA clients with .NET and helper class



↑TOP of Page


2 PLC with OPC UA server function

Manufacturer PLC Remarks
Mitsubishi Electric iQ-R Series OPC UA Server Unit No controller (PLC) at present
Approximately 200,000 yen
Omron NJ/NX Series Controller Small NX102 (approx. 200,000 to 500,000 yen)
Siemens S7-1200/S7-1500 Series Controller ET 200SP (S7-1510) is low price (about 90,000 yen)



Note> Only PLC manufacturers that I have used. I think there are others.

The iQ-R series PLC and NJ / NX series controller PLC can be used as an OPC UA server. However, both are new generation PLCs.
If you are using only the old generation PLC of Q03UDVCPU or CJ1M, it may be difficult to use OPC UA with the new generation PLC.
Siemens S7-1200 / S7-1500 was used to test OPC UA.
S7-1500 can use structures, but S7-1200 cannot use structures. Therefore, S7-1500 is recommended because it cannot take advantage of the information model. It is better to use ET200SP (S7-1510) as the model.
It is cheap and has remote IO function and OPC UA server function.
It seems that it can also be used as an ordinary S7-1500.




Explanation>Control panel for experiments.
The upper side is ET200SP and the lower side is Q03UDVCPU. PLC is used by putting it in the control panel. It's like a computer case. It is convenient to take the ground and power supply from one place.
The upper row is the electricity meter, the next is the breaker, the 24V power supply, the circuit protector, and the ET200SP.
The middle stage is a circuit protector, 100VAC relay, 100V and 24V terminal blocks. The terminal block can supply power to many devices with one power supply. In the AC relay, when the breaker and circuit protector are turned on, the 24V signal of the A contact is turned on, and the signal power is supplied to the motor driver outside the control panel.
The lower row is a 24V power supply, Q03UDVCPU, and high-speed pulse counter.
The breaker is for turning on the power of the PLC. When an overcurrent flows, it turns off to prevent a fire. There is also a circuit breaker with an earth leakage function. This is because if used for a long time, the insulation may deteriorate and electric leakage may occur.
The circuit protector is for protecting the PLC. It is also used to turn the PLC on and off.



↑TOP of Page


3 Use the S7-1500 OPC UA server on the CC LINK IE FIELD network

If the CC Link IE Field network is composed of older generation Q series PLCs, Mitsubishi Electric's OPC UA server unit cannot be used.
The S7-1500 OPC UA server can connect to a PLC on the profile net. However, it cannot connect to the PLC on the CC Link IE Field.
A protocol converter called NT 151-CCIES-RE / PNS is required to connect.
NT 151-CCIES-RE / PNS is recognized as a slave on the CC Link IE Field and as an IO device on the profile net.

Maintenance is easier with one type of user's PLC program running on the OPC UA server and OPC UA client software running on Windows. This is because Mitsubishi, Omron, and Siemens have different tools for creating PLC programs. Maybe the connection method is also different.

Mitsubishi tools: GX Works3 (about 50,000 yen) + MX OPC UA Module Configurator-R (about 20,000 yen)
Omron's tool: Sysmac Studio (about 300,000 yen)
Siemens tool: TIA Portal V16 (about 300,000 yen)

In networks where protocol transducers are available, you may want to use familiar tools and familiar OPC UA servers.

Note> There is an explanation of NT 151-CCIES-RE / PNS.
Protocol conversion gatewaynetTAP | Hilshire-Product Search

Note> NT 151-CCIES-RE / PNS has not been tested yet.






↑TOP of Page


4 What is OPC FOUNDATION?

The reason why the computer and PLC are connected by Ethihternet is that the computer is equipped with a terminal for Ethernet as standard.
Before that, it was necessary to purchase an expensive measurement board separately to connect the computer and the machine.

The OPC Foundation has developed a library called OPC UA that can be connected to a PLC. The library is distributed free of charge.
However, the PLC manufacturer is free to decide whether to add the OPC UA server function to the PLC.


The role of the OPC Foundation is as follows when you look at the homepage.
The role of the OPC Foundation is to work with users, vendors, and affiliates to set standards for multi-vendor and multi-platform data transfer and manage a global organization that enables secure and reliable interconnection of industrial automation.

The first generation OPC technology was announced in 1996.
At that time, it was defined as OPC = OLE for Process Control. 
It is based on technology developed by Microsoft for Windows.
 It became widespread as OPC DA (Data Access) and promoted the introduction of personal computers into factories and computerization.

The second generation OPC UA was announced in 2006.
The definition of OPC has also changed from OLE for Process Control to Open Platform Communications.
It is the international standard IEC6254.
As a result, the data server has changed from a personal computer to a PLC.

In 2015, the OPC UA specification was adopted for the RAMI model, which is the reference model for Industrie 4.0 in Germany.

Note> What is the RAMI model?
Reference Architecture Model Industrie 4.0 (RAMI4.0): A three-dimensional architecture model.
IEC 62541: OPC-UA is recommended for the communication layer.




Description> RAMI 4.0 model



↑TOP of Page


5 What is OPC UA?

OPC UA (OPC Unified Architecture) is an international standard software communication specification (IEC 62541) for information data transfer corresponding to the IIoT (Industrial IoT) era.
It is a unified standard for connecting factory LAN and office LAN.

OPC UA has the following three features.


  • multi-platform
    Compatible with Windows, LINUX, and Android OS.
  • Secure communication
  • Information model

The information model is divided into four layers.

1 are information models unique to the device (this hierarchy can create an information model from a PLC program).
2 are Information Models (companion specification) specialized for the industry. There are the following.

・Euromap (European organization of plastics and rubber production machinery industry).
・AIM (Association for Automatic Data Capture, Identification and Mobility).
・VDMA (German Engineering Association).
・PLCopen (an organization that promotes IEC 61131-3, the international standard for programming PLC with its headquarters in Europe).
・AutomationML.
・OMAC (The Organization for Machine Automation and Control).

The companion specification defines a hierarchical structure and variable names. It is used by performing mapping processing that corresponds to the program variables of the PLC.
3 are Built-in Information Models.
4 are OPC UA Meta Models.

3 and 4 are created by the OPC Foundation.


Precautions when using OPC UA client library

Be careful when using the sample source of the OPC UA client of the OPC Foundation.
Even though it is open source, it is because it has a GPLv2 license (Opc.Ua.Core). There is also a part of the MIT license (Opc.Ua.Client).
When providing a program using the OPC UA client library (Opc.Ua.Core) to customers, it may be necessary to disclose source code other than Opc.Ua.Core.
Therefore, it is better to separate the OPC UA client program part and the original processing part with know-how.
For example, use interprocess communication such as IPC.
User programs on the OPC UA server on the PLC side also usually disclose the source. There will be no problem even if the source of the OPC UA client program on the personal computer side is disclosed. The process is as simple as sending and receiving data.
Having a program source may make customers feel at ease and willing to buy. Before OPC UA, sending and receiving data between a personal computer and a PLC was one of the know-hows of PLC companies and software companies.


Corporate members of the OPC Foundation are not obliged to disclose the source of the program. (A minimum annual corporate membership fee of about 300,000 yen is required.)
Some companies sell the OPC UA Client SDK. I have not investigated the contents, but it seems that it will cost more than 1 million yen. If you use the SDK you purchased, you will not be obliged to disclose the source of the program.
Therefore, if you do not want to disclose the source of your program, there are at least two ways.


Note> License comment in the source code


//RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/
GNU General Public License as published by the Free Software Foundation.
// version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2
// The complete license agreement can be found here: * http://opcfoundation.org/License/MIT/1.00/
The Siemens OPC UA client sample program comes with source code.




↑TOP of Page


Supports OPC UA communication with RCDWIN, EM, EDA and EP

Supporting OPC UA means that RcdWin, EM, EDA, EP can be used in all aluminum extrusion factories. Therefore, OPC UA support for these programs will be of great significance. Before OPC UA, it was necessary to develop a communication part for each PLC used in the factory.
EP0S (OPC UA Client Program) sends and receives data to and from the PLC's OPC UA server.
EP0Conv exchanges data between EP0S and IPC. Then convert it to the structure data used by the program.
RcdWin, EM, EDA, EP perform "interprocess communication" with EP0Conv and process OPC UA data.

The data of OPC UA is called an information model. Since it is an information model (Note 1) of an aluminum extrusion factory, the amount of variables is quite large. However, the fact that PLC data can be defined as an information model has an advantage in terms of maintenance. In other words, it's easy to understand. It will be easier when adding or deleting variables.

This model is an XML file that you can view in Siemens' free tool, SiOME.
SiOME is an XML information model creation tool. With TIA PORTAL and SiOME, you can transfer the information model to the OPC UA server.
The flow is to create an information model from the PLC data structure and transfer the information model to the PLC with TIA PORTAL.

Note 1> There is no general information model for aluminum extrusion factories. I think it depends on the company.
Note 2> Download SiOME
Siemens OPC UA Modeling Editor (SiOME) for implementing OPC UA companion specifications Siemens OPC UA Modeling Editor (SiOME) for implementing OPC UA companion specific... - ID: 109755133 - Industry Support Siemens




Description> Data structure of information model of aluminum extrusion factory



↑TOP of Page