Skip to content

AFI — Always False Instruction

Category
Program Control
Type
Input (condition)
Availability
All platforms

AFI instruction: a contact symbol with AFI written above it and no tag name


AFI (Always False Instruction) is an input instruction that never passes power. Placed in series on a rung it makes everything to its right false: an OTE goes off, a timer resets, a counter stops counting, exactly as if the rung’s own conditions had gone false. Use it to take part of a rung, or a whole rung, out of service without deleting it: to hold an output off while the rest of the program is tested during commissioning, or to park logic you plan to finish later. Do not leave an AFI in finished logic; an AFI nobody remembers is the classic “why won’t this output turn on” fault. AFI replaces the NOP of older platforms, which LadderIDE does not have.


Operand Type Format Valid Range Required Description
None — — — — AFI has no tag and no dialog. Dragging it onto a rung places it at once.

Nothing.

The AFI is false. Everything to its right is false.

The AFI is still false. Everything to its right sees a false rung-in, so the outputs there behave as they do on any false rung: OTE coils turn off, timers and counters take their rung-false action, latches and one-shots hold.

Nothing.

Conditions to the left of AFI AFI Outputs to the right
False False Off, as on a false rung
True False Off, as on a false rung

Inside a branch. AFI blocks only the leg it is on. In an input branch the other legs still pass power, so the rung can still be true through them. In an output branch leg it de-energizes that leg’s outputs and leaves the other legs alone.

Position. AFI must come before the outputs it is meant to block. An AFI placed after an output on the main line, or after an output within a branch leg, is a build error: AFI instruction must be moved in front of the output.


Scenario: A pump’s run rung is finished, but the pump is not wired yet. An AFI keeps the output off while the request logic upstream is tested.

Tags:

  • Pump_Req — Pump request, BOOL
  • Pump_Run — Pump run output, BOOL

Rung 1:

—|XIC Pump_Req|—|AFI|———(OTE Pump_Run)———

Scan 1 — Pump_Req = 0. The XIC does not conduct. Pump_Run = 0.

Figure 1 — AFI rung with the request off: nothing lit, Pump_Run off

Scan 2 — Pump_Req = 1. The XIC conducts and lights, the AFI does not, and the wire beyond it stays dark. Pump_Run = 0.

Figure 2 — AFI rung with the request on: the XIC lit, the AFI and the coil dark, Pump_Run still off

Values before and after: Pump_Run is 0 in both scans. When the pump is wired, delete the AFI and the rung works as drawn.


  • JSR — Jump to Subroutine (run or skip a whole routine)
  • XIC — Examine If Closed (the condition an AFI usually follows)
  • OTE — Output Energize (turns off behind an AFI)
  • OTL — Output Latch (holds its bit behind an AFI)
  • Program Control Instructions — Category index

AFI or Disable Rung? Right-click a rung number and choose Disable Rung to leave a rung out of the build altogether: the controller never writes its outputs, so they keep whatever value they had. An AFI keeps the rung in the scan and actively drives its outputs false every cycle. Use Disable Rung to freeze a rung, AFI to force it off.

Behind an AFI, false means false. A TON behind an AFI holds at zero, an RTO keeps its accumulator, a CTU counts nothing, an OTL keeps its bit set and an OTU leaves its bit alone. Each instruction takes its normal rung-false action; nothing is skipped.

A rung still needs an output. An AFI on its own, with no output instruction after it, is the same build error as any other rung without an output.

Allowed inside an MBS body. A block’s logic may carry an AFI like any other condition.

Find them before shipping. Search the program for AFI before a project is released. An AFI on a rung is easy to see at 150 %, and easy to miss in a routine nobody opens.

Applies to LadderIDE >=1.2.2 · Last reviewed 2026-09-11 · Screenshots verified 2026-09-11