← Back to Blog

Plc Programming

39 articles

SIMATIC AX XLad and Structured Text: One Function, Two Languages

August 21, 2026 — Move one Boolean pump permissive from Structured Text to SIMATIC AX XLad, keep its typed caller stable, inspect generated ST, and verify the result with S7, LLVM, and AxUnit.

Does SIMATIC AX Already Support the S7-1200 G2 CPU 1214C?

August 12, 2026 — A hands-on SIMATIC AX investigation of hardware support package 4.8, catalog 2510.17, CPU 1214C discovery, unsupported package overrides, and verified hardware compilation.

SIMATIC AX Tank Control Logic: From Empty Blocks to Tested Behavior

July 31, 2026 — Build readable SIMATIC AX tank control logic with analog scaling, protected Manual and Automatic modes, pump priming, fault recovery, and AxUnit tests.

SIMATIC AX Tank Demo: Building the Software Skeleton

July 21, 2026 — Build a compiling SIMATIC AX software skeleton with named UDTs, mapping functions, function block instances, global data, and a clear main-program scan order.

SIMATIC AX Tank Demo: GitHub, TIA Selection Tool, and Hardware Configuration

July 10, 2026 — Follow a SIMATIC AX tank demo from GitHub and TIA Selection Tool to a compiling S7-1200 G2 hardware configuration and I/O mapping.

SIMATIC AX Tank Control Demo: Requirements and I/O Baseline

July 7, 2026 — A practical tank-control demo starts with a process diagram, requirements review, operating modes, and a first I/O baseline. Article 19 of the Studying SIMATIC AX series.

Function Block Encapsulation in TIA Portal - Clear Interfaces and Private State

July 2, 2026 — How to draw the boundary around a TIA Portal function block: visible Inputs, Outputs, InOut interfaces, private Static and Temp state, diagnostics, and safer changes.

Siemens AX Libraries: Timers Are Packages, Not Magic Blocks

June 24, 2026 — Timer libraries in SIMATIC AX explained from a TIA Portal engineer point of view: packages, namespaces, documented timer function blocks, and why elapsed timer behavior needs runtime proof. Article 18 of the Studying SIMATIC AX series.

How I Decide What Belongs in a TIA Portal UDT

June 22, 2026 — A practical way to decide what belongs in a TIA Portal UDT after the design starts changing: commands, status, hardware IO, child interfaces, communication data, private state, and structure-change risk.

Initialization Patterns in SIMATIC AX — Startup Task and ProgramCycle

June 17, 2026 — Startup, ProgramCycle, and first-cycle initialization patterns explained from a TIA Portal engineer studying AX, with clear boundaries between Siemens task-library documentation and local build/test evidence. Article 17 of the Studying SIMATIC AX series.

Data Types and UDTs - The Type System in TIA Portal

June 15, 2026 — Why data types in TIA Portal are part of the engineering contract: elementary types, STRUCT, ARRAY, UDTs, DB fields, FB interfaces, structured PLC tags, and external boundaries such as HMI and OPC UA. Article 7 of the Studying TIA Portal series.

PLC Tags in TIA Portal and the Hardware Address Space

June 1, 2026 — Why PLC tags should be treated as a readable hardware vocabulary, not the whole software architecture: I/Q/M/DB spaces, IO mapping, symbolic names, and clean ownership boundaries. Article 6 of the Studying TIA Portal series.

Error Handling in SIMATIC AX - TRY/CATCH from a TIA Portal Lens

June 1, 2026 — The current tested SIMATIC AX ST compiler rejects general TRY/CATCH, so expected PLC fault conditions still need deterministic guard/report/recover logic, safe defaults, and alarm/status reporting. Article 16 of the Studying SIMATIC AX series.

Data Blocks in TIA Portal — Why TIA Treats Data as First-Class Objects

June 1, 2026 — Why Data Blocks in TIA Portal are more than storage: global DBs, instance DBs, commissioning diagnostics, start values, retention, download discipline, and the ownership rules that keep shared data readable. Article 5 of the Studying TIA Portal series.

Where Codesys Actually Runs — Runtime Targets and the Hardware Story

May 29, 2026 — A TIA Portal engineer's walk through Codesys runtime targets — why the IDE and the runtime are separate products, the free Control Win SL soft PLC, the €55 Raspberry Pi runtime, hard-real-time RTE, the OEM-embedded runtime ecosystem, and what the licensing model means in practice.

Configuration, Tasks and Programs — The SIMATIC AX Scan Cycle

May 27, 2026 — The AX scan cycle explained from the configuration.st file — what CONFIGURATION, TASK, and PROGRAM actually mean, how task priorities and interruption work, the declarative TASK→PROGRAM binding pattern versus calling OBs from OB1, multi-task patterns including a measured struct atomicity test on PLCSIM Advanced V8.0, and the complete mapping back to TIA Portal architecture. Article 15 of the Studying SIMATIC AX series.

Function Blocks vs Functions in TIA Portal — Code, State, and the Instance

May 25, 2026 — The structural difference between Function Blocks (FB) and Functions (FC) — code that remembers vs code that forgets — and how the instance data block model carries state across calls. Includes a cross-platform comparison of how Siemens TIA Portal, Beckhoff TwinCAT 3, Codesys, and SIMATIC AX implement the same IEC 61131-3 split, plus a worked example of multi-instance FB design and the two Siemens download-without-reinitialization mechanisms (per-DB memory reserve since V12, V21 "Keep actual values" for S7-1500). Article 4 of the Studying TIA Portal series.

Codesys ST vs Siemens SCL — The Language Differences That Catch You First

May 21, 2026 — A TIA Portal engineer walks the Codesys ST language surface from a TIA SCL point of view — the `#` prefix and the `stat` naming convention, the two-pane editor, the VS Code question, data-type deltas in both directions, the OOP keyword surface, Actions as first-class callable sub-routines, RETAIN and PERSISTENT alongside the lived TIA snapshot-workflow gap, pragmas and attributes, and per-Action language mixing. Article 3 of the Studying Codesys series.

The apax CLI in SIMATIC AX — Every Command Worth Knowing

May 19, 2026 — A walk through every apax command worth knowing — create, install, build, test, dm, and the supporting commands around the edges. With honest notes on the rough edges of the Device Manager subsystem from hands-on use of apax CLI v4.3.0. Article 14 of the Studying SIMATIC AX series.

Organization Blocks — TIA Portal's Execution Model

May 18, 2026 — A working engineer's tour of TIA Portal's execution model through Organization Blocks — OB1, OB100, cyclic and hardware interrupts, diagnostic OBs — including a cross-platform comparison of how Siemens, Beckhoff, Codesys, Rockwell, and SIMATIC AX handle the main scan cycle. Article 3 of the Studying TIA Portal series.

Inside a Codesys Project — Devices, Applications, POUs, and the Habits Worth Unlearning

May 15, 2026 — A TIA Portal engineer studying Codesys steps inside the IDE — Devices view vs POUs view, Applications, Task Configuration, per-application Library Manager, six programming-language editors, and the structural habits a TIA engineer has to unlearn. Article 2 of the Studying Codesys series.

Variables and the Type System in SIMATIC AX

May 11, 2026 — How SIMATIC AX organizes variables and types for TIA Portal engineers — VAR_INPUT/VAR_OUTPUT/VAR sections, VAR_GLOBAL and VAR_EXTERNAL contracts, STRUCT and ENUM patterns, typed literals, and the AT keyword for direct addresses. A practical mapping from TIA Portal mental models to AX text.

Why I'm Studying Codesys — And What a TIA Portal Engineer Actually Sees Looking at the Alternative

May 7, 2026 — A TIA Portal engineer studies Codesys — the IDE/runtime split, who owns CODESYS GmbH, the cost story, where Codesys actually shows up, and the topical arc of the Studying Codesys series.

What a TIA Portal Program Is Actually Made Of — OBs, FBs, FCs and DBs

May 7, 2026 — A working engineer's map of the building blocks of a TIA Portal program — OBs, FBs, FCs, DBs, instances, PLC tags, and types — and what makes TIA's design choices distinctive compared with other PLC platforms. Article 2 of the Studying TIA Portal series.

TempController on a Real Screen — End-to-End AX + WinCC UE Demo

May 6, 2026 — Hands-on walkthrough of connecting a SIMATIC AX function block to a WinCC Unified Elements screen over OPC UA. Pragmas, YAML tags, the V:1$DA$ address quirk, and the full apax build → run loop — with PLCSIM Advanced and Unified Runtime, no TIA Portal GUI involved.

Why I'm Writing a Structured TIA Portal Series — And What You'll Get Out of It

May 4, 2026 — Series kickoff — why I am writing a structured TIA Portal series, the gap between Siemens manuals and engineering judgment, and the five movements that organize the series.

WinCC Unified Elements — Code-Based HMI for TIA Portal Engineers

April 30, 2026 — WinCC Unified Elements explained for TIA Portal engineers — how the new code-based HMI environment works, how it pairs with SIMATIC AX over OPC UA, and what is missing today.

CLASS vs FUNCTION_BLOCK in SIMATIC AX — Explained for TIA Portal Engineers

April 8, 2026 — A deep dive into the two main building blocks of SIMATIC AX — FUNCTION_BLOCK and CLASS. What each one supports, when to use which, and how they fit together in real projects. Written for TIA Portal engineers who already know function blocks.

What Is the Future PLC Programming Tool of Siemens: Simatic AX or TIA Portal?

March 31, 2026 — The question is no longer what tool is more convenient for humans. The question is what tool is more convenient for AI agents. My take on Simatic AX vs TIA Portal.

How to Write Unit Tests in SIMATIC AX — A Step-by-Step Guide for TIA Portal Engineers

March 27, 2026 — A hands-on guide to writing unit tests in SIMATIC AX using AxUnit. Walks through the anatomy of a test file, the reset pattern, assert methods, running tests, and what to test versus what to leave for commissioning.

Unit Testing in SIMATIC AX — I Proved My PLC Code Works Without a PLC

March 25, 2026 — What unit testing is, why TIA Portal engineers should care, and how SIMATIC AX's built-in AxUnit framework lets you verify PLC code automatically — no hardware needed.

SIMATIC AX Project Structure Explained for TIA Portal Engineers

March 17, 2026 — A complete mapping of TIA Portal concepts — OBs, FBs, FCs, DBs, tag tables — to their SIMATIC AX equivalents. The reference guide for PLC programmers making the switch.

Namespaces in SIMATIC AX Explained for TIA Portal Engineers

March 17, 2026 — A deep dive into namespaces — what they are, why TIA Portal does not have them, how to use them in AX, and the mistakes you will make if you think about them with TIA Portal logic.

Two Types of SIMATIC AX Projects — Full AX vs TIA Portal Hybrid

March 11, 2026 — When you run apax create, you face a choice between two fundamentally different project types — full AX engineering or a hybrid with TIA Portal. Here is how they differ and which one to start with.

You Don't Need AX Code IDE — SIMATIC AX Runs From Any VS Code Workspace

March 10, 2026 — SIMATIC AX is fully CLI-driven. You can run apax commands from any terminal inside your normal VS Code workspace — no AX Code IDE required.

SIMATIC AX HMI Design — Siemens Just Filled the Biggest Gap

March 4, 2026 — WinCC Unified Elements brings code-based HMI design to the Simatic AX family — visual and YAML-based screen design in VS Code, with native Git support.

Multi-Instance vs Single-Instance Function Blocks in TIA Portal

December 5, 2025 — Learn why multi-instance function blocks in TIA Portal are better than single-instance for reusable, library-ready PLC code.

Why You Should Avoid Using Merkers (M Bits) in Modern TIA Portal Programs

November 24, 2025 — M bits cause hidden bugs, kill reusability, and make maintenance painful. Here is why DB tags, UDTs, and FBs are the better choice.

Understanding the InOut Interface Pattern in TIA Portal

October 3, 2025 — How to use InOut interfaces with UDTs to create a clean, scalable data architecture for your TIA Portal PLC programs.