ladder logic

XIO

XIC

Rockwell

contacts

XIO vs XIC: Understanding Examine Instructions in Ladder Logic


Ladder logic rung showing an XIC contact in series with an XIO contact driving an output coil

Introduction

Every ladder logic program, regardless of vendor, is built from two examine instructions: XIC (Examine If Closed) and XIO (Examine If Open). They look like simple contacts, but a surprising number of field problems trace back to confusing what the instruction examines with how the device is wired. This guide separates the two.

What Each Instruction Tests

  • XIC (Examine If Closed) is true when its bit is 1. Drawn as -| |-. Think of it as "pass power when the bit is on."
  • XIO (Examine If Open) is true when its bit is 0. Drawn as -|/|-. Think of it as "pass power when the bit is off."
The instruction tests the bit in memory, not the physical switch. A normally-closed field device wired to an input will set the bit to 1 while unpressed — so the symbol on screen and the wiring in the panel can look contradictory and still be correct.

See It Live

Below is a single rung. Toggle the input bit and watch how XIC and XIO evaluate in opposite directions for the same bit value.

Start/Stop seal-in rung. Ladder logic (2 rungs): Rung 0: examine if Start_PB is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE). Rung 1: examine if Motor_Run is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE). A classic seal-in (latch) circuit: pressing Start energizes Motor_Run, the second rung seals it in, and Stop (wired normally-closed, so its bit is 1 when not pressed) drops it out.

Start/Stop seal-in rungLadder logic
Toggle inputs
Rung 0
Ladder logic rung: examine if Start_PB is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE) examine if Start_PB is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE) XIC Start_PB Start_PB Start_PB XIO Stop_PB Stop_PB Stop_PB OTE Motor_Run Motor_Run Motor_Run
Rung 1
Ladder logic rung: examine if Motor_Run is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE) examine if Motor_Run is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE) XIC Motor_Run Motor_Run Motor_Run XIO Stop_PB Stop_PB Stop_PB OTE Motor_Run Motor_Run Motor_Run
energizedTip: click a contact in the diagram to flip its bit.
A classic seal-in (latch) circuit: pressing Start energizes Motor_Run, the second rung seals it in, and Stop (wired normally-closed, so its bit is 1 when not pressed) drops it out.

Common Pitfalls

Field deviceBit when idleUse to detect press
NO pushbutton0XIC
NC pushbutton1XIO
NC E-stop (safety)1XIC (so a broken wire trips it)
How wiring choice and instruction choice combine

Seal-in (latch) circuit. Ladder logic: Rung 0: either examine if Start_PB is on (XIC), or examine if Motor_Run is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE). The seal-in: Start OR the already-sealed Motor_Run contact, in series with a normally-closed Stop, drives the Motor_Run output.

Seal-in (latch) circuitLadder logic
Toggle inputs
Rung 0
Ladder logic rung: either examine if Start_PB is on (XIC), or examine if Motor_Run is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE) either examine if Start_PB is on (XIC), or examine if Motor_Run is on (XIC), then examine if Stop_PB is off (XIO), then energize output Motor_Run (OTE) XIC Start_PB Start_PB Start_PB XIC Motor_Run Motor_Run Motor_Run XIO Stop_PB Stop_PB Stop_PB OTE Motor_Run Motor_Run Motor_Run
energizedTip: click a contact in the diagram to flip its bit.
The seal-in: Start OR the already-sealed Motor_Run contact, in series with a normally-closed Stop, drives the Motor_Run output.

Conclusion

Read the symbol as a question about the bit, not the device: XIC asks "is it 1?", XIO asks "is it 0?". Once you wire that habit in, the contradictions between panel and screen stop being confusing.