Proceed as follows to configure and use OPC-UA-Subscriber node.
- Configure the server/node.conf.yaml file.
- In the ConnectorProviders section, under
ACMfG
subsection, specify the following properties.
- metadataFilePath property
metadataFilePath=<path of the metadata file>
You
can also mention the full path through the toolkit on the UI here.
- PublishingInterval property
PublishingInterval=8000
This is an optional
property and by default, the value of the property is 300 milliseconds. The property specifies the
time interval in which the publisher publishes the data. If more than 1 publisher is used, you can
specify average publishing interval of all the publishers.
- Configure and save the OPC-UA-Subscriber
metadata text file. A metadata file contains the Fields that specify the
Name
and Type
of a data.
- Type is a mandatory property. The data types that are specified in the
metadata file must be according to the sequence in which the properties are published from
publisher. Otherwise, the Integration Server stops.
- The Name property is optional. If the property names are not provided, a
default name is given, such as 'Field1', 'Field2' and so forth.
- For your reference, check Sample_Metadata_File_AllTypes.txt file that is
located in the <installer_location>/runtime/amd64_nt_4/setup folder. You can
update and use this file as per your requirement.
- You can choose either one of the following formats for your metadata file.
The following
example is a metadata file that contains the property names and the data types.
Name: "Temperature-Sensor Measurement"
Fields:
[1] Name=Time, Type-Datetime
[2] Name=Bool, Type=Boolean
[3] Name=Temperature, Type=Int32, Unit-Celsius, Range={1,100}
[4] Name=Distance, Type=Float
[5] Name=Name, Type=String
The following example is a metadata file that contains
only the data types.
Type=Duration
Type=EnumValue
Type=LocaleId
Type=NodeId
Type=QualifiedName
Type=UtcTime
- Create a flow with the OPC-UA-Subscriber Node.
- Click the Manufacturing drawer from the
Palette view. The Manufacturing drawer lists the
available built-in nodes.
- Drag the OPC-UA-Subscriber node from the
Manufacturing drawer list to the Flow Exerciser.
- Click the Properties tab to set the node properties.
- Go to . Refer the OPC-UA-Subscriber node topic for properties details.
- Output file for a metadata file that had only types
-
<DataSet>
<Field0>0.000000</Field0>
<Field1>0</Fieldl>
<Field2>en</Field2>
<Field3>ns=0;i=17</Field3>
<Field4>Default Binary</Field4>
<Field5>2023-08-04T07:53:20.962Z</Field5>
</DataSet>
- Output file for a metadata file containing both names and types
-
<DataSet>
<Time>2023-07-07T08:08:24.681Z</Time>
<Bool>true</Bool>
<Temperature>614</Temperature>
<Distance>3.351</Distance>
<Name>Uniform</Name>
</DataSet>