TIA Portal Openness

Engineering in TIA Portal is powerful, but when you repeat the same steps across 5, 20, or 200 machines—creating projects, adding devices, generating tag tables, importing blocks, building HMI screens, exporting CAx—manual work becomes the bottleneck.

TIA Portal Openness solves exactly that. It’s Siemens’ official Public API that lets you control and automate TIA Portal engineering tasks from your own programs (C#, VB.NET). Think of it as “engineering scripting” for STEP 7 / WinCC: you write code, and TIA does the clicks for you.

What Openness is (in one sentence)

Openness is a .NET API that exposes the TIA Portal object model—projects, devices, PLC programs, HMI objects, libraries, networks, export/import—so you can create or modify them programmatically.


Why Openness matters in real projects

Here are the kinds of jobs Openness is built for:

1. Standardization at scale

If you have a “standard machine template,” Openness can:

  • create a new project,
  • insert a PLC/HMI/drive set,
  • configure networks,
  • create tag tables and blocks,
  • compile and save,
  • export deliverables.

That’s a “button click” for a whole line.

2. Engineering workflows driven by external data

Because Openness is code, it’s easy to connect it to:

  • CSV/Excel BOMs,
  • EPLAN exports (AML),
  • PLM/Teamcenter,
  • your in-house configurator.

Openness Import/Export supports XML (SimaticML) for PLC/HMI objects and AML for CAx hardware exchange.

3. Automated round-trip engineering

You can export hardware to AML, modify it in ECAD, and re-import while keeping stable AML GUIDs for real hardware objects.

4. Quality and testing

Openness also exposes Test Suite services (Style Guide, Application Test, System Test) to automate checks outside the UI.


Prerequisites & setup

Before you code anything, your PC needs the right pieces.

Software requirements

To run Openness apps:

  • A TIA Portal product installed (e.g., STEP 7 Professional or WinCC Professional).
  • The TIA Portal Openness option installed alongside it.

To develop Openness apps:

  • Visual Studio 2017+ with .NET Framework 4.8 SDK.
  • Solid C#/VB.NET skills and TIA Portal user knowledge.

Installation

Openness is installed through the normal TIA installer:

  • In the setup, tick “TIA Portal Openness” under Options.
  • Versions install side-by-side, and must match your TIA major version.

Permissions, groups, certificates

Openness uses IPC remoting channels, so Windows rights matter.
For some API areas (especially CAx Export/Import), Siemens allows either:

  • Membership in the “Siemens TIA Openness” Windows group, or
  • A properly signed Openness certificate.

The Openness object model (how you “see” TIA in code)

Openness mirrors the TIA Portal tree in objects. At a high level:

TIA Portal instance → Projects → Devices → PLC/HMI software → Blocks/Tags/Screens/Libraries

Examples from the manual:

  • Enumerate or find devices from a Project.
  • Enumerate or find PLC blocks from PlcSoftware.
  • Work with HMI Unified runtime objects (alarms, logs, tags, screens, etc.).

The key mental model: everything you’d click in TIA is an object you can browse, read, create, or edit in code.


Typical Openness workflow (pattern you’ll use every time)

Even if your task differs, most Openness programs follow the same steps:

  1. Start / connect to TIA Portal
  2. Open or create a project
  3. Navigate to the target (device, PLC software, HMI, library…)
  4. Read / create / modify objects
  5. Compile / export if needed
  6. Save and close

Siemens provides example code sections for each of these tasks.


Versioning & long-term stability tips

TIA updates can break hard-coded assumptions, so Siemens explicitly recommends:

  • Keep API DLL paths version-agnostic (Portal V* instead of Portal V19).
  • Keep file extensions configurable (*.ap* instead of *.ap19).
  • Open projects with OpenWithUpgrade() for forward compatibility.

If you plan to ship an internal tool for years, design it to survive version jumps.


Security notes (don’t skip)

Siemens warns that Openness can cause data loss or downtime if misused. Their guidance includes:

  • Install your tool with admin rights, run it as user.
  • Avoid dynamic DLL loading from user folders.
  • Be careful with passwords (handled in your code, your responsibility).

So: treat Openness like a “robot engineer”—powerful, fast, but it will do exactly what you tell it.


Example application: “Auto-Tagger” — generate PLC tag tables from CSV

Here’s a super common Openness use case you can adapt for Antomatix/ChewieIoT projects:

Goal:
You keep I/O lists or power/diagnostic signals in a CSV.
The tool:

  1. Opens a TIA project,
  2. Finds your PLC,
  3. Creates a tag table per subsystem,
  4. Creates tags automatically,
  5. Saves the project.

CSV example

Tags.csv

TableName,TagName,DataType,Address,Comment
Power,AvgPower_kW,Real,DB10.DBD0,Average power
Power,PeakPower_kW,Real,DB10.DBD4,Peak power
Diag,Motor1_Overload,Bool,I0.3,OL input
Diag,Motor1_Running,Bool,Q0.1,Run feedback

C# skeleton (Openness Console App)

Note: Namespaces and some calls vary slightly by TIA version; this is a clean starter structure you’ll flesh out for your exact PLC target.

using System;
using System.IO;
using System.Linq;
using Siemens.Engineering;
using Siemens.Engineering.HW;
using Siemens.Engineering.SW;
using Siemens.Engineering.SW.Tags;

class AutoTagger
{
    static void Main()
    {
        // 1) Start TIA Portal in background (no UI)
        var tia = new TiaPortal(TiaPortalMode.WithoutUserInterface);

        // 2) Open project (use OpenWithUpgrade for version stability)
        var projectPath = new FileInfo(@"D:\TIAProjects\MyLine.ap19");
        var project = tia.Projects.OpenWithUpgrade(projectPath);

        // 3) Find PLC device
        Device plcDevice = project.Devices.Find("PLC_1"); // manual shows Find() pattern
        // If your PLC is inside device groups, navigate groups first. :contentReference[oaicite:16]{index=16}

        // 4) Get PlcSoftware from device
        PlcSoftware plcSoftware = plcDevice.DeviceItems
            .Select(di => di.GetService<PlcSoftware>())
            .FirstOrDefault(sw => sw != null);

        if (plcSoftware == null)
            throw new Exception("No PLC software found in PLC_1");

        // 5) Read CSV and build tag tables
        var lines = File.ReadAllLines(@"D:\Temp\Tags.csv").Skip(1);

        foreach (var line in lines)
        {
            var p = line.Split(',');
            string tableName = p[0];
            string tagName   = p[1];
            string dataType  = p[2];
            string address   = p[3];
            string comment   = p[4];

            // Find or create tag table
            PlcTagTable table = plcSoftware.TagTableGroup.TagTables
                .Find(tableName)
                ?? plcSoftware.TagTableGroup.TagTables.Create(tableName);

            // Create tag if not exists
            if (table.Tags.Find(tagName) == null)
            {
                PlcTag tag = table.Tags.Create(tagName, dataType);
                tag.LogicalAddress = address;
                tag.Comment = comment;
            }
        }

        // 6) Save and close
        project.Save();
        project.Close();
        tia.Dispose();

        Console.WriteLine("Tags generated successfully.");
    }
}

Where this example maps to Siemens docs

  • Device access / Find / Enumerate patterns: shown in “Functions on devices.”
  • PLC blocks & software navigation follow the same collection patterns as blocks enumeration.
  • If you later want to export the tags/blocks, use XML/SimaticML export/import (manual chapter 6).

Easy upgrades to this tool

Once you’ve got the “Open project → Find PLC → Edit objects” loop working, scaling is straightforward:

  • Auto-create standard blocks
    Import SCL/LAD/DB blocks from XML into each new project.
  • Auto-build hardware layout
    Create devices using TypeIdentifiers (same CreateWithItem pattern used across hardware).
  • Auto-compile & report errors
    Use compile/download services and parse CompilerResult / TransferResult objects.
  • ECAD round-trip
    Export AML → modify in EPLAN → import back.

Wrap-up

TIA Portal Openness is basically industrial DevOps for Siemens engineering:

  • you stop repeating UI actions manually,
  • your standards become code,
  • projects are generated consistently,
  • and engineering time drops hard.

Given your automation + dashboard ecosystem, Openness is a perfect fit for:

  • machine template generators,
  • library/faceplate deployment tools,
  • PLC tag/DB auto-builders,
  • and ECAD/IIoT round-trip workflows.

Siemens TIA Portal V21 (2025) – What’s New –

Home » Posts » TIA Portal Openness: Automating Siemens Engineering with an API

By admin

Related Post

Leave a Reply