PLCcheck

Converting S5 AWL to S7 SCL: Step-by-Step

Practical guide for converting Siemens S5 AWL (Instruction List) code to S7 SCL (Structured Text). Includes conversion tables, code examples for bit logic, timers, counters, jumps, and data blocks.

·14 min read
AWLSCLSTLStructured TextconversionSiemensS5S7

Diesen Artikel auf Deutsch lesen

Converting S5 AWL to S7 SCL: Step-by-Step

AWL (Anweisungsliste / Statement List) is a low-level, assembler-like PLC language. SCL (Structured Control Language / Structured Text) is a high-level, Pascal-like language. Converting AWL to SCL means replacing implicit processor operations (accumulator, RLO, status word) with explicit variable assignments and control structures. This guide shows the conversion pattern for every common AWL construct.

AWL is deprecated on S7-1500. Siemens removed native STL support from S7-1200 entirely and runs it only in emulation mode on S7-1500. Every AWL program must eventually be converted to SCL, LAD, or FBD.

The Core Concept: RLO Becomes Boolean Expressions

AWL operates on an implicit RLO (Result of Logic Operation). SCL has no RLO. Every bit logic chain must become an explicit Boolean expression.

AWL:

      U     E 0.0
      U     E 0.1
      UN    M 10.0
      =     A 4.0

SCL:

"Motor_Run" := "Start_Button" AND "Safety_OK" AND NOT "Fault_Active";

Conversion Table: Bit Logic

AWL (DE)STL (EN)SCLExample
UAANDA AND B
UNANAND NOTA AND NOT B
OOORA OR B
ONONOR NOTA OR NOT B
SS:= TRUE (conditional)IF cond THEN x := TRUE; END_IF;
RR:= FALSE (conditional)IF cond THEN x := FALSE; END_IF;
==:=output := expression;
FPFPR_TRIGR_TRIG_inst(CLK := input);
FNFNF_TRIGF_TRIG_inst(CLK := input);

Conversion Table: Load, Transfer, Arithmetic

AWLSCLNotes
L MW 10tempInt := MW10;Load memory word
T MW 20MW20 := tempInt;Transfer to memory word
+F / +I+Integer addition
-F / -I-Integer subtraction
TAK(swap variables)Use temp variable

AWL accumulator math → SCL direct expression:

AWL: L MW10 / L MW12 / +I / T MW20 → SCL: MW20 := MW10 + MW12;

Converting Jumps to IF/THEN/ELSE

AWL:

      U     E 0.0
      SPB   M001
      L     0
      T     MW 20
      SPA   M002
M001: L     100
      T     MW 20
M002: NOP   0

SCL:

IF "Start_Button" THEN
    MW20 := 100;
ELSE
    MW20 := 0;
END_IF;

Converting Timers

S5 AWL: U E0.0 / L KT 030.2 / SD T1 / U T1 / = A4.0

S7 SCL:

"Timer_Conveyor"(
    IN := "Start_Button",
    PT := T#30s
);
"Motor_Run" := "Timer_Conveyor".Q;
S5S7 IECFunction
SITPPulse
SETPExtended Pulse
SDTONOn Delay
SSTONRetentive On Delay
SATOFOff Delay

Use our S5 Timer Calculator to convert any KT value.

Converting Counters

S5: U E1.0 / L KZ 100 / ZV Z3 → S7 SCL: "Counter"(CU := "Sensor", PV := 100);

S5S7 IEC
ZVCTU
ZRCTD

Converting Data Block Access

S5 DW × 2 = S7 DBW. Example: A DB10 / L DW5 → SCL: DB10.DBW10

See our S5→S7 Address Converter for complete reference.

What Cannot Be Directly Converted

PLCcheck Pro converts AWL to SCL automatically. Try it now →


Maintained by PLCcheck.ai. Last update: March 2026. Not affiliated with Siemens AG.

Related Articles

Analyze your PLC code with AI

PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.

Try PLCcheck Pro →
← Back to Blog

Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.