PLCcheck

S5 AWL Commands: TAK, ENT (Accumulator Operations)

S5 AWL accumulator instructions: TAK (swap ACCU1/ACCU2) and ENT (push ACCU2 to ACCU3). Advanced operations for multi-value calculations.

·3 min read
S5AWLTAKENTaccumulatorswapPUSHAkku

Diesen Artikel auf Deutsch lesen

S5 AWL Commands: TAK, ENT (Accumulator Operations)

TAK — Swap Accumulators (Akku tauschen)

TAK swaps the contents of ACCU1 and ACCU2. Used when you need to reverse the operand order for subtraction or comparison.

L   MW 10           // ACCU1 = MW10
L   MW 20           // ACCU1 = MW20, ACCU2 = MW10
TAK                 // ACCU1 = MW10, ACCU2 = MW20 (swapped)
-F                  // ACCU1 = MW20 - MW10 (reversed subtraction)

S7 equivalent: TAK exists identically in S7 STL. No SCL equivalent — SCL handles operand order naturally.

ENT — Push ACCU2 to ACCU3

ENT copies ACCU2 to ACCU3 (and ACCU3 to ACCU4 on CPUs with 4 accumulators). Used in complex calculations that need to preserve intermediate values.

L   MW 10           // Value A → ACCU1
ENT                 // Preserve ACCU2 in ACCU3
L   MW 20           // Value B → ACCU1, A → ACCU2
+F                  // ACCU1 = A + B

S7 equivalent: ENT exists in S7 STL as PUSH. In SCL, use temporary variables instead.

Note: S7-1500 has only 2 accumulators (ACCU1 and ACCU2). ENT/PUSH has limited use. TAK works on all platforms.

Migration Advice

Both TAK and ENT are signs of complex accumulator manipulation. In SCL, these operations disappear entirely — use named variables instead:

// AWL with TAK:          // SCL equivalent:
L  MW10                   result := MW20 - MW10;
L  MW20
TAK
-F
T  MW30

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

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.