OPC UA monitored item with structure|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
OPC UA monitored item with structure
Avatar
Simon Pruntsch
New Member
Members
Forum Posts: 2
Member Since:
12/14/2022
sp_UserOfflineSmall Offline
1
12/14/2022 - 08:28
sp_Permalink sp_Print

Hello

I monitor a structure on my server with the MonitoredItem mode offered by OPC-UA (https://reference.opcfoundation.org/v104/Core/docs/Part4/5.12.1/). In general this workes fine. 
If I change the structure on the server the change is submitted to the client. The question that arises is, if I change the value of just one member
of the structure, is the server then sending the whole structure? 

Since we are using quite large structures this would end up in an perfomance issues.

I tried to understand with Wireshark whether only one member is sent or the entire structure. 
Unfortunately, I cannot derive from the OPC Binary Protocol what is exactly being sent. There might be some help here too
 
Excerpt from wireshark
****************************************************************************************************
****************************************************************************************************

OpcUa Binary Protocol
Message Type: MSG
Chunk Type: F
Message Size: 85
SecureChannelId: 2225294284
Security Token Id: 2
Security Sequence Number: 606
Security RequestId: 554
OpcUa Service : Encodeable Object
TypeId : ExpandedNodeId
NodeId EncodingMask: Four byte encoded Numeric (0x01)
NodeId Namespace Index: 0
NodeId Identifier Numeric: PublishResponse (829)
PublishResponse
ResponseHeader: ResponseHeader
Timestamp: May 12, 2000 08:54:06.602000000 Mitteleuropäische Sommerzeit
RequestHandle: 553
ServiceResult: 0x00000000 [Good]
ServiceDiagnostics: DiagnosticInfo
EncodingMask: 0x00
.... ...0 = has symbolic id: False
.... ..0. = has namespace: False
.... .0.. = has localizedtext: False
.... 0... = has locale: False
...0 .... = has additional info: False
..0. .... = has inner statuscode: False
.0.. .... = has inner diagnostic info: False
StringTable: Array of String
ArraySize: 0
AdditionalHeader: ExtensionObject
TypeId: ExpandedNodeId
EncodingMask: 0x00, EncodingMask: Two byte encoded Numeric
.... 0000 = EncodingMask: Two byte encoded Numeric (0x0)
.0.. .... = has server index: False
0... .... = has namespace uri: False
Identifier Numeric: 0
EncodingMask: 0x00
.... ...0 = has binary body: False
.... ..0. = has xml body: False
SubscriptionId: 1827064279
AvailableSequenceNumbers: Array of UInt32
ArraySize: 0
MoreNotifications: False
NotificationMessage: NotificationMessage
SequenceNumber: 21
PublishTime: May 12, 2000 08:54:06.602000000 Mitteleuropäische Sommerzeit
NotificationData: Array of ExtensionObject
ArraySize: 0
Results: Array of StatusCode
ArraySize: 0
DiagnosticInfos: Array of DiagnosticInfo

****************************************************************************************************
****************************************************************************************************

Thanks in advance

Kind Regards 

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
12/14/2022 - 14:47
sp_Permalink sp_Print sp_EditHistory

There is no mechanism to send a partial structure update. Change one field and the entire structure is sent.

If you have large structures where individual elements change you should expose a complex variable in the address space that allows clients to subscribe to individual fields in the structures.

Avatar
Simon Pruntsch
New Member
Members
Forum Posts: 2
Member Since:
12/14/2022
sp_UserOfflineSmall Offline
3
12/20/2022 - 07:04
sp_Permalink sp_Print

Hello

I have a follow up question. Is it the same with arrays? If I have a large array and I change just one field, is the hole array going to be sent? Can I hand over each field seperat as a monitored item, so that if I change one member, only one member is sent to the client.

 

Thanks in advance 

Kind regards

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
12/20/2022 - 07:27
sp_Permalink sp_Print

With Arrays clients can subscribe to subranges by specifying an IndexRange. However, if any value changes within the range then the entire range is sent.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 33
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855