ACS

IEC 611313 and PLC Programming Quality: Why Code Structure Determines Long-term Automation ROI | ACS Engitech

IEC 611313 and PLC Programming Quality: Why Code Structure Determines Long-term Automation ROI

ACS Engitech Pvt. Ltd.
August 10, 2026

When it comes to industrial PLC programming, iEC 611313: The Standard That Unified PLC Programming

PLC platforms historically used manufacturer specific programming environments and conventions. IEC 611313 created a common language framework that improved portability of engineering knowledge, even though vendor implementations and project structures still differ.

IEC 611313 was first published in 1993 and reached its fourth edition in 2025. The current edition specifies Structured Text, Ladder Diagram, and Function Block Diagram. Sequential control methods such as SFC/GRAPH remain widely used in industrial engineering environments:

Language

Type

Best For

Ladder Diagram (LD)

Graphical

Discrete logic, relay replacement, Boolean conditions and motor control sequences; most familiar to electricians

Function Block Diagram (FBD)

Graphical

Continuous signal processing, PID loops, analogue control; intuitive for process engineers

Structured Text (ST)

Textual

Mathematical calculations, string handling, complex algorithms, data manipulation; similar to Pascal/C

Sequential control (SFC / GRAPH)

Graphical method

Step based machine cycles and batch sequences, subject to the selected engineering platform

Legacy language note

Textual

Instruction List is a legacy IEC 611313 language and should not be selected for new projects

Siemens TIA Portal supports LAD, FBD, and SCL/Structured Text, with GRAPH available for sequential control in supported editions. Available languages and features depend on the controller and software licence.

Program Organization in Siemens TIA Portal: FCs, FBs, and DBs

The fundamental building blocks of a well-structured Siemens PLC program are:

Block Type

Description and Use

OB (Organization Block)

Entry points called by the PLC operating system: OB1 (main cyclic scan), OB35 (cyclic interrupt, e.g., every 100ms for PID), OB40 (hardware interrupt), OB80OB90 (fault handling)

FC (Function)

Reusable code block with no static memory. Called with input parameters, returns output. Used for pure calculations, conversions, and stateless logic.

FB (Function Block)

Reusable code block with a dedicated Instance Data Block (IDB) that retains state between scans. Used for equipment control (motor, valve, drive) where persistent state variables are needed.

DB (Data Block)

Data storage: Global DBs for plantwide shared data; Instance DBs created automatically for each FB instance; optimized access mode for network efficient data access.

The Equipment Module Pattern: How ACS Engitech Structures PLC Code

A key principle in maintainable PLC programming is the Equipment Module pattern: every physical piece of equipment (motor, pump, valve, drive) is controlled by a dedicated Function Block (FB) that encapsulates all logic for that equipment:

  • Input pins: Run command (from sequence logic), Remote/Local mode, Fault reset signal
  • Output pins: Contactor command (to MCC), VFD speed setpoint, Status signals (running, tripped, in fault)
  • Internal state machine: Idle → Starting → Running → Stopping → Fault, with timers for start/stop delay and inrush protection
  • Instance DB: Stores current state, accumulated runtime hours, start count, last fault code

The benefit: every motor in the plant is controlled by the same FB. To add a new motor, the engineer instantiates the FB once and connects three wires. To change start/stop behaviour for every motor, the engineer modifies the FB once. To diagnose any motor, they know exactly where to look in the program.

PID Control in TIA Portal: The PID_Compact Instruction

For continuous process control (temperature, pressure, level, flow), Siemens TIA Portal provides the PID_Compact instruction block, a prebuilt PID controller with features beyond a basic three term controller:

  • Autotuning: PID_Compact includes a built-in autotuning function that performs a step response test and automatically calculates P, I, and D parameters
  • Anti wind up: Integral action is halted when the output reaches saturation (limits), preventing integral windup that causes overshoot after output limits are released
  • Bump less transfer: Manual to automatic mode transfer is bump less, the output does not jump when the operator switches from manual to auto
  • Alarm integration: High/low deviation alarms and manual override signals are integrated into the standard block interface

Version Control and Commissioning Documentation

PLC program version control is the practice most commonly neglected in industrial automation projects , and the one that causes the most long-term maintenance problems.

TIA Portal provides project comparison, libraries, server based collaboration options, and automation interfaces through TIA Portal Openness. Additional version management tools may be used where they are validated for the engineering workflow. At minimum, every program release should be:

  • Tagged with a version number and date in the program header
  • Accompanied by a change log describing what was modified and why
  • Backed up to offline storage before any modification is made to the live system
  • Compared to the previous version (TIA Portal's 'Compare Devices' function) before deployment to verify only intended changes were made

Common PLC Programming Mistakes That Create Maintenance Problems

Mistake Consequence
Using absolute addresses (Q0.0, I1.3) instead of symbolic tag names Programmer forgets which address is which; maintenance engineer cannot read code
All logic in OB1 without FBs or FCs One enormous, unstructured program impossible to navigate or reuse
Unused tags, obsolete networks, and disabled logic left in the production project Confuses future engineers, complicates testing, and can make documentation misleading
Timer and counter values hardcoded, not in DBs Change requires program modification; cannot be adjusted from HMI by operator
No error handling for communication faults PLC continues commanding equipment on last known values when network fails

Conclusion: PLC Code Is an Engineering Document, Not a Black Box

The PLC program that runs your plant is not a proprietary secret that only your automation integrator should be able to read. It is an engineering document, the definitive description of how your process is controlled, that your maintenance team, your next integrator, and your engineering management should be able to read and understand.

Structured, well documented, standard compliant PLC code is the difference between an automation investment that serves your plant for 15 years and one that creates a dependency on a single engineer indefinitely.

Suggested social hashtags: #PLCProgramming #IEC611313 #TIAPortal #Siemens #StructuredText #LadderDiagram #IndustrialAutomation #STEP7 #ACSEngitech

About ACS Engitech Pvt. Ltd.

Since 2009, ACS Engitech has delivered automation solutions across manufacturing sectors. As a Siemens Channel Partner, we provide comprehensive automation systems including PLC panels, SCADA implementation, and remote monitoring solutions. Our 6000 sq. ft. manufacturing facility in Ahmedabad serves clients across India with ISO 9001-certified control panel solutions.

Take Action Today

Ready to optimize your facility? Connect with us to discuss how automation can improve your operations and address critical demands.

Connect With Us