简体   繁体   English

有理由在MQTT上使用UA OPC和UA OPC体系结构

[英]When it is justified to use UA OPC and UA OPC architectures over MQTT

I am new to using OPC UA, I would like me to clarify some doubts I have about OPC UA which are as follows: 我是使用OPC UA的新手,我想澄清一下我对OPC UA的一些疑问,如下所示:

– In what situations is the use of OPC UA. –在什么情况下使用OPC UA。

– OPC UA Architectures over MQTT. –基于MQTT的OPC UA体系结构。

If there is any document that explains these two doubts, I thank you 如果有任何文件可以解释这两个疑问,谢谢

OPC UA it is probably the de-facto standard for industrial M2M communication and it is very important in the context of Industrie 4.0. OPC UA可能是工业M2M通信的事实上的标准,并且在工业4.0的环境中非常重要。

Let's say you have an industrial machinery (like a PLC) that manages some others, like sensors. 假设您有一台工业机械(例如PLC)来管理其他一些机械,例如传感器。 With OPCUA you can model into the PLC (which becomes an OPCUA server) some data, using an information model (object-structured and hierarchical, similar concepts to UML) built using rules defined by OPCUA standard ( https://opcfoundation.org/developer-tools/specifications-unified-architecture/part-3-address-space-model/ ). 使用OPCUA,您可以使用由OPCUA标准( https://opcfoundation.org/定义的规则)构建的信息模型(对象结构和层次结构,类似于UML的概念)在PLC(将成为OPCUA服务器)中建模一些数据。 开发人员工具/规范统一架构/第3部分-地址空间模型/ )。 So the PLC first gather data from these sensors using a specific industry protocol, then model in its address space some data that is considered relevant. 因此,PLC首先使用特定的行业协议从这些传感器收集数据,然后在其地址空间中对一些被认为相关的数据进行建模。

You can also build a (opcua) server on the sensors, imagine a temperature or humidity sensor in which you model data such as not only the value of the temperature, but also the manufacturer, engineering unit (Fahrenheit or Celsius for instance). 您还可以在传感器上构建一个(opcua)服务器,想象一个温度或湿度传感器,您可以在其中对数据进行建模,这些数据不仅可以模拟温度值,还可以模拟制造商,工程单位(例如华氏温度或摄氏温度)。 But you can also insert methods within a server and associate to them some specific actions, for example turn on/off a specific functionality if some conditions occur. 但是,您也可以在服务器中插入方法,并将某些特定的操作与它们相关联,例如,如果发生某些情况,请打开/关闭特定的功能。 For all specifications you can look at https://opcfoundation.org/developer-tools/specifications-unified-architecture , where, after signing up, you can download specifications in detail. 对于所有规范,您可以查看https://opcfoundation.org/developer-tools/specifications-unified-architecture ,在注册后,您可以在其中详细下载规范。 Another good documentation that I found is http://documentation.unified-automation.com/uasdkcpp/1.6.1/html/index.html where it is explained the main concepts. 我发现的另一个很好的文档是http://documentation.unified-automation.com/uasdkcpp/1.6.1/html/index.html ,其中解释了主要概念。

Once you defined your opcua servers with an information model within its address space, you can start interacting with some others industrial machinery, in a standardized way. 一旦在地址空间内用信息模型定义了opcua服务器,就可以开始以标准化方式与其他一些工业机械进行交互。 These machinery could be MES or HMI applications and they have to be opcua clients. 这些机器可以是MES或HMI应用程序,并且必须是opcua客户。 They can query the opcua server above mentioned, browsing their address space, reading values, calling methods, monitoring some interesting variables or events (subscribing to them the server will send a notification when a change occurs). 他们可以查询上述opcua服务器,浏览其地址空间,读取值,调用方法,监视一些有趣的变量或事件(订阅它们,服务器将在发生更改时发送通知)。 The main advantage is that all these operations are performed via the use of standardized messages: if you want to write a data you have to send a WriteRequest message, if you want to read the client will send a ReadRequest and so on. 主要优点是所有这些操作都是通过使用标准化消息执行的:如果要写入数据,则必须发送WriteRequest消息,如果要读取,则客户端将发送ReadRequest等等。 Since everything is standardized (from data types to serialization of messages), all clients can understand structure of opcua servers (even if they are from different manufacturers). 由于所有内容都是标准化的(从数据类型到消息的序列化),因此所有客户端都可以了解opcua服务器的结构(即使它们来自不同的制造商)。 Without that every manufacturer could use its own way to define services or variables and you have to create your application (let's say HMI) to fit to that particular vendor's APIs or conventions. 否则,每个制造商都可以使用自己的方式定义服务或变量,并且您必须创建应用程序(例如HMI)以适合该特定供应商的API或约定。

Regarding OPCUA over MQTT, in this you can find some useful information OPC UA protocol vs MQTT protocol . 关于基于MQTT的OPCUA,您可以在其中找到一些有用的信息OPC UA协议与MQTT协议 As I said before OPCUA has the advantage of defining a structured and a standard information model, accessible via standard services, so using MQTT is only one part of the whole. 如前所述,OPCUA具有定义结构化和标准信息模型(可通过标准服务访问)的优势,因此使用MQTT只是整体的一部分。

Another good reference to understand information models in opcua server could be OPC Unified Architecture 理解opcua服务器中信息模型的另一个很好的参考可以是OPC统一体系结构

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM