Bird
Raised Fist0
PLC Programmingscripting~10 mins

PLC programming languages overview (IEC 61131-3) - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - PLC programming languages overview (IEC 61131-3)
Start: Understand IEC 61131-3
↓
Identify 5 Languages
↓
Choose language based on task
↓
End
This flow shows the five main PLC programming languages defined by IEC 61131-3 and the decision to choose one based on the task.
Execution Sample
PLC Programming
LD:  |---[ ]---( )---|
ST:  IF input THEN output := TRUE; END_IF;
Shows a simple Ladder Diagram rung and equivalent Structured Text conditional assignment.
Execution Table
StepLanguageKey FeatureExampleUse Case
1Ladder Diagram (LD)Graphical, relay logic style|---[ ]---( )---|Simple on/off control
2Function Block Diagram (FBD)Graphical, blocks connectedAND block with inputsComplex logic with blocks
3Structured Text (ST)Text-based, high-levelIF input THEN output:=TRUE; END_IF;Complex algorithms
4Instruction List (IL)Low-level, assembly-likeLD input ST outputSimple, fast code
5Sequential Function Chart (SFC)Graphical, steps and transitionsStep1 -> Transition -> Step2Sequential processes
6ExitAll languages overviewedChoose based on task complexity
💡 All five IEC 61131-3 languages have been introduced with examples and use cases.
Variable Tracker
LanguageFeatureExampleUse Case
Ladder Diagram (LD)Relay logic style|---[ ]---( )---|Simple on/off control
Function Block Diagram (FBD)Blocks connectedAND blockComplex logic
Structured Text (ST)High-level textIF input THEN output:=TRUE;Algorithms
Instruction List (IL)Assembly-likeLD input ST outputFast simple code
Sequential Function Chart (SFC)Steps & transitionsStep1 -> Step2Sequential processes
Key Moments - 3 Insights
Why are there both graphical and text-based languages in IEC 61131-3?
Graphical languages like LD and FBD are easier for electricians and technicians to understand, while text-based languages like ST allow for complex algorithms and flexibility. See execution_table steps 1 and 3.
Is Instruction List (IL) still widely used?
IL is less common now because it is low-level and harder to read, but it can be useful for simple, fast code. Refer to execution_table step 4.
When should I use Sequential Function Chart (SFC)?
Use SFC for processes that have clear steps and transitions, like batch processes. See execution_table step 5.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, which language is best for simple on/off control?
ALadder Diagram (LD)
BStructured Text (ST)
CSequential Function Chart (SFC)
DInstruction List (IL)
💡 Hint
Check execution_table row 1 under Use Case.
According to variable_tracker, which language uses steps and transitions?
AFunction Block Diagram (FBD)
BInstruction List (IL)
CSequential Function Chart (SFC)
DLadder Diagram (LD)
💡 Hint
Look at variable_tracker last row under Feature.
If you want to write complex algorithms, which language from execution_table is best?
AInstruction List (IL)
BStructured Text (ST)
CLadder Diagram (LD)
DFunction Block Diagram (FBD)
💡 Hint
See execution_table step 3 under Use Case.
Concept Snapshot
IEC 61131-3 defines 5 PLC languages:
1. Ladder Diagram (LD): graphical, relay logic style
2. Function Block Diagram (FBD): graphical blocks
3. Structured Text (ST): text-based, high-level
4. Instruction List (IL): low-level, assembly-like
5. Sequential Function Chart (SFC): graphical steps
Choose based on task complexity and user skill.
Full Transcript
This visual execution mode overview introduces the five main PLC programming languages defined by IEC 61131-3. The flow starts by identifying the languages: Ladder Diagram (LD), Function Block Diagram (FBD), Structured Text (ST), Instruction List (IL), and Sequential Function Chart (SFC). Each language is shown with a key feature, example, and typical use case. Variables track the language features and examples. Key moments clarify why graphical and text languages coexist, the current use of IL, and when to use SFC. The quiz tests understanding of which language fits simple control, sequential steps, and complex algorithms. The snapshot summarizes the languages and their main traits for quick reference.

Practice

(1/5)
1. Which of the following is NOT one of the five main PLC programming languages defined by IEC 61131-3?
easy
A. Function Block Diagram
B. Python
C. Structured Text
D. Ladder Diagram

Solution

  1. Step 1: Recall IEC 61131-3 languages

    IEC 61131-3 defines Ladder Diagram, Function Block Diagram, Structured Text, Instruction List, and Sequential Function Chart.
  2. Step 2: Identify the language not listed

    Python is a general-purpose programming language, not part of IEC 61131-3.
  3. Final Answer:

    Python -> Option B
  4. Quick Check:

    IEC 61131-3 excludes Python [OK]
Hint: Remember IEC 61131-3 languages exclude general programming languages [OK]
Common Mistakes:
  • Confusing general programming languages with PLC languages
  • Assuming all text-based languages are included
  • Mixing up graphical and text-based languages
2. Which syntax correctly represents a simple assignment in Structured Text (ST)?
easy
A. Output := Input + 5;
B. Output = Input + 5
C. Output == Input + 5;
D. Output <- Input + 5;

Solution

  1. Step 1: Understand Structured Text assignment

    In ST, the assignment operator is ':=' and statements end with a semicolon.
  2. Step 2: Check each option

    Output := Input + 5; uses ':=' and ends with ';' correctly. Others use wrong operators or miss semicolons.
  3. Final Answer:

    Output := Input + 5; -> Option A
  4. Quick Check:

    ST assignment uses ':=' and ';' [OK]
Hint: Look for ':=' operator and semicolon in Structured Text [OK]
Common Mistakes:
  • Using '=' instead of ':=' for assignment
  • Omitting semicolon at statement end
  • Confusing equality '==' with assignment
3. Given the following Ladder Diagram logic:
--[ ]--( )--
where the input contact is normally open and connected to output coil, what is the output when the input is OFF?
medium
A. Output is undefined
B. Output is ON
C. Output toggles ON and OFF
D. Output is OFF

Solution

  1. Step 1: Understand Ladder Diagram symbols

    The normally open contact [ ] closes when input is ON, allowing current to flow to the coil ( ).
  2. Step 2: Analyze input OFF condition

    When input is OFF, the contact remains open, so no current flows to the coil, output stays OFF.
  3. Final Answer:

    Output is OFF -> Option D
  4. Quick Check:

    Open contact means no output current [OK]
Hint: Open contact means output coil is OFF [OK]
Common Mistakes:
  • Assuming output is ON when input is OFF
  • Confusing normally open with normally closed contacts
  • Thinking output toggles without input change
4. Identify the error in this Structured Text snippet:
IF Input = TRUE THEN
  Output := TRUE
END_IF
medium
A. Missing semicolon after Output assignment
B. Incorrect IF syntax, should be IF (Input = TRUE) THEN
C. Assignment operator should be '=' not ':='
D. END_IF should be lowercase

Solution

  1. Step 1: Check Structured Text syntax rules

    Each statement must end with a semicolon ';' in ST.
  2. Step 2: Inspect the code snippet

    The line 'Output := TRUE' lacks a semicolon at the end, causing a syntax error.
  3. Final Answer:

    Missing semicolon after Output assignment -> Option A
  4. Quick Check:

    Statements end with ';' in ST [OK]
Hint: Always end ST statements with semicolon [OK]
Common Mistakes:
  • Forgetting semicolons after assignments
  • Misusing '=' for assignment
  • Assuming IF needs parentheses
5. You need to implement a control logic that turns ON an output only if two inputs are ON simultaneously, using Function Block Diagram (FBD). Which block combination correctly represents this?
hard
A. Two OR blocks connected in parallel
B. Two AND blocks connected in series
C. One AND block with both inputs connected to it
D. One NOT block with inputs connected

Solution

  1. Step 1: Understand AND logic in FBD

    AND block outputs TRUE only if all inputs are TRUE simultaneously.
  2. Step 2: Choose correct block setup

    One AND block with both inputs connected directly checks if both inputs are ON together.
  3. Final Answer:

    One AND block with both inputs connected to it -> Option C
  4. Quick Check:

    AND block with multiple inputs = simultaneous ON check [OK]
Hint: Use single AND block with all inputs for simultaneous ON [OK]
Common Mistakes:
  • Using OR blocks instead of AND
  • Connecting AND blocks in series unnecessarily
  • Using NOT block incorrectly for AND logic
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard