PLCcheck

S5 AWL Command: FN (Negative Edge)

S5 AWL instruction FN (Negative Edge): Detects a falling edge (TRUE→FALSE transition). Requires an edge memory flag bit.

·3 min read
S5AWLFNnegative edgefalling edgeF_TRIG

Diesen Artikel auf Deutsch lesen

S5 AWL Command: FN (Negative Edge)

FN detects a negative (falling) edge — the transition from TRUE to FALSE. The VKE is TRUE for exactly one scan cycle when the monitored signal changes from TRUE to FALSE.

Syntax

U   E 0.0          // Signal to monitor
FN  M 10.1         // Edge memory flag (unique per FN)
=   A 4.1          // Output: TRUE for one scan on falling edge

S7 Equivalent

S5 AWLS7 STLS7 SCL
FN M 10.1FN M 10.1 (identical)F_TRIG function block

Code Example — Detect Sensor Release

U   E 0.0          // Sensor (TRUE while part is present)
FN  M 10.1         // Detect when part leaves sensor
=   M 20.0         // "Part has passed" signal — TRUE for one scan

Typical Use

Detecting when a signal turns off: button release, sensor clearing, motor stopping, valve closing. Essential for sequencing — "do this when X finishes" rather than "do this while X is active."


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.