CODESYS · Track 03 · IEC 61131-3 + CFC

Six languages, one logic

CODESYS implements every language of IEC 61131-3, 3rd edition (LD, FBD, ST, IL and SFC; that edition deprecates IL and the 2025 4th edition drops it) and adds its own free-form CFC (Continuous Function Chart), where you place blocks anywhere and draw their connections yourself. The motor seal-in example uses four of these languages. Choose the tab for Ladder, FBD, Structured Text or CFC to see how each represents the same logic.

🪜 LD🔲 FBD⌨️ ST🔗 CFC
01 · Compare the same logic across languages

Start · seal-in · stop

Press Start to run the motor and latch it on. Press Stop to stop it. The seal-in holds the motor on after you release Start, until Stop breaks the rung. Switch between the Ladder, FBD, Structured Text and CFC tabs to follow this behavior in each representation. IL and SFC are also available; the Schneider & Siemens academies cover SFC-style sequencing. Ladder follows relay schematics, with rungs, contacts and coils familiar to electricians. Structured Text suits algorithms with loops and maths. SFC represents a sequence as steps and transitions. You can choose a language for each POU within the same project; the POUs compile and work together.

⊣ ⊢
Start
⊣/⊢
Stop
( )
Motor
⊣ ⊢
Motor (seal-in)
Start
Motor
Stop
≥1
OR
&
AND
Motor
Motor := (Start OR Motor) AND NOT Stop;
// CODESYS ST — the IEC standard, OOP-extended (Track 04)
Start
Motor
Stop
≥1
OR
&
AND
Motor
▶ Start
⛔ Stop
Motor: OFF
⚙️

In CFC, you position the blocks freely and route their wires by hand. FBD arranges blocks in left-to-right networks; CFC lets you draw feedback connections and set an explicit execution order. You can connect function blocks, functions and operators on that canvas. This layout suits mixing, maths chains and analog conditioning where signal flow is awkward to draw on a grid. The example compiles to the same logic as the other representations, with a different layout for you to work in.

02 · Check yourself

What makes CFC special?

How does CFC differ from FBD?