OPC UA communication
9.3 Using the S7-1500 as an OPC UA server
Communication
208 Function Manual, 12/2017, A5E03735815-AF
Step 2: Assigning PLC tags
The description below uses the example of a tag to show how you assign specific PLC tags
and server methods to the tags and methods of Euromap 77.
Proceed as follows:
1. Use an editor to open the file "demo.xml" that you created in "Step 1".
In the XML file, search for the UA tag with
NodeId="ns=1;s=MyIMM_MES_Interface.InjectionUnits.NodeVersion".
These tags are assigned a PLC tag in the next step.
2. To assign this OPC UA tag a PLC tag, add an extension to the XML element of the OPC
UA tag.
In turn, you then add an element of the type "<si:VariableMapping>" to this extension:
3. The XML element "<si:VariableMapping>" is defined in the XML namespace
"http://www.siemens.com/OPCUA/2017/SimaticNodeSetExtensions".
You therefore need to assign this namespace to the XML element "<UANodeSet>", for
example in a one-off operation with the following code line at the start of the XML file:
If you do not add the namespace, the element "<si:VariableMapping>" will not be known
in the file.
4. Save the "demo.xml" file and close the editor.
Useful information: Assigning PLC methods
As well as assigning tags, you can also assign methods to an FB instance (user program or
function block as representation of the method).
To assign an OPC UA method to an FB instance, you also need to add an extension to the
OPC UA XML file following the procedure outlined below. Please note that the suffix
".Method" without quotation marks must be added to the instance name.
You add an element of the <si:MethodMapping> type to the extension: