Skip to content

XIC — Examine If Closed

Category
Bit
Type
Input (condition)
Availability
All platforms

XIC instruction block showing the closed contact symbol


XIC (Examine If Closed) tests a bit and allows logic continuity to pass downstream when the bit is 1 (true). Use it to gate logic based on a digital input—a switch, a button, a status flag, or an INT/DINT bit member. XIC is the foundation of all ladder logic; every rung’s power flow is shaped by XIC and XIO conditions. Do not use XIC to count events or store state; use data-file instructions (timers, counters, shift registers) for stateful behavior.


Operand Type Format Valid Range Required Description
Address BOOL or bit member Tag name or Tag.bit Any declared BOOL tag or INT/DINT bit member Yes The tag or bit to examine. Continuity passes to the downstream rung when the bit is 1 (true). On hardware, an I/O pin defaults to INPUT_PULLUP (active-low) — read the REFERENCE for pin configuration.

XIC has no persistent state. On the transition to run mode, XIC reads the bit and evaluates immediately.

If the rung conditions to the left of XIC evaluate to false (no power flow), XIC does not evaluate. Downstream logic receives no power.

XIC examines the bit value. If the bit is 1 (true), XIC conducts and continuity passes to the right. If the bit is 0 (false), XIC does not conduct and downstream logic receives no power.

XIC has no state to update on the final scan. Transition out of run mode has no effect on XIC.


Scenario: A start button wired to pin D2 (tag StartBtn, BOOL) should energize a motor output on pin D13 (tag MotorRun, BOOL).

Initial state:

  • StartBtn = 0 (button not pressed, no power flow)
  • MotorRun = 0 (motor off)

Rung logic:

—|XIC StartBtn|———(OTE MotorRun)———

Scan 1 — Button not pressed:

  • Rung-in: StartBtn is 0
  • XIC result: Does not conduct (no continuity)
  • Output: MotorRun = 0 (motor stays off)

XIC example: StartBtn = 0 (button not pressed), XIC does not conduct, MotorRun remains off

Scan 2 — User presses the button:

  • Rung-in: StartBtn becomes 1 (input pulled low by the button, read as 1 by active-low logic)
  • XIC result: Conducts (continuity passes)
  • Output: MotorRun is energized to 1 (motor turns on)

XIC example: StartBtn = 1 (button pressed), XIC conducts, MotorRun is energized to 1 (highlighted in orange)

Scan 3 — User releases the button:

  • Rung-in: StartBtn returns to 0 (pull-up releases it)
  • XIC result: Does not conduct
  • Output: MotorRun de-energizes to 0 (motor stops)

The XIC condition controls continuity frame-by-frame. The motor runs only while the button is held pressed.


  • XIO — Examine If Open (inverted logic — passes continuity when the bit is 0)
  • OTE — Output Energize (basic output coil — the most common downstream target)
  • OTL / OTU — Output Latch / Output Unlatch (memory outputs that hold their state)
  • Bit Logic Instructions — Category index
  • Hardware Compatibility — Pin configuration, pull-up behavior, input wiring

Pull-up behavior: Input pins are configured as INPUT_PULLUP (active-low). A switch wired to GND pulls the pin to 0, which LadderIDE reads as 1 (true) in logic. A floating pin (not connected) reads as 0 (false) because the pull-up draws it to high. See Hardware Compatibility for wiring diagrams.

Bit members: XIC accepts INT and DINT bit members—for example, Flags.3 examines bit 3 of the tag Flags. The bit resolves at runtime; there is no separate tag for the member.

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