Some questions about the PublishedDataSet|OPC UA Standard|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
Some questions about the PublishedDataSet
Avatar
Sascha Kattelmann
Member
Members
Forum Posts: 16
Member Since:
07/09/2019
sp_UserOfflineSmall Offline
1
09/06/2019 - 02:22
sp_Permalink sp_Print

Hey,

the PublishedDataSet has the following structure:

    <Definition Name="PublishedDataSetDataType">
      <Field Name="Name" DataType="i=12" />
      <Field Name="DataSetFolder" DataType="i=12" ValueRank="1" />
      <Field Name="DataSetMetaData" DataType="i=14523" />
      <Field Name="ExtensionFields" DataType="i=14533" ValueRank="1" />
      <Field Name="DataSetSource" DataType="i=22" />
    </Definition>

Here the DataSetSource contains the list of PublishedVariables (or PublishedEvents, but let's ignore those for now)
while the DataSetMetaData contains a list of FieldMetaData corresponding to the list of PublishedVariables. To my
understanding each PublishedVariable maps to exactly one FieldMetaData, but how is this mapping represented?
I can't see an index or whatever, is this just ensured by order of the lists?

My next question is about the SamplingIntervalHint in a PublishedVariable and the PublishingInterval of the
WriterGroup. I don't understand what sampling a variable (represented by a single field in the DataSetMessage) more often
than publishing a NetworkMessage is good for because there is no way provided to accumulate multiple samples
of a variable in a single field in a DataSetMessage since it has a fixed schema defined through the DataSetMetaData.

As far as I understand it is possible to accumulate DataSetMessages, so e.g. it would make sense to have sampling intervals
for DataSets, but I don't see this happening here.
Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/06/2019 - 02:56
sp_Permalink sp_Print

The Fields and PublishedVariablesare related by their index in the array. It is an invalid configuration if the array lengths are not the same.

There are many cases where you might want oversample or undersample a variable for publish.

i.e. a value that changes rarely can be sampled at a much slower rate.

or value that changes constantly and you want to make sure the most current value is sent with the publish.

Avatar
Sascha Kattelmann
Member
Members
Forum Posts: 16
Member Since:
07/09/2019
sp_UserOfflineSmall Offline
3
09/06/2019 - 04:40
sp_Permalink sp_Print

Randy Armstrong said
The Fields and PublishedVariablesare related by their index in the array. It is an invalid configuration if the array lengths are not the same.

There are many cases where you might want oversample or undersample a variable for publish.

i.e. a value that changes rarely can be sampled at a much slower rate.

or value that changes constantly and you want to make sure the most current value is sent with the publish. 

I see, so it is somewhat assumed that e.g. the PublishedDataSet context (implementation wise) really holds a set of samples from Variables in its own state. This was slightly confusing for me since in a trivial implementation you can just sample the data before the WriterGroup publishes the NetworkMessage and you are good to go (e.g. the WriterGroup triggers the sampling according to the PublishInterval). But since the WriterGroup seems to simply get available samples from the PublishedDataSet context it makes sense to have that SamplingIntervalHint in a PublishedVariable.

Many thanks Randy, you're really helping me a lot here.

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