PLCcheck

S5 AWL Command: ON (OR NOT)

S5 AWL instruction ON (OR NOT): Negated OR operation. Syntax, S7 equivalent, and code examples.

·2 min read
S5AWLONOR NOTODER NICHTbit logicnegation

Diesen Artikel auf Deutsch lesen

S5 AWL Command: ON (OR NOT)

The ON instruction performs a logical OR NOT operation. It reads a boolean operand, negates it, and ORs the result with the current VKE.

Syntax

ON  <operand>

S7 Equivalent

S5 AWLS7 STLS7 SCL
ON E 0.2ON I 0.2 (EN) / ON E 0.2 (DE)... OR NOT Input_0_2

Code Example

U   E 0.0      // Normal start condition
ON  E 0.2      // OR if emergency stop is NOT pressed
=   A 4.0

A 4.0 is TRUE when E 0.0 is TRUE or E 0.2 is FALSE.


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.