How do you obtain the OPC UA variable nodes of the PLC tags of an S7-1500 OPC UA server to address them offline in an OPC UA client?
Generate an OPC UA export file
PLC tags and DB variables that are released in your configuration for OPC UA can be exported in an XML file for offline engineering of OPC UA clients. The XML file is based on the XML schema of the OPC foundation.
Proceed as follows:
- Select the CPU in your TIA project.
For this you click the CPU icon (in the Network view, for example).
- In the Properties of the CPU you navigate to "General > OPC UA > Server > Export".
- Click the "Export OPC UA XML file" button.
- Select the directory in which you want to save the export file.
- Assign a name to the file.
- Click "Save".
The complete OPC UA address area of the S7-1500 is now available to you as an XML export file.
Convert an export file
Using the XML converter provided in this entry you can extract the user-specific OPC UA variables (consisting of the PLC tags and DB variables of the S7-1500) from the OPC address area. In addition, the OPC UA XML file is converted into CSV.
Proceed as follows:
- Download the ZIP archive "109742903_XML-Konverter_V2_1.zip" to your hard disk.
- Unpack the archive into a folder of your choice.
- Start the application "XmlConverter.exe".
- Click the "Load an OPC UA XML file" button and select the XML export file:
- Click the "Read NodeIds" button. The XML converter now extracts the accessible name spaces, name IDs and data types.
- Then click the "Save CSV file." button:
- In the dialog that opens you click "Save" to confirm the settings.
The CSV file is now available in the storage location you chose and you can open it with a spreadsheet, for example.
109742903_XML-Konverter_V2_1.zip (22.6 KB)
Detailed information on the topic of OPC UA of the S7-1500 is available in the function manual in Entry ID 59192925.
An application example for creating an OPC UA client in .NET is available in Entry ID 109737901.
- You have a technical question / problem: Ask the Technical Support
- You want to discuss in our forum and exchange experiences with other users
- You want to create CAx data for one or more products
- You would like to send us feedback on this Entry