Setting up OPC-UA with TIA Portal
Why OPC-UA?
OPC-UA is an industry standard protocol that allows for full customisation of which tags can be read by our PLAATO Edge. This guide explains how to set it up through TIA Portal.
Prerequesites
CPU with OPC UA Capability
- S7-1500 or ET 200SP CPU with firmware that supports OPC UA (typically v1.8+).
- S7-1200 with firmware v4.4 or higher (certain hardware revisions only).
TIA Portal Version
- For S7-1500 OPC UA, TIA Portal V14 SP1 or later is usually enough (V15+ recommended).
- For S7-1200 OPC UA, TIA Portal V15+ (or higher) is typically required.
Hardware Configuration
- Make sure the CPU is added to your TIA Portal project and your device/firmware versions match.
- The CPU’s IP address must be configured.
Licensing (Mostly for S7-1200)
- Some S7-1200 models/family might require an additional license for OPC UA or have limitations on tag counts.
- S7-1500 generally includes OPC UA server functionality out of the box (though certain advanced features or specific runtime licenses can vary).
Step 1: Create or Open Your TIA Portal Project
- Open TIA Portal and either create a new project or open an existing one.
- Make sure your PLC (S7-1500 / S7-1200) is already added under Devices & Networks.
Step 2: Check Firmware and Network Settings
- In the Project Tree, double-click your PLC under Devices & Networks.
- Go to the Properties of the CPU (click the CPU itself in the device configuration).
- Under General → Firmware Details, confirm your firmware version meets the OPC UA requirement.
- Under Ethernet Interfaces, set (or verify) the IP address and Subnet Mask. This will be the endpoint for OPC UA communication.
Step 3: Enable and Configure the OPC UA Server
- In the CPU’s Properties panel, find OPC UA (the exact location can differ depending on TIA Portal version; often under Runtime Licenses or OPC UA directly).
- Enable OPC UA Server by checking the box or switching to “Enabled.”
- Specify the TCP port (default is 4840 for OPC UA).
- Choose Security Policies and Modes (None, Basic128Rsa15, Basic256, Basic256Sha256, etc.). "None" is currently only supported by the Edge.Endpoints & Security:
Step 4: Define the Tags/Data for OPC UA Access
OPC UA clients will browse tags based on symbolic or optimized data blocks. Typically:
- Open your PLC Program Blocks in TIA Portal.
- Create or identify data blocks (DBs) and variables you want to expose via OPC UA.
- If using Optimized Blocks (the default in TIA Portal for S7-1200/1500), the symbolic names become your OPC UA node names.
- Mark Data as “Accessible from OPC UA”:
- In TIA Portal V16+, open the data block’s properties. Look for Attributes or Access settings.
- Tick the box for “Accessible from HMI/OPC UA” or a similar setting.
- Alternatively, for older TIA versions, you might have to define the Symbol Attribute = ‘Symbolic Access Only’ or specifically set up DB for external access.
- If you have multiple tags, keep them organized in relevant data blocks.
Step 5: Compile and Download to the PLC
- Compile your project (no errors or warnings ideally).
- Download the hardware configuration and program to your S7-1500 or S7-1200 CPU.
- TIA Portal will handle generating and transferring the OPC UA certificate if you enabled OPC UA.
- After the download, your CPU should restart or briefly go into STOP mode, then back to RUN with OPC UA active.
Step 6: Test the OPC UA Server Connection
With the server now running on the PLC:
- Use an OPC UA client (e.g., Unified Automation UaExpert, Prosys OPC UA Client, Ignition, or another 3rd-party tool).
- Connect to the PLC by specifying:
- Endpoint URL:
opc.tcp://[IP_ADDRESS_OF_PLC]:4840
(assuming default port) - Security Policy & Mode matching what was configured in TIA Portal.
- User Credentials if you set up user authentication.
- Endpoint URL:
- If certificate validation is required, you may need to exchange certificates or trust the client certificate in the PLC’s trust list. TIA Portal can handle that if the client certificate is imported.
- Once connected, browse the Namespace or Address Space. You should see your CPU’s data blocks and variables.
- Read or write values to confirm functionality.
Step 7: Send us the tag data
Once everything is configured and tested, you might want to share your tag list with colleagues, clients, or keep it for documentation. TIA Portal lets you export tag data as a CSV or Excel file. The exact steps can vary slightly by TIA Portal version, but generally:
- In the Project Tree, expand PLC Tags or PLC Data Types (depending on your setup).
- Right-click on the tag table or data block and select Export (or Save as).
- Choose CSV or Excel format (depending on the TIA version and your preference).
- Select a location on your computer to save the file.
- (Optional) You can also export the entire project or selected blocks if you prefer.
- Email the tags to support@plaato.io
Quick Checklist
- Ensure CPU firmware supports OPC UA.
- Enable OPC UA in TIA Portal (CPU Properties → OPC UA).
- Configure Security (port, policies, certificates).
- Select Data (mark DBs/variables accessible via OPC UA).
- Compile & Download to PLC.
- Use an OPC UA Client to test (import/trust certificates if needed).
- Send Tags to PLAATO