S5 AWL Command: L (Load)
S5 AWL instruction L (Load): Loads a value into accumulator 1 (ACCU1). Previous ACCU1 content shifts to ACCU2.
S5 AWL Command: L (Load)
The L instruction loads a value into accumulator 1 (ACCU1). The previous content of ACCU1 is automatically shifted to ACCU2. This is the foundation of all arithmetic and comparison operations in AWL.
Syntax
L <operand>
Valid operands: EB/EW/ED (Input byte/word/dword), AB/AW/AD (Output), MB/MW/MD (Marker), DBB/DBW/DBD (Data block), PEW (Peripheral input), T (Timer current value), Z (Counter current value), Constants (KF, KH, KM, KC, KT, KZ, KY)
S7 Equivalent
| S5 AWL | S7 STL | S7 SCL |
|---|---|---|
L MW 10 | L MW 10 (identical) | temp := MW10; (implicit) |
L KF +100 | L 100 | temp := 100; |
Accumulator Behavior
L MW 10 // ACCU1 = MW10, ACCU2 = (previous ACCU1)
L MW 20 // ACCU1 = MW20, ACCU2 = MW10
+F // ACCU1 = ACCU1 + ACCU2 = MW20 + MW10
T MW 30 // MW30 = result
Key concept: Every L pushes the current ACCU1 to ACCU2. This is why you load two values before an arithmetic operation — the first value ends up in ACCU2, the second in ACCU1.
Code Example — Add Two Values
L MW 10 // Load first operand into ACCU1
L MW 20 // First operand moves to ACCU2, second into ACCU1
+F // ACCU1 = ACCU2 + ACCU1 = MW10 + MW20
T MW 30 // Store result
Loading Constants
| Constant Format | Meaning | Example |
|---|---|---|
| KF +100 | Fixed-point integer | L KF +100 → loads 100 |
| KH 00FF | Hexadecimal | L KH 00FF → loads 255 |
| KM 11110000 00001111 | Bit pattern | 16-bit mask |
| KC HELLO | Character (ASCII) | 2 characters |
| KT 030.2 | Timer value | 3 seconds (base 2 = 100ms) |
| KZ 050 | Counter value | BCD counter preset 50 |
| KY 10,20 | Two bytes | High byte = 10, low byte = 20 |
Related Commands
- T (Transfer) — Stores ACCU1 to an operand
- +F (INT Add) — Integer addition
Part of the S5 AWL Command Reference. Maintained by PLCcheck.ai.
Analyze Your S5 Code Automatically
PLCcheck Pro reads your complete S5 AWL program and explains every instruction — including this one — in plain language. Upload your code and get instant documentation, S7 equivalents, and migration guidance.
Upload S5 code for free analysis → | S5→S7 Migration Guide →
Related Articles
Reading and Understanding S5 AWL Code: A Practical Guide
Learn to read Siemens S5 AWL (Instruction List) code from scratch. Covers the accumulator model, bit logic, load/transfer, timers, counters, jumps, and data blocks with real code examples and line-by-line explanations.
16 min read
migration-guideThe Siemens S5/S7 Converter Tool: What It Does and What It Doesn't
Honest assessment of the Siemens STEP 7 S5→S7 conversion tool. What it converts automatically, what it cannot handle, common errors, and how to deal with the remaining 20–40% that requires manual work.
12 min read
migration-guideS5 to S7 Migration: The Complete Guide (2026)
Step-by-step guide for migrating Siemens S5 PLC programs to S7-1500. Covers AWL→SCL conversion, timer mapping, address translation, and hardware selection.
18 min read
Analyze your PLC code with AI
PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.
Try PLCcheck Pro →Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.