Learn PLCs free

Examine If Closed (XIC) and Examine If Open (XIO) Explained

XIC (Examine If Closed) and XIO (Examine If Open) are the Allen-Bradley names for the two fundamental ladder logic contact types — normally-open and normally-closed. They map directly to the IEC 61131-3 ── ┤ ├ ── and ── ┤/├ ── symbols. Understanding the field-state vs instruction-state mapping is the single most common stumbling block for new PLC programmers.

The TL;DR

XIC passes power when the bit is TRUE (1). XIO passes power when the bit is FALSE (0). The names refer to the contact's drawn state, not the input device's state. A normally-closed E-stop button connected to an input creates a 1-bit when the button is NOT pressed (the contact is closed). To detect "E-stop pressed," use an XIO on that bit.

XIC: Examine If Closed

Symbol: ── ┤ ├ ──. Allen-Bradley calls it "Examine If Closed" because the contact is drawn as if its referenced bit were a closed switch. The instruction passes power (continues the rung) when the referenced bit equals 1. Equivalent to a Normally Open (NO) contact in IEC 61131-3.

Use it when: you want logic to execute when something is true. "Run pump if Start_PB is pressed" → XIC Start_PB.

XIO: Examine If Open

Symbol: ── ┤/├ ── (with a diagonal slash). Drawn as if the contact were an open switch. The instruction passes power when the referenced bit equals 0. Equivalent to a Normally Closed (NC) contact in IEC 61131-3.

Use it when: you want logic to execute when something is false or absent. "Run pump if E-stop NOT pressed" → XIO E_Stop_Pressed.

The classic confusion: NC E-stop button

Industrial E-stop buttons are wired normally-closed. When the button is NOT pressed, the contacts are closed and 24V flows through the circuit to the PLC input. The PLC input bit reads 1 — even though the operator hasn't done anything. The bit reads 0 only when the E-stop is pressed (or a wire breaks).

This is intentional fail-safe wiring (de-energise to safe). It also means your code must use XIC, not XIO, for the "machine OK to run" condition:

Rung 1 (correct):
  ──┤ Mode_Auto ├──┤ E_Stop_OK ├──( Pump_Run )──
                                              ↑
                          XIC because E_Stop_OK = 1 means
                          E-stop NOT pressed (NC button closed)

Rung 1 (WRONG — common beginner mistake):
  ──┤ Mode_Auto ├──┤/E_Stop ├──( Pump_Run )──
                              ↑
                  XIO of E_Stop. If you wired the button
                  normally-closed, this passes when the
                  bit is 0 — i.e. only when the button IS
                  pressed. The pump runs when E-stop is hit.
                  Catastrophic.

The fix: name the input tag for the bit's 1-state, not the field device's name. E_Stop_OK means the bit reads 1 when the machine is allowed to run. E_Stop as a name is ambiguous — does 1 mean "pressed" or "not pressed"? Eliminate the ambiguity at the I/O list and the rest of the code becomes self-evident.

XIC and XIO in series and parallel

Multiple contacts on a rung create boolean expressions:

  • Series (left-to-right) = AND. Both contacts must pass for power to continue.
  • Parallel (vertical branch) = OR. Either branch can pass.
  • XIO by itself acts as a NOT. ──┤/A├── = NOT A.
Boolean equivalent of:
  ──┤ A ├──┬──┤ B ├──────( Y )──
           │
           ──┤ C ├──┘

Y = A AND (B OR C)

Boolean equivalent of:
  ──┤ A ├──┤/B ├──┬──┤ C ├────( Y )──
                  │
                  ──┤ D ├──┘

Y = A AND (NOT B) AND (C OR D)

Frequently asked questions

What does XIC mean?
XIC means Examine If Closed — an Allen-Bradley ladder logic instruction representing a normally-open (NO) contact. The contact passes power (allows the rung to continue) when the referenced bit equals 1. Equivalent to ── ┤ ├ ── in IEC 61131-3.
What does XIO mean?
XIO means Examine If Open — an Allen-Bradley ladder logic instruction representing a normally-closed (NC) contact. The contact passes power when the referenced bit equals 0. Equivalent to ── ┤/├ ── in IEC 61131-3.
What is the difference between XIC and XIO?
XIC passes power when the bit is 1; XIO passes power when the bit is 0. They are inverses of each other. The naming refers to the drawn contact state, not the field device state — a normally-closed E-stop button wired to a PLC input creates a 1-bit when NOT pressed.
Should I use XIC or XIO for an emergency stop?
Use XIC if your input tag is named for its OK-state — e.g., E_Stop_OK reads 1 when the E-stop is NOT pressed. Use XIO if your tag is named for the activated state — e.g., E_Stop_Pressed reads 1 only when pressed. Pick one naming convention and enforce it. The ambiguous middle name (just E_Stop) is the source of catastrophic logic errors.

Related guides

Free PLC simulator

Stop reading, start doing

Write ladder logic in your browser, hit Run, and watch real machine scenarios react. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →