SCL vs Ladder (LAD) in TIA Portal
TIA Portal lets you program S7-1200 and S7-1500 CPUs in Ladder (LAD), Function Block Diagram (FBD), Statement List (STL, on S7-300/400 and S7-1500) and Structured Control Language (SCL). Most projects mix them. The question is not which language is better, but which one fits each block.
SCL and LAD side by side
| SCL | Ladder (LAD) | |
|---|---|---|
| Style | Text, similar to Pascal | Graphical contacts and coils |
| Best for | Maths, loops, arrays, sequences, data handling | Interlocks, simple boolean logic, I/O mapping |
| Online monitoring | Values shown next to each line | Power flow visible at a glance |
| Maintenance staff | Needs programming experience | Familiar to most electricians |
| Version control and diffs | Plain text, easy to compare | Harder to review outside TIA Portal |
| AI generation | Well suited: text in, text out | Graphical, not practical to generate as text |
The same motor logic in both languages
A classic start/stop circuit with a seal-in contact. In LAD it is one rung: Start in parallel with the Motor contact, in series with normally closed Stop and Overload contacts, driving the Motor coil. In SCL it is one assignment:
FUNCTION_BLOCK "FB_MotorSealIn"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
Start : Bool; // Normally open push button
Stop : Bool; // TRUE = stop requested (wire the NC contact inverted)
Overload : Bool; // TRUE = thermal overload tripped
END_VAR
VAR_OUTPUT
Motor : Bool;
END_VAR
BEGIN
// The same logic as a ladder rung with a seal-in contact
#Motor := (#Start OR #Motor) AND NOT #Stop AND NOT #Overload;
END_FUNCTION_BLOCK
For a rung like this, LAD is just as clear and easier for maintenance staff to follow. The picture changes as soon as the logic needs arithmetic, arrays or many states.
When SCL is the better choice
- Calculations: scaling, averaging, flow totals, PID pre- and post-processing.
- Loops and arrays: searching a recipe table, shifting a buffer, checking 50 alarms with one
FORloop. - Sequences: a
CASEstate machine is far shorter than a ladder sequence with set/reset coils. See the CASE example. - String handling and communication: building telegrams, parsing barcodes, handling
PUT/GETdata. - Reusable library blocks: one well-tested FB instead of copy-pasted rungs.
When Ladder is the better choice
- Simple interlocks and permissives that technicians must troubleshoot at night.
- I/O mapping and hardware-near logic where power flow helps diagnosis.
- Sites whose standards require LAD for certain block types.
Mixing SCL and LAD in one project
A common structure is SCL function blocks for the logic and LAD or FBD in the calling blocks. An SCL FB appears as a normal box in a ladder network, with its inputs on the left and outputs on the right, so technicians still see the signals they need. Moving existing rungs over is covered in migrating from Ladder to SCL, and the article SCL vs LAD vs FBD adds FBD to the comparison.
Generate your own SCL block
Describe the logic in plain language and get a Siemens SCL function block you can import into TIA Portal. Free account, no credit card.