基于MQTT的OPC UA快速開發.pdf

編號:185981 PDF 14頁 916.18KB 下載積分:VIP專享
下載報告請您先登錄!

基于MQTT的OPC UA快速開發.pdf

1、OPC Day International 2024June 17th 21st,2024Randy ArmstrongChair of OPC UA Security Working Grouprandy.armstrongopcfoundation.orgOPC Day International 2024June 17th 21st,2024Client-Server=tightly coupled applications.Browsing address space to discover;Client specific subscriptions.Subscriptions cha

2、nge frequently.Need to call Methods.PubSub=loosely coupled applications.No need to browse;Many Clients can use same subscription;Subscriptions change rarely;Limited need for Methods.ClientServerPublisherSubscriberSubscriberSubscriberMQTTBrokerOPC Day International 2024June 17th 21st,20243PubSub may

3、be an add-on to a Server.A Publisher is a Client subscribing for data which is it re-publishes.A Client is used to configure the Publisher.Same data and information models can be published with PubSubClientServerPublisherSubscriberPubSubConfigurationSubscriberSaved In StorageIndustrial ProcessMQTTBr

4、okerOPC Day International 2024June 17th 21st,20244PubSub stands on its own!Publisher configuration can be fixed or managed with a non-OPC UA applicationPublisher sends fixed messages and metadata to MQTT broker.Subscribers discover where and what is Published by subscribing to well known topics.Subs

5、criberPubSubConfigurationSubscriberSaved In StorageIndustrial ProcessPublisherMQTT BrokerOPC Day International 2024June 17th 21st,20245MeasurementDescriptionUnitsConsumptionThe energy consumed by the device during the calculation period.kWhDutyCycleThe fraction of the calculation period where the de

6、vice is consuming power.%CalculationPeriodThe period,in ms,over which power calculations are computed.sOPC Day International 2024June 17th 21st,20246JSON widely understood.Default data format for the web GZIPed JSON smaller than most binary formatsOPC UA over MQTT uses JSON as the primary interchang

7、e format.MQTT 5.0 ContentType used to indicate JSON or Compressed Data If MQTT 3.1 is used the Subscriber should check for GZIP header and assume JSON if not present.CalculationPeriod:3600,Consumption:42.161,DutyCycle:0.305A complete OPC UA PubSub Message!OPC Day International 2024June 17th 21st,202

8、47Status Messages If IsCycle=FALSE then MQTT Will message is reported if Publisher goes offline.If IsCycle=TRUE the message has an expiry and the Publisher must re-send periodically.MessageId:“,MessageType:ua-status,PublisherId:(Quickstart001),Status:2,IsCyclic:falseopcua/json/status/(Quickstart001)

9、OPC Day International 2024June 17th 21st,202481.Decide what Data to Publish2.Create JSON Representation3.Connect to MQTT Broker4.Send Status5.Periodically Send Data6.Done!What is missing?No dynamic metadata Fixed metadata can be published Schema can be inferred from JSON No information on Engineerin

10、g Units.No discovery of Publishers Subscribers need to be configured with topics Wildcards using standard topic namesopcua/json/data/(Quickstart001)/Conveyor/MotorOPC Day International 2024June 17th 21st,20249Add a header to tell Subscribers which metadata to use.PublisherId uniquely identifies the

11、Publisher within the BrokerDataSetWriterId uniquely identifies the message definition within the PublisherMinorVersion indicates the version of the Metadata that the Message complies with.PublisherId:(Quickstart002),DataSetWriterId:101,MinorVersion:1718358698,WriterGroupName:Conveyor,DataSetWriterNa

12、me:Motor,SequenceNumber:23,Timestamp:2024-06-14T09:51:49.1904155Z,Payload:CalculationPeriod:3600,Consumption:42.70423076116228,DutyCycle:0.46250786856701065 :opcua/json/metadata/(Quickstart002)/Conveyor/MotorOPC Day International 2024June 17th 21st,202410PubSub messages are Name/Value pairs called“F

13、ields”Fields have DataTypes which may be Structures.Structured DataTypes are completely define in the MetaData.Fields have additional Properties which provide context.i.e.EngineeringUnits.Metadata may be shared Important optimization for some systems.Simple devices can have a fixed file.VersionDescr

14、iptionFields 0 Name:Consumption DataType:Double Properties EURange:0,1000 EngineeringUnits:“kWh”1 Name:DutyCycle DataType:Double Properties EURange:0,100 EngineeringUnits:“%”2 Name:CalculationPeriod DataType:Double Properties EngineeringUnits:“s”Data+Status+Metadata=MVPOPC Day International 2024June

15、 17th 21st,202411Connection Messages report all messages provided by a PublisherInclude details such as what DataSets are published and how they can be GroupedAllow Publishers to use non-standard topic names for Data and MetaData Key feature needed to support UNSOther information control the frequen

16、cy of publication and the exact details on what appears in the NetworkMessagesWriterGroups 0 Name:Conveyor DataTopic:PublishingInterval:1000 KeepAliveInterval:30000 QualityOfService:AtLeastOnce DataSetWriters 0 Name:Motor DataSetWriterId:101 DataSetName:EnergyMetrics MetaDataTopic:KeyFrameCount:1 op

17、cua/json/connection/(Quickstart003)OPC Day International 2024June 17th 21st,202412WriterGroup Defines the NetworkMessage Allows bundling of DataSetMessages Name is unique with the PublisherDataSetWriters Defines the DataSetMessage Each DataSetMessage has a layout described by the MetaData.DataSetWri

18、terId unique within a Connection.Name is unique within the Group/WriterGroupDataSetMessage1Field1:Value1Field2:Value2DataSetMessage1Field3:Value3Field4:Value4DataSetMessage2NetworkMessage1nDataSetWriterDataSetWriterDataSetMetaDataDataSetMetaDataopcua/json/OPC Day International 2024June 17th 21st,202413Simple Quickstarts in GitHubC#code that implements OPC UA with special OPC UA libraries in 50-100 lines of code.Great way to get started with OPC UA.OPC Day International 2024June 17th 21st,202414Randy Armstrongrandy.armstrongopcfoundation.org

友情提示

1、下載報告失敗解決辦法
2、PDF文件下載后,可能會被瀏覽器默認打開,此種情況可以點擊瀏覽器菜單,保存網頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站報告下載后的文檔和圖紙-無水印,預覽文檔經過壓縮,下載后原文更清晰。

本文(基于MQTT的OPC UA快速開發.pdf)為本站 (蘆葦) 主動上傳,三個皮匠報告文庫僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對上載內容本身不做任何修改或編輯。 若此文所含內容侵犯了您的版權或隱私,請立即通知三個皮匠報告文庫(點擊聯系客服),我們立即給予刪除!

溫馨提示:如果因為網速或其他原因下載失敗請重新下載,重復下載不扣分。
客服
商務合作
小程序
服務號
折疊
午夜网日韩中文字幕,日韩Av中文字幕久久,亚洲中文字幕在线一区二区,最新中文字幕在线视频网站