TIA Portal · Track 03 · IEC 61131-3 languages

The four languages

TIA Portal offers different languages for different kinds of control logic. A circuit that is easy to read in ladder may be awkward to express as a sequence, while calculations often suit text. This lesson uses one live motor circuit to compare all four representations. Change the inputs and follow the resulting state in each view, so you can relate the same behaviour to its different forms.

🪜 LAD🔲 FBD⌨️ SCL🔢 GRAPH
01 · Compare the representations

One motor circuit in four languages

The logic: a motor starts when you press Start, keeps running (seals in) after you let go, and stops when you press Stop. This is a common motor-control pattern. Switch tabs to compare Ladder, Function Block Diagram, Structured Text and GRAPH. The inputs at the bottom control the same motor behaviour in each view.

⊣ ⊢
"Start"
⊣/⊢
"Stop"
( )
"Motor"
⊣ ⊢
"Motor" (seal-in)
"Start"
"Motor"
"Stop"
≥1
OR
&
AND
"Motor"
=
// the seal-in, in one line of code
"Motor" := ("Start" OR "Motor") AND NOT "Stop";

// reads exactly like the sentence:
//  "run if Start OR already-running,
//   as long as Stop is not pressed"
Step 1: Idle
Motor OFF
waiting for Start
↓T1: "Start"
Step 2: Run
Motor ON
until Stop
↓T2: "Stop"
▶ "Start" (PB)
⛔ "Stop" (PB)
Motor: OFF
⚙️

Tap Start on, then off. The motor keeps running because it seals itself in (the "Motor" contact keeps the rung alive). Tap Stop to stop the motor. Each representation expresses the same control behaviour, and you can follow the result in the motor status display.

02 · Choose a language for the block

Match the notation to the job

You can mix languages in a project and choose one for each block. Select a card to compare where each notation is useful.

03 · Check yourself

Pick the right dialect

You must compute a moving average over the last 50 samples, with a FOR loop and an array. Which language fits best?