Skip to content

TIA Openness Workflow

This repo treats tia/exports as the editable PLC source tree. Folder names below that directory are mirrored into TIA Portal block groups or PLC data type groups when sources are generated.

Example layout:

tia/exports/
  00_SYSTEM/
  01_PLATFORM/
  02_INTERFACES/
  03_CORE/
  04_POWER_MANAGEMENT/
  05_PROPULSION/
  06_ALARMS/
  07_HMI/
  08_SIMULATION/
  09_DIAGNOSTICS/
  10_VALIDATION/
  99_LEGACY/

Existing demonstration blocks are kept in 99_LEGACY until they are refactored into the numbered architecture.

Supported source files:

  • .scl for FB/FC sources
  • .db for data block sources
  • .udt for PLC data type sources

Warning

Shutdown sequence must complete before restart.

Deploy to a TIA Portal project:

.\tools\tia-openness\deploy.ps1 -Project "C:\Path\Project.ap20"

The wrapper infers the Openness API from the project extension. A .ap19 project uses Portal V19, a .ap20 project uses Portal V20, and so on. If the CLI was previously built for another version, it is rebuilt automatically against the matching Siemens.Engineering.dll.

You can override the detected version:

.\tools\tia-openness\deploy.ps1 -Project "C:\Path\Project.ap19" -TiaVersion V19

If the project contains more than one PLC software target, list available PLCs first:

.\tools\tia-openness\list-plcs.ps1 -Project "C:\Path\Project.ap20"

Then deploy to a specific PLC:

.\tools\tia-openness\deploy.ps1 -Project "C:\Path\Project.ap20" -Plc "PLC_1"

For identical code on multiple PLCs, configure pcs.config.json:

{
  "projectPath": "C:\\Path\\Project.ap20",
  "exportsRoot": "tia\\exports",
  "plcs": ["PLC_1", "PLC_2"]
}

Then deploy the same sources to every configured PLC:

.\tools\tia-openness\deploy-all.ps1

Useful switches:

  • -NoCompile imports and generates blocks without compiling.
  • -Build rebuilds the CLI executable before running.
  • -TiaVersion V19 or -ApiPath "..." overrides automatic Openness API detection.

Notes:

  • The wrapper builds with the .NET Framework compiler included with Windows, so a .NET SDK is not required.
  • TIA Openness requires the Windows user to be in the Siemens TIA Openness group. Log out and back in after adding the user.
  • On the first Openness run, TIA Portal may show a trust prompt for the executable. Open the project manually first if you need to approve prompts interactively.