Skip to content

PLC Programming Course – Chapter 08: IEC 61131-3 Programming Languages

Published: December 4, 2026 By admin
THE ENGINEERS GROUP | PLC PROGRAMMING COURSE

IEC 61131-3 Programming Languages

Understand the international PLC programming standard and learn Ladder Diagram, Function Block Diagram, Structured Text, Sequential Function Chart and legacy Instruction List. Explore programming concepts with practical industrial examples.

PLC Programming IEC 61131-3 Ladder Logic Function Blocks Industrial Automation

1. Introduction

Programmable Logic Controllers (PLCs) are widely used in industrial automation systems to control machines, production lines, motors, pumps, conveyors and process equipment.

PLCs can be programmed using different programming languages. To create a common programming framework for industrial control systems, the International Electrotechnical Commission (IEC) developed the IEC 61131-3 standard.

IEC 61131-3 defines programming language elements and software structuring concepts used in PLC applications. It helps engineers understand and organize control programs across different automation platforms.

In this chapter, we will understand the major PLC programming languages, their characteristics, applications and practical examples used in industrial automation.

2. What is IEC 61131-3?

IEC 61131-3 is an international standard that specifies programming language syntax and semantics for programmable controllers. It provides a common framework for developing and structuring PLC control programs.

Simple Definition: IEC 61131-3 is an international PLC programming standard that defines programming languages and software organization concepts used in programmable controller applications.

What Does IEC 61131-3 Cover?

Programming Languages

Defines the syntax and programming concepts of PLC languages such as LD, FBD and ST.

Program Organization

Describes software elements used to organize PLC application programs.

Data Types

Defines data types and variable-related programming concepts.

Function Blocks

Provides concepts for reusable program units and control functions.

Why Was IEC 61131-3 Developed?

Different PLC manufacturers historically used different programming methods and software environments. A standardized programming framework helps engineers work with consistent programming concepts and improves program organization.

3. Why is IEC 61131-3 Important?

IEC 61131-3 is important because it provides a recognized framework for developing structured and maintainable PLC programs.

Common Programming Framework

Provides common language concepts for programmable controller applications.

Better Program Structure

Helps organize large control programs into manageable software units.

Code Reusability

Functions and function blocks support reusable programming logic.

Maintenance Support

Structured programs are easier to understand, troubleshoot and maintain.

Multiple Programming Methods

Supports different programming approaches for different control applications.

Engineering Collaboration

Common concepts help automation engineers communicate more effectively.

Important: IEC 61131-3 does not mean that every PLC manufacturer uses identical software, libraries, hardware or project files. Manufacturer-specific features and implementation differences still exist.

4. Overview of PLC Programming Languages

IEC 61131-3 is commonly associated with five programming language types or approaches. Four are widely used in modern PLC programming, while Instruction List is a legacy language removed from the third edition of the standard.

LD – Ladder Diagram

A graphical language based on relay control logic and electrical ladder diagrams.

FBD – Function Block Diagram

A graphical language that connects function blocks to represent control logic.

ST – Structured Text

A high-level textual language used for calculations, conditions and complex logic.

SFC – Sequential Function Chart

A graphical method for representing sequential operations using steps and transitions.

IL – Instruction List

A low-level textual language retained in older PLC systems but removed from the third edition of IEC 61131-3.

Learning Point: Ladder Diagram, Function Block Diagram, Structured Text and Sequential Function Chart are important concepts for modern PLC programming. Instruction List is mainly relevant when studying legacy PLC programs.

5. Ladder Diagram (LD)

Ladder Diagram is a graphical PLC programming language based on electrical relay control circuits. It is one of the most familiar programming methods for industrial technicians and electricians.

Definition: Ladder Diagram represents control logic using graphical contacts, coils and other function elements arranged between two power rails.

Basic Ladder Diagram Elements

ElementSymbol / RepresentationFunction
Normally Open Contact–| |–Logical condition that is true when its associated Boolean variable is TRUE.
Normally Closed Contact–|/|–Logical condition that is true when its associated Boolean variable is FALSE.
Output Coil–( )–Assigns a Boolean result to an output or internal variable.
Set Coil–(S)–Sets a Boolean variable according to the instruction behavior.
Reset Coil–(R)–Resets a Boolean variable according to the instruction behavior.

Example: Motor Start and Stop Logic

A basic motor control program can use a Start push button, Stop push button and motor output. The control logic is commonly implemented with a holding or seal-in contact.

      STOP       START
----|/|----------| |----------------( MOTOR )
                    |
                    |
                 MOTOR
                 --| |--

This is a simplified teaching representation. Actual PLC logic depends on input wiring, stop circuit design, safety requirements and the selected PLC platform.

Advantages of Ladder Diagram

Easy to Understand

Its relay-style representation is familiar to many electrical technicians.

Easy Troubleshooting

Online monitoring can show the state of contacts and logic conditions.

Industrial Applications

Widely used for machine control, interlocks and motor logic.

Visual Logic

Control conditions can be followed through graphical rungs.

Applications of Ladder Diagram

  • Motor Start/Stop Control
  • Conveyor Control Systems
  • Pump Control Logic
  • Machine Interlocking
  • Industrial Alarm Logic
THE ENGINEERS GROUP
UPGRADE YOUR ENGINEERING SKILLS

Mastering PLC Programming and Industrial Automation

Learn PLC programming from fundamentals to industrial applications with this practical engineering eBook. Strengthen your automation knowledge and prepare for technical interviews.

WHAT WILL YOU LEARN?

✓ PLC Fundamentals
✓ Ladder Logic Programming
✓ Digital & Analog I/O
✓ Timers & Counters
✓ Motor Control
✓ Sensors & Industrial Control
✓ PLC Troubleshooting
✓ Industrial Automation
₹1,999 ₹349
SPECIAL OFFER PRICE
✔ Digital eBook
✔ For ITI, Diploma, B.Tech Students & Professionals
✔ Google Drive Download Link Delivery to Registered Gmail After Successful Payment
BUY PLC EBOOK NOW →

Secure Online Payment | Instant Purchase Access

ENGINEERING KNOWLEDGE FOR A BETTER TOMORROW

6. Function Block Diagram (FBD)

Function Block Diagram is a graphical PLC programming language in which control logic is represented by connecting function blocks. Each block performs a specific operation.

Definition: FBD is a graphical programming language that uses interconnected function blocks to represent data flow and control operations.

Common Function Blocks

Function BlockPurposeExample Application
ANDTRUE when all inputs are TRUE.Multiple permissive conditions
ORTRUE when at least one input is TRUE.Multiple start commands
NOTInverts a Boolean input.Logic inversion
TONOn-delay timer.Delayed motor starting
TOFOff-delay timer.Delayed output switching off
CTUCounts upward.Product counting
CTDCounts downward.Remaining quantity calculation

Example: AND Logic Function

Suppose a motor should start only when both the Start Command and Safety Permissive are TRUE. An AND function block can represent this condition.

START COMMAND ─────┐
                  ├── AND ─── MOTOR OUTPUT
SAFETY PERMISSIVE ─┘

Advantages of FBD

Visual Programming

Logic can be represented using connected blocks.

Reusable Functions

Function blocks can be reused in different parts of a project.

Process Control

Useful for timers, counters, mathematical functions and control operations.

Signal Flow

Connections help engineers understand how data moves through the logic.

Applications of FBD

  • Analog Signal Processing
  • PID Control Applications
  • Interlocking and Permissive Logic
  • Timer and Counter Operations
  • Process Automation

7. Structured Text (ST)

Structured Text is a high-level textual PLC programming language. It uses statements and expressions similar to conventional programming languages.

Definition: Structured Text is a textual PLC programming language used to write logical conditions, mathematical calculations, loops and data-processing operations.

Common Structured Text Statements

StatementPurposeExample
IF / THEN / ELSEConditional executionIF Temperature > 80 THEN
CASEMultiple selection conditionsCASE MachineState OF
FORRepeating a block for a defined number of iterationsFOR i := 1 TO 10 DO
WHILERepeating while a condition remains TRUEWHILE Counter < 10 DO
AssignmentAssigning a value to a variableMotorRun := TRUE;

Example: Temperature Control Condition

The following simplified example turns on a cooling output when the measured temperature exceeds 80°C.

IF Temperature > 80.0 THEN
    Cooling_Fan := TRUE;
ELSE
    Cooling_Fan := FALSE;
END_IF;

Example: Analog Scaling Calculation

Structured Text can be used for mathematical calculations. The following example converts a raw input value into an engineering value using linear scaling.

Engineering_Value :=
    ((Raw_Value - Raw_Min) /
    (Raw_Max - Raw_Min)) *
    (Eng_Max - Eng_Min) + Eng_Min;
Programming Note: The example is a simplified formula. A real PLC program should handle data types, division by zero, raw input limits, scaling ranges and manufacturer-specific analog input representation.

Advantages of Structured Text

Mathematical Operations

Suitable for complex calculations and data processing.

Conditional Logic

Supports IF, ELSE and CASE statements.

Loops

Supports iterative operations where appropriate.

Compact Code

Complex operations can often be expressed in fewer lines.

Applications of Structured Text

  • Mathematical Calculations
  • Analog Signal Processing
  • Data Handling
  • Recipe and Batch Processing
  • Complex Control Algorithms

8. Sequential Function Chart (SFC)

Sequential Function Chart is a graphical method used to represent sequential control operations. It organizes a process into steps and transitions.

Definition: SFC represents sequential control logic through steps, transitions and associated actions.

Basic SFC Elements

Step

Represents a stage or operating condition in a sequence.

Transition

Defines the condition required to move from one step to another.

Action

Defines the operation associated with a step.

Branch

Represents alternative or parallel sequence paths.

Example: Automatic Tank Filling Sequence

Step 1 – IdleSystem waits for the Start Command.
Transition 1Start Command becomes TRUE.
Step 2 – FillingInlet valve opens and the tank begins filling.
Transition 2High-level sensor becomes TRUE.
Step 3 – Filling CompleteInlet valve closes and the system completes the filling stage.

Advantages of SFC

  • Clearly represents sequential processes.
  • Helps organize machine operating sequences.
  • Supports complex step-based operations.
  • Makes process sequence easier to understand.

Applications of SFC

  • Automatic Filling Machines
  • Batch Processing Systems
  • Packaging Machines
  • Sequential Motor Operations
  • Automatic Production Lines
Technical Note: SFC is a graphical method for representing sequential behavior and organizing actions. The actual execution details depend on the PLC environment and its implementation.

9. Instruction List (IL) – Legacy Language

Instruction List was a low-level textual PLC programming language that used mnemonic instructions. It was included in earlier editions of IEC 61131-3.

Important: Instruction List was removed from the third edition of IEC 61131-3. It should be treated as a legacy programming language when studying older PLC systems and existing programs.

Characteristics of Instruction List

  • Uses short mnemonic instructions.
  • Represents logic in a sequential textual format.
  • Can be found in some older PLC applications.
  • Requires familiarity with instruction-level programming.

Illustrative Legacy Instruction List Example

LD     Start_Button
ANDN   Stop_Button
ST     Motor_Output

This is an illustrative legacy-style example. Exact syntax, instruction names and execution behavior depend on the PLC platform and programming environment.

10. Comparison of PLC Programming Languages

Different PLC programming languages are suitable for different types of control applications. The following table summarizes their general characteristics.

LanguageTypeMain UseTypical Strength
LDGraphicalRelay logic and machine controlFamiliar visual logic
FBDGraphicalFunction-based controlVisual function connections
STTextualCalculations and complex logicFlexible textual programming
SFCGraphical sequence methodSequential processesClear process sequencing
ILTextual – LegacyOlder PLC programsLow-level mnemonic instructions

Which Language Should You Learn First?

For Beginners

Start with Ladder Diagram because it introduces basic contacts, coils and control logic visually.

For Process Control

Learn Function Block Diagram for interconnected function blocks and control operations.

For Advanced Logic

Learn Structured Text for calculations, data handling and complex conditions.

For Sequential Machines

Study SFC concepts for step-by-step machine and process sequences.

11. How to Choose the Right PLC Programming Language

Selecting a PLC programming language depends on the application, complexity of control logic, engineering requirements and the programming tools supported by the PLC platform.

Understand the Application Identify whether the task involves machine control, process control, calculations or sequential operations.
Check PLC Platform Support Confirm which languages and programming features are supported by the selected PLC and software.
Evaluate Logic Complexity Choose a language that makes the control logic clear and maintainable.
Consider Maintenance Requirements Select a programming approach that the engineering and maintenance team can understand and troubleshoot.
Follow Project Standards Follow the approved programming guidelines and documentation requirements of the project.

12. Practical Industrial Examples

Example 1: Conveyor Motor Control

A conveyor motor can be controlled using Ladder Diagram. The logic may include a Start Command, Stop Command, motor overload status and motor output.

Typical Logic Conditions: Motor operation is permitted only when the required start, stop and protection conditions are satisfied.

Example 2: Tank Level Monitoring

Function Block Diagram can be used to process level signals, compare values with setpoints and generate control commands.

Typical Application: A level measurement is compared with the required operating limits to control a pump or valve.

Example 3: Temperature Calculation

Structured Text can perform calculations and conditional operations based on temperature measurements.

IF Temperature > High_Limit THEN
    High_Temperature_Alarm := TRUE;
ELSE
    High_Temperature_Alarm := FALSE;
END_IF;

Example 4: Automatic Filling Sequence

Sequential Function Chart concepts can represent an automatic filling process using Idle, Filling and Complete steps.

Example 5: Product Counting

A counter function block can count products detected by a proximity sensor on a conveyor. When the preset count is reached, the PLC can generate a batch-complete signal.

13. PLC Program Organization

A well-organized PLC program is easier to understand, test, troubleshoot and maintain. IEC 61131-3 includes software organization concepts that support structured programming.

Configuration

Represents the overall software configuration and resources of a programmable controller system.

Resource

Represents the processing environment in which programs and tasks are executed.

Task

Controls when and how program execution is scheduled.

Program

Contains the main application logic and can use functions and function blocks.

Function

Performs a defined operation and returns a result.

Function Block

Provides reusable logic with internal state that can be retained between executions as defined by its implementation.

Function vs Function Block

FeatureFunctionFunction Block
Return ValueReturns a resultCan provide outputs through its interface
Internal StateDoes not retain instance state in the same way as a function blockCan maintain internal state
InstanceNormally called by its nameUses an instance
Typical ExampleMathematical calculationTimer or counter function block
Practical Example: TON is a common timer function block. A program creates and uses a TON instance to manage an on-delay timing operation.

14. PLC Manufacturers and Programming Environments

Different PLC manufacturers provide their own programming environments. These tools support PLC configuration, programming, simulation, diagnostics and online monitoring.

ManufacturerCommon PLC PlatformProgramming Environment
SiemensS7-1200 / S7-1500STEP 7 / TIA Portal
Rockwell AutomationCompactLogix / ControlLogixStudio 5000 Logix Designer
Mitsubishi ElectricFX / iQ-F / iQ-RGX Works
OmronCP / CJ / NX SeriesSysmac Studio / CX-Programmer
Schneider ElectricModicon PLCsEcoStruxure Control Expert
Remember: Programming language availability, syntax, libraries and features vary by PLC model and software version. Always consult the manufacturer’s documentation for the selected controller.

15. PLC Programming Best Practices

Use Meaningful Variable NamesChoose clear names such as Motor_Start, Tank_Level and High_Temperature_Alarm.
Organize the ProgramDivide large applications into logical program sections and reusable functions.
Add CommentsDocument important logic, operating conditions and engineering assumptions.
Use Consistent NamingFollow a consistent naming convention for inputs, outputs, internal variables and function blocks.
Test Before CommissioningUse suitable simulation, testing and verification procedures before operating equipment.
Follow Safety RequirementsDo not rely on ordinary PLC logic as a replacement for required safety-rated systems.
Maintain BackupsKeep approved program backups and document revisions.
Safety Warning: PLC programming changes can affect industrial machinery and process equipment. Follow approved procedures, risk assessments, isolation requirements and safety validation before making changes to a live plant.

💬 NEED GUIDANCE IN PLC?

Contact THE ENGINEERS GROUP for eBook details, course information and learning support.

MESSAGE US ON WHATSAPP

16. PLC Programming Interview Questions and Answers

Prepare for PLC programming interviews with these important questions based on IEC 61131-3 and industrial automation.

Q1. What is IEC 61131-3?

IEC 61131-3 is an international standard that defines programming language syntax and semantics for programmable controllers.

Q2. What is the main purpose of IEC 61131-3?

Its purpose is to provide a common framework for PLC programming languages and software organization.

Q3. What is Ladder Diagram?

Ladder Diagram is a graphical PLC programming language based on relay control logic.

Q4. What is Function Block Diagram?

FBD is a graphical language that uses interconnected function blocks to represent control operations.

Q5. What is Structured Text?

Structured Text is a high-level textual PLC programming language used for calculations, conditions and complex logic.

Q6. What is Sequential Function Chart?

SFC is a graphical method used to represent sequential operations through steps, transitions and actions.

Q7. What is Instruction List?

Instruction List is a legacy textual PLC programming language that uses mnemonic instructions. It was removed from the third edition of IEC 61131-3.

Q8. Which PLC programming language is similar to relay logic?

Ladder Diagram is based on relay control logic and is commonly used for machine control applications.

Q9. Which language is suitable for complex mathematical calculations?

Structured Text is generally suitable for complex calculations and data-processing operations.

Q10. What is a function block?

A function block is a reusable program unit that can maintain internal state and provide outputs through its interface.

Q11. What is the difference between a function and a function block?

A function returns a result and does not retain instance state in the same way as a function block. A function block uses an instance and can maintain internal state.

Q12. What is a TON timer?

TON is an on-delay timer function block. Its output becomes TRUE after the input has remained TRUE for the preset time.

Q13. What is the purpose of an SFC transition?

A transition defines the condition required for the sequence to move from one step to another.

Q14. What is a PLC task?

A task controls the scheduling and execution of programs within a PLC resource.

Q15. What is a PLC program?

A PLC program contains application logic that performs the required control operations.

Q16. Why are comments important in PLC programming?

Comments explain program logic and help engineers understand, troubleshoot and maintain the application.

Q17. What is the advantage of Ladder Diagram?

It provides a familiar graphical representation of control logic and is useful for troubleshooting industrial control systems.

Q18. What is the advantage of Function Block Diagram?

It provides a visual representation of interconnected functions and is useful for control and signal-processing applications.

Q19. Can different PLC programming languages be used in one project?

Many PLC environments support multiple programming languages within the same project, depending on the platform and its capabilities.

Q20. Why should PLC programs be tested before commissioning?

Testing helps verify the intended logic, identify errors and reduce the risk of unexpected equipment behavior during commissioning.

FREE 100 PLC INTERVIEW Q&A PDF DOWNLOAD

Download your free PLC learning material.

📥 DOWNLOAD FREE PLC PDF

THE ENGINEERS GROUP

17. PLC Programming Practice MCQs

Test your understanding of IEC 61131-3 programming languages with these multiple-choice questions.

Q1. Which international standard defines PLC programming languages?

A) IEC 60204
B) IEC 61131-3
C) IEC 60364
D) IEC 60529

Correct Answer: B) IEC 61131-3
Q2. Which PLC language is based on relay logic?

A) Structured Text
B) SFC
C) Ladder Diagram
D) Instruction List

Correct Answer: C) Ladder Diagram
Q3. What is the full form of FBD?

A) Function Block Diagram
B) Field Bus Device
C) Functional Binary Data
D) Fast Block Design

Correct Answer: A) Function Block Diagram
Q4. Which language is textual and suitable for complex calculations?

A) LD
B) FBD
C) ST
D) SFC

Correct Answer: C) ST
Q5. Which method represents sequential operations using steps and transitions?

A) LD
B) SFC
C) ST
D) IL

Correct Answer: B) SFC
Q6. Which language was removed from the third edition of IEC 61131-3?

A) Ladder Diagram
B) Function Block Diagram
C) Structured Text
D) Instruction List

Correct Answer: D) Instruction List
Q7. Which graphical language uses interconnected function blocks?

A) FBD
B) ST
C) IL
D) Text Editor

Correct Answer: A) FBD
Q8. Which statement is commonly used for conditional execution in Structured Text?

A) CONTACT
B) IF…THEN
C) COIL
D) RUNG

Correct Answer: B) IF…THEN
Q9. What does TON represent?

A) Off-delay timer
B) On-delay timer
C) Down counter
D) Up counter

Correct Answer: B) On-delay timer
Q10. Which PLC language is commonly used for relay-style motor control logic?

A) Ladder Diagram
B) SFC
C) Structured Text only
D) Instruction List only

Correct Answer: A) Ladder Diagram
Q11. Which SFC element defines the condition for moving to the next step?

A) Coil
B) Transition
C) Register
D) Counter

Correct Answer: B) Transition
Q12. Which PLC software is commonly used for Siemens S7-1200 programming?

A) GX Works
B) TIA Portal
C) Studio 5000
D) CX-Programmer

Correct Answer: B) TIA Portal
Q13. What is a major advantage of Function Block Diagram?

A) It uses only text
B) It visually represents interconnected functions
C) It does not support logic
D) It is only used in old PLCs

Correct Answer: B) It visually represents interconnected functions
Q14. Which software organization element controls program scheduling?

A) Task
B) Contact
C) Coil
D) Sensor

Correct Answer: A) Task
Q15. What is the main purpose of comments in PLC programs?

A) Increase input voltage
B) Explain program logic
C) Change hardware address
D) Increase scan time intentionally

Correct Answer: B) Explain program logic

18. Chapter Summary

IEC 61131-3 provides an international framework for PLC programming languages and software organization. It helps engineers develop structured and maintainable programmable controller applications.

In this chapter, we studied Ladder Diagram (LD), Function Block Diagram (FBD), Structured Text (ST), Sequential Function Chart (SFC) and legacy Instruction List (IL).

Each programming approach has its own characteristics and applications. Ladder Diagram is widely used for relay-style control logic, FBD represents interconnected functions, Structured Text supports calculations and complex logic, and SFC represents sequential operations.

Understanding these languages is an important foundation for developing, maintaining and troubleshooting industrial PLC programs.

Learn the programming concepts, practice industrial logic and improve your automation skills with THE ENGINEERS GROUP.

19. Next Chapter – Ladder Logic Fundamentals

Coming Up in Chapter 09:

In the next chapter, we will learn Ladder Logic Fundamentals, including ladder diagrams, power rails, rungs, contacts, coils and basic PLC logic development.

You will understand how to create simple control programs using practical industrial examples.

CONNECT WITH THE ENGINEERS GROUP

Learn. Practice. Improve. Grow.

📘 EXPLORE OUR EBOOK 💬 CONTACT US ON WHATSAPP ▶️ SUBSCRIBE ON YOUTUBE FOLLOW US ON FACEBOOK

THE ENGINEERS GROUP

Free Engineering Education for Everyone