Skip to main content

DataModule

The data module transfers data from OPC UA servers to the cloud.

SourceOpcUa

Inside the DataModule multiple sources (OPC UA server) can be configured, the following XML snippets shows an example for an OPC UA Source configuration.

<SourceOpcUa xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Id>UniqueId01</Id>
<ApplicationUri>urn:App</ApplicationUri>
<RemoteLds />
<!-- Optional OPC UA Authentication Options -->
<Authentication xsi:type="AuthenticationNone" />
<!-- Data source groups -->
<Groups>
<SourceGroup>
<TapioMachineId>000000001</TapioMachineId>
<UpdateIntervallInMs>500</UpdateIntervallInMs>
<CyclicUpdateInSec xsi:nil="true" />
<Items>
<SourceItem xsi:type="SourceEventItem">
<NodeId>ns=2;s=PublicInterface</NodeId>
<Provider>PublicInterface.M5-C1</Provider>
<UseConditionData>false</UseConditionData>
<SelectClauses>
<SelectClause eventTypeId="nsu=FullNameSpace;s=sdsd" browsePath="Test" attribute="15" />
<SelectClause attribute="16" />
<SelectClause browsePath="EventType" />
</SelectClauses>
</SourceItem>
</Items>
<Targets>
<Target>AzureIoTHub</Target>
<Target>BatchAggregation</Target>
</Targets>
</SourceGroup>
</Groups>
<!-- Commanding feature -->
<Commanding />

</SourceOpcUa>

Inside the configuration there are the following options:

EntryTypeDescription
IdstringUnique identifier of the module. Simultaneously used as the OPC UA server identifier.
ApplicationUristringOPC UA server address to connect using a local discovery service (OPC UA LDS).
OpcServerstringOPC UA server address to connect directly. <OpcServer>opc.tcp://localhost:4553</OpcUaServer>
RemoteLdsstringOPTIONAL OPC UA server address to connect using a remote discovery service.
AuthenticationobjectOPTIONAL: See OPC UA Client Configuration
GroupsList of SourceGroupSee SourceGroup
CommandingobjectFor Commanding see Commanding Configuration

Only one of the Options ApplicationUri or OpcServer has to be configured.

For more Information about OPC UA LDS see Unified Architecture Part 12: Discovery and Global Services

SourceGroup

A SourceGroup represents a OPC UA Client Subscription

EntryTypeDescription
TapioMachineIdstringThe tapio machine id for this subscription group, all data received via this group will be tagged with the configured tapio machine id.
UpdateIntervallInMsintegerThe OPC UA receiving interval, all value changed will be received in this interval; default is 500
CyclicUpdateInSecinteger/nullThe cyclic update to resend all data and send a current active condition list; to disable use <CyclicUpdateInSec xsi:nil="true" />, the default is <CyclicUpdateInSec>600<CyclicUpdateInSec>
Itemslist of SourceItemSee SourceEventItem and SourceDataItem
Targetslist of TargetSee Targets

SourceEventItem

With the SourceEventItem two kind of events can be configured:

  • The basic variant provides the Condition-Types, so events which have a Retain-Property are persistent.
  • The second variant are the pure Event-Types, which will be just reported on occurrence (on report) and are not persistent.
Condition Type

The basic condition type to produces the condition messages. Conditions are persistent events and can send regularly status updates via the condition refresh handling.

<SourceItem xsi:type="SourceEventItem">
<NodeId>ns=2;s=PublicInterface</NodeId>
<Provider>PublicInterface.M5-C1</Provider>
<SelectClauses/>
</SourceItem>
EntryTypeDescription
NodeIdobjectThe node id to listen for events, see supported formats.
ProviderstringDefines the provider grouping for received conditions, it is used as Key for condition refresh
SelectClauseslist of SelectClauseOptional, will be added as additional values, besides the pre-configured properties, see description of SelectClause below
UseConditionDataboolDisable the default condition type handling and use the event type handling; default is true (Condition Handling)
Event type

The event type handles the non-persistent events and produces the event data messages

<SourceItem xsi:type="SourceEventItem">
<NodeId>ns=2;s=PublicInterface</NodeId>
<Provider>PublicInterface.M5-C1</Provider>
<UseConditionData>false</UseConditionData>
<SelectClauses>
<SelectClause eventTypeId="nsu=FullNameSpace;s=sdsd" browsePath="Test" attribute="15" />
<SelectClause attribute="16" />
<SelectClause browsePath="EventType" />
</SelectClauses>
</SourceItem>

The SelectClause has the following XML attributes (OPC UA):

EntryTypeDescription
eventTypeIdstringthe event type node id, see full node id; default is i=2041 (-base-event-type)
browsePathstringthe browse path to select; default is ""
attributeintegerthe attribute to be used; default 13 (Value)

A value without attributes is not allowed:

<SelectClause />

When eventTypeId is configured then also browsePath or attribute has to be configured.

The select clauses defines the properties which will be transferred via the EventData vls-property or ConditionData vls-property to the tapio system (based on UseConditionData property).

  • Conditions: The select clauses will be used as additional clauses to the pre-configured select clauses.
  • Events: When no select clauses are configured a default set of the OPC UA BaseEventType properties is used, otherwise only the configured are used

Note: The NodeId-Attribute and a Time-Property should be always available

Note: If a generic event configuration does not filter out conditions/condition refresh and the containing source group does have another condition SourceEventItem and the CyclicUpdateInSec is enabled, the condition refresh will be send as generic events To avoid this put generic event configuration in a separate source group.

SourceDataItem

<SourceItem xsi:type="SourceDataItem">
<NodeId>ns=2;s=Simu.0000000001.0001-State.CurrentStateGroup</NodeId>
<SrcKey>State.CurrentStateGroup</SrcKey>
</SourceItem>
EntryTypeDescription
NodeIdobjectThe node id of the data value; see supported formats.
SrcKeystringThe identifier(key) used for transferring the values to the tapio system See k
TrimStringsboolOptionally trim the string and remove whitespace and nul-characters; default is false
QueueSizeunsigned integerOptional queue size of the item/event changes queue on the server; will be cleared on every receive from the client; default is -1 (max(int))
SamplingIntervalintegerOptional server sampling interval of the OPC UA item in ms; default is -1 (sampling is the same as UpdateIntervallInMs )
ProviderstringOptional provider which can be used for grouping data

Targets

<Targets>
<Target>AzureIoTHub</Target>
<Target>BatchAggregation</Target>
</Targets>

The targets configuration section defines the destinations of the received data from the OPC UA source group. It is possible to have multiple Destination*-Modules, like Batch Aggregation or Azure IoT Hub. Batch Aggregation is used for long cycle or for size based transfers, while Azure IoT Hub is used for real time streaming.