Chapter 12 of 12: show all chapters
Chapter 12 of 12Part 4: Before your first lab · 4 min
PLC languages: four ways to write a rule
PLC rules can be typed as text or drawn as pictures. Here is one rule written four ways, so the screens you meet next look familiar.
Text
Typed, like the line you have already read. Siemens calls it SCL. Rockwell calls it Structured Text. Good if you like words.
Ladder
A drawing that looks like electrical wiring, with two side rails like the sides of a ladder. Electricity flows from left to right. If every switch on the way is closed, the output at the end turns on.
Ladder is the oldest style and still the most common, because electricians could read it straight away. Most jobs expect you to be able to read it.
Function blocks
Boxes joined by wires, like a flow diagram. Signals go in on the left and results come out on the right. Good for numbers that change smoothly, such as temperatures.
Sequence charts
Steps in order: fill, then mix, then empty. Good for jobs that happen in stages. Siemens calls it GRAPH. Rockwell calls it SFC.
What your first lab looks like
Your first lab uses text, because it reads most like a plain-English rule. You will meet ladder soon after.
It gives you a working tank, a valve that lets water in, and one line of Siemens code:
#FillValve := FALSE;
- FillValve is the tag for the valve. FALSE means shut, so no water flows.
- You change FALSE to TRUE, press Run and watch the tank fill.
- Then you write a rule that shuts the valve when the tank is full enough.
- Every part of that line is something you have now met: the #, a tag, := and TRUE or FALSE.
Try it
Switch between the four styles. Hold Start, then tick “Tank is full”, and watch each drawing respond.
Siemens SCL
#PumpOn := #Start AND NOT #TankFull;
Rockwell Structured Text
PumpOn := Start AND NOT TankFull;
PumpOn FALSE
New words
- Ladder logic
- Rules drawn like electrical wiring. Power flows left to right.
- SCL / Structured Text
- Rules typed as text. SCL is Siemens' name, Structured Text is Rockwell's.
- Function block
- Rules drawn as boxes joined by wires.
Quick check
Which style looks like electrical wiring?