Ladder Diagram
A ladder diagram is a graphical representation of logical control within PLC systems based on classic relay logic. The diagram is the visual programming form of Ladder Logic and is used worldwide in Industrial Automation, machine building, SCADA environments and Process Automation.
The name “ladder diagram” refers to the visual structure of the schematic:
- Two vertical power rails
- Horizontal lines (“rungs”)
- Contacts and coils
This makes the diagram resemble a ladder.
Ladder diagrams are used for:
- Machine control
- Start/stop logic
- Motor control
- Safety functions
- Alarm handling
- Interlocks
- Process sequences
In OT environments, the ladder diagram remains one of the most widely used programming forms thanks to its high readability for electrical and maintenance engineering teams.
⚙️ Basic structure of a ladder diagram
A ladder diagram consists of:
| Element | Function |
|---|---|
| Left rail | Logical supply side |
| Right rail | Return side |
| Rungs | Logical lines |
| Contacts | Input conditions |
| Coils | Outputs |
Basic example:
|----[ Start ]----[/ Stop ]----( Motor )----|
Meaning:
Startactivates the logicStopbreaks the logicMotoris activated
The PLC interprets this as a logical circuit.
🔌 Contact types
Normally Open (NO)
A Normally Open contact closes when the linked variable becomes TRUE.
Symbol:
[ ]
Example:
|----[ Sensor ]----( Output )----|
Normally Closed (NC)
A Normally Closed contact opens when the linked variable becomes TRUE.
Symbol:
[/]
Example:
|----[/ Alarm ]----( Motor )----|
⚡ Output coils
Coils represent outputs or internal bits.
Examples:
- Relays
- Lamps
- Motor starters
- Internal memory bits
- Alarms
Symbol:
( )
Example:
|----[ Start ]--------( Conveyor )----|
🧠 Logical functions
Ladder diagrams support logical operators.
AND logic
Contacts in series:
|----[ A ]----[ B ]----( Output )----|
Output is active only when:
A = TRUE and B = TRUE
OR logic
Contacts in parallel:
|----[ A ]----|| |----( Output )----||----[ B ]----|
Output is active when:
A = TRUE or B = TRUE
NOT logic
Using an NC contact:
|----[/ Alarm ]----( Motor )----|
Motor runs only when no alarm is active.
⏱️ Timers in ladder diagrams
Timers are crucial in industrial processes.
Main timer functions:
| Timer | Function |
|---|---|
| TON | On-delay |
| TOF | Off-delay |
| TP | Pulse timer |
Example:
|----[ Sensor ]----[TON T1 10s]----|
Function:
- Sensor activates
- Timer starts
- After 10 seconds the output becomes active
Applications:
- Motor delays
- Alarm delays
- Process sequences
- Soft-start functions
🔢 Counters
Counters count events or products.
Types:
| Counter | Description |
|---|---|
| CTU | Counter Up |
| CTD | Counter Down |
Example applications:
- Production counts
- Batch recording
- Cycle counts
- Maintenance intervals
🔄 PLC scan cycle
PLCs execute ladder diagrams cyclically.
The standard scan cycle:
Read inputs ↓Execute logic ↓Write outputs ↓Repeat
Important properties:
| Property | Typical value |
|---|---|
| Scan time | 1-50 ms |
| Determinism | High |
| Jitter | Low |
This predictability is essential in real-time OT processes.
🏭 Ladder diagrams in industrial applications
Machine building
Commonly used functions:
- Conveyor control
- Robot interlocks
- Start/stop circuits
- Sensor logic
Process industry
Applications:
- Pump control
- Valve actuation
- Batch processes
- Alarm management
Power supply
Used for:
- Switchgear
- Interlocks
- Emergency procedures
- Generator control
Building automation
In Building Automation for:
- HVAC
- Lighting
- Access control
- Energy management
🛡️ Safety logic
Ladder diagrams are widely used in safety functions.
Examples:
- Emergency stop logic
- Safety doors
- Light curtains
- Two-hand control
Safety-related applications often run on a Safety PLC.
Important standards:
| Standard | Function |
|---|---|
| IEC 61508 | Functional safety |
| IEC 61511 | Process safety |
| ISO 13849 | Machine safety |
| IEC 62061 | Safety control |
⚙️ Interlocks and permissives
A ladder diagram often contains interlocks.
Example:
Motor may start only if:- Safety door closed- No fault active- Pressure sufficient- Emergency stop reset
Interlocks protect:
- Operators
- Machines
- Processes
- Product quality
🔄 Retentive functions
Many PLCs support retentive variables.
These retain values after:
- Power loss
- PLC reboot
- Power interruptions
Important for:
- Production counters
- Batch numbers
- Process status
📡 Integration with SCADA and HMI
Ladder diagrams send variables to:
Examples:
| Data | Destination |
|---|---|
| Alarm status | SCADA |
| Motor status | HMI |
| Process values | Trending |
| Production counter | Historian |
Communication often uses:
🧪 Diagnostics and troubleshooting
A major benefit of ladder diagrams is visual fault diagnosis.
Maintenance technicians can see in real time:
- Active contacts
- Energised coils
- Timer status
- Counter values
- Interlock conditions
Common problems:
| Problem | Possible cause |
|---|---|
| Oscillating outputs | Unstable inputs |
| Missed signals | Long scan time |
| Race conditions | Poor logic |
| Forgotten reset | Programming error |
| Unexpected activation | Parallel logic |
⚠️ Common design errors
Over-complex rungs
Large parallel structures reduce readability.
Poor naming
Unclear tags make troubleshooting difficult.
Excessive use of internal bits
Too many helper variables increase complexity.
No modular structure
Large monolithic programs are hard to maintain.
Best practices:
- Standardised templates
- Function blocks
- Clear tagging
- Modular architecture
🔐 Cybersecurity risks
PLC logic is an important OT attack target.
Possible attacks:
- Manipulation of outputs
- Tampering with interlocks
- Process sabotage
- Disabling safety
Known threats:
- Malware
- Insider threats
- Unauthorised engineering
- Malicious firmware
Stuxnet showed how PLC logic can be manipulated without operators noticing.
🧱 Security measures
Important OT security measures:
| Measure | Purpose |
|---|---|
| Network Segmentation | Isolation |
| Application Whitelisting | Software control |
| MFA | Authentication |
| Version Control | Change management |
| Logging | Auditing |
| Backup | Recovery |
| Patch Management | Vulnerability management |
PLC programs often fall under formal Change Management.
🌐 Ladder diagrams in Industry 4.0
Although ladder diagrams are a classic technology, they remain relevant within Industry 4.0.
Modern developments:
- Virtual PLCs
- Edge-based runtime
- Integration with Industrial AI
- Cloud connectivity
- Digital twins
Many modern PLC platforms support hybrid programming models with:
- Ladder diagrams
- Structured Text
- Function Block Diagram
- SFC
📈 Benefits of ladder diagrams
Key benefits:
- High readability
- Visual debugging
- Widely supported
- Familiar to maintenance teams
- Deterministic behaviour
- Easy troubleshooting
⚡ Limitations
Key limitations:
- Less suited to complex algorithms
- Limited abstraction
- Difficult to scale in very large systems
- Less suitable for data processing
- Large programs become hard to read
For these reasons, complex applications are often combined with:
- Structured Text
- Function Block Diagram
- SFC
