Book a consultation

PLC Programming

XIO Instruction (Examine If Open): How It Works in a PLC

The XIO instruction is true when a bit is 0. How it works, when to use it, why it is not the normally closed button, XIO vs XIC, and 23 vendor editors.

Vladimir Romanov ·


Table of contents14 sections

The XIO instruction is the other half of every ladder program, and the half people get wrong more often. Its name, Examine If Open, invites the same mistake as XIC’s: reading it as a statement about a switch in the field, and reaching for it whenever a device is normally closed. XIO asks one question about one bit in memory: is this bit 0 right now? Choose it because the rung should pass when the bit is 0, and it becomes one of the most useful instructions you have. Choose it because the button is red and normally closed, and it will stop working exactly when you need it.

This page builds on the XIC instruction, which covers the bit-not-the-switch idea in depth. Here the focus is XIO’s own jobs: fault-free permissives, interlocks between machines, “nothing is in the way” checks, and the scan-order tricks that make an XIO useful. As with the XIC page, there is a quiz and five harder problems at the end, and every animation has a pause control.

The short version. XIO tests one bit: it is true when the bit is 0 and false when the bit is 1. Use it when the rung should pass because something is off, absent or not faulted. Remember that a bit also reads 0 when a wire breaks or nothing writes it, so never let an XIO be the only thing standing between a machine and a hazard.

What is the XIO instruction?

The XIO instruction, short for Examine If Open, is a ladder logic input instruction that checks one bit. If the rung reaching it is true and the bit is 0, XIO passes power to the next instruction. If the bit is 1, it blocks power. Rockwell Automation calls it XIO; most other vendors call the same symbol a normally closed contact, and CODESYS-based software calls it a negated contact.

The simplest useful XIO stops a machine when something is full. A bin has a switch that closes when the bin is full. While the bin has room the bit is 0, the XIO is true, and the feeder runs. When the bin fills, the bit becomes 1 and the feeder stops.

Animation of a bin full switch wired to an input, a ladder rung with an XIO on Bin_Full driving an OTE on Feeder_Run, and a feeder motor that runs while the bin has room and stops when the switch closes.
While the bin has room, Bin_Full is 0, the XIO is true and the feeder runs. When the bin fills, the bit becomes 1, the XIO goes false and the feeder stops. Empty the bin and it restarts. Download the GIF

Rockwell’s Logix 5000 general instructions reference manual (publication 1756-RM003) defines XIO with one BOOL operand, the bit to be tested, and says it examines that bit to see if it is cleared. Its execution table is the whole instruction:

Condition when the XIO executesRung condition passed to the right
Rung condition coming in is falseFalse
Rung condition coming in is true, bit is 0True
Rung condition coming in is true, bit is 1False
Prescan (when the controller enters Run mode)False
PostscanFalse

Source: Rockwell Automation, Logix 5000 Controllers General Instructions Reference Manual, 1756-RM003, revision P, XIO section.

The same manual says XIO does not affect the arithmetic status flags and has no fault conditions. Its own example uses a limit switch bit and the overflow flag S:V: when the flag is cleared, there was no overflow, and the rung passes. There is no XIO in structured text; you write IF NOT Bin_Full THEN instead.

Why is it called “Examine If Open”?

For the same reason XIC is called Examine If Closed: the vocabulary comes from relay panels, where a contact really was open or closed. In a modern controller “open” means “the bit is 0”, nothing more. The XIC page tells that story; the one thing to carry over is the translation. Read every XIO as “true when the bit is 0” and the name stops misleading you.

The symbol carries the history too. XIO is drawn as a contact with a slash through it, the relay symbol for a normally closed contact. That is why so many people pair the slashed symbol with a normally closed device. The symbol describes the instruction’s logic, not the wiring outside the cabinet.

What does the XIO instruction actually read?

XIO reads a bit in controller memory, exactly as XIC does: a copy of an input terminal made by the I/O system, an internal bit, a member of a user-defined type, a timer’s status bit or one bit of a DINT. What makes XIO different is the value it passes on. A bit can be 0 for many reasons, and XIO is true for all of them.

Four ways a bit can read 0, and every one makes an XIO trueFour cards. One: the field device is off or open, the normal case, for example a full switch that has not closed. Two: the wire is broken or the input lost its supply, so a signal that should be 1 reads 0. Three: nothing in the program writes the tag, so it stays at the value it was created with, usually 0. Four: another rung, an HMI or a MOV wrote 0. An XIO is true in all four cases and cannot tell them apart. The amber cards are the ones that make XIO dangerous as a permissive.AN XIO CANNOT TELL THESE APARTThe device is offThe normal case: Bin_Full = 0because the bin has room.The wire is brokenA signal that should be 1 reads 0.XIO turns true on a fault.Nothing writes the tagA new or orphaned tag stays at 0,so an XIO on it is always true.Something else wrote 0Another rung, an HMI or a MOV.Cross-reference every writer.
An XIO is true whenever its bit is 0. The device being off is only one of the reasons; the amber cards are the ones that turn an XIO into a hidden risk.
  1. The field device is off or open. The normal case: the bin has room, the jam sensor sees nothing, the overload has not tripped.
  2. The signal is lost. A broken wire, a loose terminal or a blown fuse makes a signal that should be 1 read 0. An XIO on it turns true.
  3. Nothing writes the tag. A tag that no instruction, module or HMI writes keeps the value it was created with, which in practice is 0. An XIO on a misspelled or orphaned tag is true forever.
  4. Something else wrote 0. Another rung, a MOV, an HMI button or a recipe download.
A grey control panel with black selector switches arranged around a red emergency stop button
Every button on this panel ends up as a bit. The program never sees the switch, only whether its bit is 1 or 0.

The first case is the reason XIO exists. Cases two and three are the reason it needs care. As engineering practice: an XIC on a signal that is 1 when healthy goes false on a broken wire, which is the stop direction. An XIO on the same wire goes the other way: the rung goes true. That is fine when the XIO raises an alarm on a lost signal, which is one of its best uses. It is not fine when the XIO is the permissive that lets a machine move.

In RSLogix 500 the addressing changes but the instruction does not. Rockwell’s SLC 500 instruction set reference manual (1747-RM001) uses a normally closed motor overload contact wired to I:0/10 as one of its own XIO examples, alongside an output bit and a timer done bit. In Logix the operand can be any BOOL, written as a tag name such as Jam_Fault, a member such as Pump101.Fault, or a bit of a DINT such as Drive_Status.3.

Should you use XIO for a normally closed stop button?

No. A normally closed stop button holds its input at 24 V while nobody touches it, so its bit is 1 at rest. A rung that should let the machine run while Stop is not pressed must pass when the bit is 1, which is XIC. Programming it with XIO “because the button is normally closed” inverts the stop.

Animation of a normally closed stop button and two rungs reading Stop_PB, one with an XIO and one with an XIC, showing that the XIO permit is backwards.
With a normally closed stop button, Stop_PB is 1 at rest. The XIO rung is false, so the machine never gets a permit, and it turns true while Stop is pressed. The XIC rung behaves the way a stop should. Download the GIF

This is the most common XIO question, and the mistake behind it is double negation: the wiring already inverts the signal, so inverting it again in the logic cancels it out. The rule that avoids it is the same one the XIC page uses. Ignore the device type and ask what value the bit has when the rung should pass:

SignalBit value when the rung should passInstruction
Stop button, normally closed, rung lets the machine run1 (not pressed)XIC
Motor overload contact, normally closed, rung raises the trip alarm0 (tripped)XIO
Fault bit set by the program, rung lets the machine run0 (no fault)XIO
Photo-eye, on when blocked, rung releases the next carton0 (lane clear)XIO
Other machine’s running bit, interlock rung0 (other machine stopped)XIO
Low level switch, closed while wet, rung raises the low level alarm0 (dry)XIO

Notice where XIO appears: wherever the rung should pass because something is absent, stopped or healthy. That covers a lot of real logic, and none of it depends on whether the device is normally open or normally closed.

XIO vs XIC: what is the difference?

XIO and XIC test the same bit and give opposite answers. XIO is true when the bit is 0; XIC is true when the bit is 1. If the rung reaching either one is false, both pass false, and neither instruction changes the bit. Most programs read their important bits both ways, in different rungs.

Animation of two rungs reading Motor_Fault: an XIC driving a fault light and an XIO driving a run permit, which swap as the fault bit changes.
One fault bit, two rungs. While Motor_Fault is 0 the XIO rung gives the run permit; when it becomes 1 the XIC rung lights the fault lamp and the permit drops. Download the GIF
XIO (Examine If Open)XIC (Examine If Closed)
True when the bit is01
SymbolTwo bars with a slashTwo bars
Other vendors’ nameNormally closed contact, negated contactNormally open contact, contact
Structured text equivalentIF NOT Bit THENIF Bit THEN
Typical useNo-fault permissives, interlocks, “lane clear”, alarms on lost signalsRunning and ready signals, commands, normally closed stops
On a broken wire (signal 1 when healthy) it goesTrueFalse
Changes the bitNoNo

The broken-wire row is the one to remember. It is why a permissive built from XICs tends to fail safe and one built from XIOs needs a second look.

How do XIOs combine in series and parallel?

XIOs in series pass power only when every bit is 0. XIOs in parallel pass power when at least one bit is 0. A chain of XIOs on fault bits is the usual “no faults at all” permissive: any single fault breaks it.

Animation of a series rung with XIO Jam_Fault and XIO Overload_Trip, a parallel rung with XIO Lane1_Full and XIO Lane2_Full, and a truth table filling in four rows.
The truth table fills in as both bits cycle. Two XIOs in series pass only when both bits are 0; two XIOs in parallel pass unless both bits are 1. Download the GIF
ABSeries XIOs: NOT A AND NOT BParallel XIOs: NOT A OR NOT B
0011
1001
0101
1100

In the animation, A is Jam_Fault on the series rung and Lane1_Full on the parallel rung; B is Overload_Trip and Lane2_Full. Series XIOs are a logical NOR of the bits: true only when none is set. Parallel XIOs are a NAND: true unless all are set. Two useful consequences:

  • One summary bit beats a long chain. A twelve-XIO permissive across a rung is hard to read online. Many programs build a single Any_Fault bit from parallel XICs in one place and read it with one XIO everywhere else. The logic is the same (De Morgan’s law); the troubleshooting is far easier.
  • Parallel XIOs answer “is there room anywhere?” Two lanes, two full switches in parallel XIOs: the rung passes while either lane has space. That is the accumulation logic behind many packaging infeeds.

When does an XIO look at its bit? The scan and prescan

XIO reads its bit at the moment the controller executes it, so it sees whatever value the bit holds at that point in the scan. A bit written by a rung further down was last written in the previous scan, unless something outside this routine, such as an HMI or another task, changed it since. That timing is not a nuisance; it is how one of the oldest ladder patterns works.

Animation of a scan cycle beside two rungs: an XIC on Start_PB in series with an XIO on Start_Mem driving Start_Pulse, and an XIC on Start_PB driving Start_Mem, showing a one-scan pulse.
Rung 0 is true for one scan only: on the first scan Start_Mem is still 0, so the XIO passes, and rung 1 then sets Start_Mem. On the next scan the XIO reads the 1 and Start_Pulse drops. Download the GIF

The pattern in the animation is a one-scan pulse built by hand. Rung 0 reads Start_Mem, rung 1 writes it. On the scan where Start is first seen, Start_Mem is still 0 from the scan before, so the XIO passes and Start_Pulse is 1. Rung 1 then sets Start_Mem. On the next scan the XIO sees the 1 and the pulse ends. The one-shot instructions (ONS, OSR and OSF) package this behaviour so you do not have to build it; they get their own page in this guide. Seeing it built from an XIO is the best way to understand what they do.

Prescan, default values and asynchronous inputs

Three more timing facts matter for XIO in particular:

  • Prescan passes false. Rockwell’s execution table says XIO passes false during prescan, regardless of its bit. The coils on those rungs are handled the way prescan handles them: OTE bits are cleared, and OTL and OTU leave their bits alone (see the OTE and OTL pages).
  • New tags read 0. A tag created in a download, or one nobody has written yet, is 0, so every XIO on it is true from the first scan. If an XIO permissive depends on another machine or a network connection, make sure the bit is written before you trust its 0.
  • Logix inputs can change mid-scan. In ControlLogix and CompactLogix controllers, input data arrives asynchronously to logic execution, so two XIOs on the same input in one scan can disagree. Process image controllers, including the Siemens S7-1500 and the SLC 500, read inputs once at the start of the scan. The XIC page shows the buffering fix, which applies unchanged.

XIO in practice: seven scenarios from simple to advanced

Each scenario shows a rung in a particular state, why XIO is the right instruction, and what goes wrong. Tag names are examples, written the way I would want them in a real program.

1. Material handling: forward and reverse interlock

A reversing conveyor has a forward contactor and a reverse contactor, and both must never be energised together. Each direction’s rung carries an XIO on the other direction’s run bit.

Animation of two rungs: XIC Fwd_PB with XIO Rev_Run driving Fwd_Run, and XIC Rev_PB with XIO Fwd_Run driving Rev_Run, with a conveyor motor showing its direction.
Forward runs first, so the XIO on Fwd_Run blocks the reverse rung while Reverse is also pressed. When Forward is released, the reverse rung, solved after it, goes true in the same scan. Download the GIF

Why XIO: each direction may run only while the other one’s bit is 0. When Forward is released, the reverse rung goes true in the same scan, because it sits below the forward rung and reads the freshly written 0. What goes wrong: that is exactly the problem. Changing direction without a stop lets the second contactor pull in the instant the first one’s bit drops, while the first may still be arcing open. Reversing starters therefore also get a mechanical or hardwired electrical interlock, and many programs add a short off-delay before the other direction is allowed. Many designs also read each contactor’s auxiliary contact, with an XIO on the other contactor’s feedback, so the interlock reflects what the contactor did and not only what the program asked. Treat the XIO as the logic layer, never the only layer.

2. Packaging: feed cartons only while the lane has room

An accumulation lane in front of a case packer has a full sensor near its end. The infeed releases cartons while the lane has room and nothing downstream is jammed.

Packaging: feed cartons only while the lane has roomOne rung. XIC Infeed_Running, XIO Lane_Full and XIO Downstream_Jam in series drive the coil Infeed_Release. In the state shown the lane is not full and there is no jam, so both XIOs are true and cartons are released.Infeed_RunningXIC= 1Lane_FullXIO= 0Downstream_JamXIO= 0Infeed_ReleaseOTE5
Two XIOs in series with the running command: the lane is not full and nothing downstream is jammed, so cartons are released.

Why XIO: Lane_Full and Downstream_Jam are both 0 in the state where the infeed should run. What goes wrong: first, gaps: an eye at the end of a lane sees the gaps between cartons, so filter it with an on-delay before trusting it either way. Second, failure: a full-lane photo-eye that fails, or whose cable is cut, reads 0, which the XIO reports as “room in the lane”, and the infeed keeps pushing cartons into a full lane. Where a pile-up would cause damage, choose a sensor mode where failure reads as blocked (a light-operated eye that is on while the beam is clear), and read it with an XIC on a “lane has room” bit instead.

3. Water and wastewater: stop chlorine dosing on low flow

A chlorine dosing pump on a treatment line must not inject into still water. A flow switch reports low flow, and an analyzer reports its own fault.

Water treatment: stop chlorine dosing on low flowOne rung. XIC Dosing_Auto, XIO Low_Flow and XIO Analyzer_Fault in series drive the coil Cl2_Pump_Run. In the state shown the flow switch reports low flow, so Low_Flow is 1, its XIO is false, and the dosing pump stops so chlorine is not injected into still water.Dosing_AutoXIC= 1Low_FlowXIO= 1Analyzer_FaultXIO= 0Cl2_Pump_RunOTE12
The flow switch reports low flow, so the XIO on Low_Flow is false and the dosing pump stops even though dosing is in automatic.

Why XIO: the pump may run only while Low_Flow and Analyzer_Fault are 0. What goes wrong: the same failure-direction problem in a more serious place. If the flow switch wiring breaks, Low_Flow reads 0 and the pump is allowed to dose into a pipe with no flow. Sound designs take the permissive from a positive “flow proven” signal read with XIC, from a flow transmitter with a range check, and supervise the switch with a discrepancy alarm. On a chemical feed the flow proof is usually also wired into the pump’s own circuit, so a controller fault cannot start the pump on a dry pipe. The XIO version is common in older programs and worth looking for in an audit.

4. Chemicals and process: a low level switch raises an alarm and protects the pump

A supply tank feeds a pump. A low level switch, LSL-201, is wired so that it is closed while wet. When the level falls below it, its bit drops to 0: an XIO on it raises the alarm, and an XIC on the same bit removes the pump’s permit.

Animation of a supply tank draining through a pump until a low level switch goes dry; a rung with XIO LSL_201 turns on an alarm and a pump rung with XIC Pump_Request and XIC LSL_201 stops the pump.
As the tank draws down, LSL_201 stays 1. When the level falls below the switch the bit drops to 0, the XIO on rung 0 raises the low level alarm and the XIC on rung 1 stops the pump. Download the GIF

Why XIO: the alarm should be on exactly when the switch reports dry, which is when its bit is 0. This is XIO at its best: because the switch reports wet as 1, a broken wire also reads 0, raises the same alarm and stops the pump. The failure direction is the safe one. What goes wrong: two things. A wave at the switch can chatter the pump, so add a short off-delay or a separate low-low switch for the pump trip. And wiring the switch the other way (closed when dry) while keeping the same logic means a broken wire reads as “wet”, the alarm stays silent and the pump runs dry. Read the loop drawing before you pick the instruction.

5. Food and beverage: a product valve that stays shut during cleaning

A filler’s product valve must never open while the line is in clean-in-place, or caustic and product can meet. The valve rung carries an XIO on CIP_Active and another on the divert valve’s open proof.

Food and beverage: a product valve that stays shut during cleaningOne rung. XIC Fill_Step, XIO CIP_Active and XIO Divert_Valve_Open in series drive the coil Product_Valve_Open. In the state shown the line is in cleaning, CIP_Active is 1, and the product valve cannot open even though the fill step is active.Fill_StepXIC= 1CIP_ActiveXIO= 1Divert_Valve_OpenXIO= 0Product_Valve_OpenOTE8
The line is in cleaning, so CIP_Active is 1 and the product valve cannot open, even though the fill step is active.

Why XIO: the product valve may open only while cleaning is not active and the divert path is not open. What goes wrong: CIP_Active usually comes from another controller or a CIP skid over the network. If that connection drops and the tag freezes at 0, or a new program download resets it to 0, the XIO passes. Interlocks between product and cleaning chemicals are normally backed by physical separation (a swing panel, a mix-proof valve with proven positions or block-and-bleed), and the network bit is supervised with a heartbeat, as in the OEM status word problem on the XIC page.

6. Pharmaceutical: an autoclave door releases only when depressurised

A steam steriliser’s door lock may only release once the cycle has ended and the chamber is vented.

Pharmaceutical: an autoclave door releases only when depressurisedOne rung. XIC Release_Request, XIO Chamber_Pressurized and XIO Cycle_Running in series drive the coil Door_Release. In the state shown the cycle has ended and the chamber is vented, so both XIOs are true and the door is released.Release_RequestXIC= 1Chamber_PressurizedXIO= 0Cycle_RunningXIO= 0Door_ReleaseOTE3
The cycle has ended and the chamber is vented, so both XIOs are true and the release request frees the door.

Why XIO: the door may be released only while Chamber_Pressurized and Cycle_Running are 0. What goes wrong, and this one matters: a pressure vessel door interlock is a safety function. It belongs to a safety-rated design with its own pressure sensing and locking, validated to the pressure vessel and steriliser standards that apply and to the performance level its risk assessment requires (ISO 13849-1 is one framework for the control system). Doors on pressure vessels also carry a mechanical lock that cannot be opened under pressure. The standard PLC reads the interlock’s status, sequences the cycle and tells the operator why the door will not open. If a single XIO on a standard input is the only thing between an operator and a pressurised door, the design is wrong, not the rung.

7. Automotive: index the conveyor only when the robot is clear

In a welding cell, the conveyor may index the next body only while the robot is out of the conveyor zone and its communication is healthy.

Automotive: index the conveyor only when the robot is clearOne rung. XIC Index_Request, XIO Robot_In_Zone and XIC Robot_Comms_OK in series drive the coil Conveyor_Index. In the state shown the robot reports it is clear of the conveyor and its communication is healthy, so the index is allowed.Index_RequestXIC= 1Robot_In_ZoneXIO= 0Robot_Comms_OKXIC= 1Conveyor_IndexOTE21
The robot reports it is clear of the conveyor and its communication is healthy, so the index is allowed. Note the XIC on the communication bit.

Why XIO: Robot_In_Zone is 0 when the robot is clear. What goes wrong: that bit arrives over a network from the robot controller. If the connection drops, the bit can keep its last value or reset to 0, depending on how the data arrives, and a 0 reads as “clear”. That is why the rung also carries an XIC on Robot_Comms_OK, built from a heartbeat. This is a sequencing interlock only. Keeping people and the robot apart is the job of the cell’s safety system (ISO 10218 for robots), never this rung.

What does XIO look like in each vendor’s software?

Every ladder editor has the instruction. Rockwell Automation calls it XIO in Studio 5000 Logix Designer and RSLogix 500 (more on those platforms on our Rockwell Automation page). Siemens, Mitsubishi Electric, AutomationDirect and Phoenix Contact call it a normally closed contact. CODESYS and Beckhoff call it a negated contact. The symbol, two bars with a slash, is the same almost everywhere.

The same instruction across six programming environmentsA table of six rows. Rockwell Automation calls the instruction XIO, Examine If Open, in Studio 5000 Logix Designer and in RSLogix 500. Siemens TIA Portal, Mitsubishi Electric GX Works3 and AutomationDirect CLICK call it a normally closed contact, and CODESYS calls it a negated contact. Each row shows the same symbol, two bars with a slash, an example operand and the text form. All of them are true when the operand is 0.VENDOR AND SOFTWARELADDERTEXT FORMRockwell AutomationStudio 5000 Logix DesignerXIO, Examine If OpenJam_FaultXIO(Jam_Fault)Rockwell AutomationRSLogix 500 (SLC 500, MicroLogix)XIO, Examine If OpenI:1/10XIO I:1/10SiemensTIA Portal (S7-1500)Normally closed contact"Jam_Fault"STL: AN "Jam_Fault"Mitsubishi ElectricGX Works3 (MELSEC iQ-R)Normally closed contactX10LDI X10 / ANI X10IEC 61131-3 / CODESYSCODESYS-based softwareNegated contactbJamFaultST: IF NOT bJamFault THENAutomationDirectCLICK Programming SoftwareNormally closed contactX010Ladder only
The same instruction in six notations: the symbol barely changes, while the name, the addressing and the text form are where the vendors differ.
VendorSoftwareName of the instructionExample operandText form
Rockwell AutomationStudio 5000 Logix DesignerXIO, Examine If OpenJam_Fault, Local:1:I.Data.10Rung text XIO(Jam_Fault); ST IF NOT Jam_Fault THEN
Rockwell AutomationRSLogix 500 (SLC 500)XIO, Examine If OpenI:1/10, B3:0/5XIO I:1/10
SiemensTIA Portal (S7-1200, S7-1500)Normally closed contact"Jam_Fault", %I0.5STL AN "Jam_Fault" on S7-1500
Mitsubishi ElectricGX Works3 (MELSEC iQ-R)Normally closed contactX10, M5LDI starts a rung, ANI in series, ORI in parallel
Phoenix ContactPLCnext EngineerNormally closed contactA named BOOL variableST IF NOT Jam_Fault THEN
IEC 61131-3 / CODESYS, BeckhoffCODESYS, TwinCAT 3Negated contactA named BOOL variableST IF NOT bJamFault THEN
AutomationDirectCLICK Programming SoftwareNormally closed contactX010, C5None; ladder only

Sources: Rockwell Automation 1756-RM003 and 1747-RM001; Siemens TIA Portal V20 help (LAD and STL for S7-1500); Mitsubishi Electric SH(NA)-081265ENG; CODESYS and Beckhoff online help; Phoenix Contact PLCnext Engineer help; AutomationDirect CLICK instruction list.

The same XIO in each vendor’s editor

These are real screenshots of the instruction in 23 programming environments, ordered the same way as on the XIC page: first the platforms that dominate North American plants, then the machine-builder platforms you meet on imported equipment, then compact and regional controllers. Each one is framed the same way, with the instruction ringed in amber and the source credited under it. Pick a tab to switch software. Watch the operand change, from a tag with an alias to a file address to a device number, while the slashed contact stays put. One caution about the first two tabs: those tutorials use a normally open stop button read with an XIO, the pattern this page recommends against for stops.

VendorSoftwareWhy it is not shown yet
Schneider ElectricEcoStruxure Control Expert (Modicon M340, M580)The manual’s LD chapter shows only drawn symbols, with no editor window. Machine Expert and Machine Expert - Basic are shown above.
EmersonPAC Machine EditionNo public screenshot of a normally closed contact in the editor.
Phoenix ContactPLCnext EngineerNo public screenshot of a normally closed contact in the editor; the help page that has one was blocked to automated fetch.
KEYENCEKV STUDIOThe manuals sit behind a download form and no public screenshot of the ladder editor turned up.
B&RAutomation StudioNo public screenshot of the LD editor.
InovanceInoProShop, AutoShopThe public manuals have no ladder editor figures.
WAGOe!COCKPITNo public LD screenshot; it is built on CODESYS, shown above.

If you work in one of these, the instruction is the same normally closed contact; we will add your editor when we capture it ourselves.

Two differences matter when you switch platforms. Siemens builds logic on the result of logic operation (RLO): on an S7-1500, STL AN checks an operand for 0 and ANDs it with the RLO, which is a series XIO. And Mitsubishi Electric’s instruction list makes the structure explicit with LDI to start a rung on a normally closed contact and ANI or ORI to add one in series or in parallel. If you want a practice environment, I have walked through installing RSLogix 500 for free and TIA Portal.

Why is my XIO true when it shouldn’t be? A debugging checklist

An XIO that is true at the wrong moment almost always means its bit is 0 for a reason you did not expect. Work from the rung back to the field.

  1. Check the rung to its left. XIO can only pass true if the rung condition reaching it is true.
  2. Read the bit in a tag monitor. Confirm the value and the scope. A program-scoped tag with the same name as a controller-scoped one shadows it, and the program tag may never be written.
  3. Find every writer. Cross-reference the tag. No writer at all means the bit is stuck at its initial 0 and the XIO is permanently true. More than one writer means the last one to execute wins.
  4. Check the input card’s indicator. If the device is on but the input’s light is off, the problem is in the field: the device, the wiring, the fuse or the supply. A dead circuit reads 0 and makes every XIO on it true.
  5. Check the module and its connection. A faulted module or a lost connection can leave input data at a stale or cleared value. Check the module’s status before trusting the tag.
  6. Check network bits at their source. For bits from another controller, a robot or a skid, confirm the connection is healthy and the other side is actually writing.
  7. Look for a force. A forced bit holds 0 or 1 whatever the field does.
  8. Think about timing. In Logix, an input that changes mid-scan can be 0 for one XIO and 1 for another in the same scan.

Step 3 deserves the emphasis. “Nothing writes this tag” is a problem only XIO can hide: an XIC on an orphaned tag is dead and someone notices; an XIO on it is quietly true for years. Version control for PLC code and a cross-reference review at every change are how plants catch it.

Common XIO mistakes

MistakeWhat happensFix
XIO on a normally closed stop buttonThe machine has no permit at rest and gets one while Stop is pressedChoose from the bit’s value when the rung should pass: XIC
XIO permissive on a signal that reads 0 when it failsA broken wire or lost connection grants the permitUse a fail-safe signal read with XIC, or supervise the signal
XIO on a tag nothing writesThe rung is permanently trueCross-reference every XIO tag; delete or wire up orphans
Long chains of XIOs on separate fault bitsHard to troubleshoot online; one is easily missedBuild one summary fault bit and read it once
Program interlock with no hardware interlockTwo contactors can pull in during a direction changeAdd a mechanical or hardwired interlock and an off-delay
XIO used as the safety functionSafety depends on standard logicSafety relay or safety controller; the PLC reads status only

Test yourself: an interview quiz on XIO

Ten questions, the kind I'd ask in an interview for a controls role to see whether someone really understands XIO. Pick an answer and the explanation appears straight away.

0 of 10 answered

  1. In one sentence, what does an XIO instruction test?

  2. A stop button is wired normally closed. Which instruction belongs in the rung that lets the machine run?

  3. In a Logix controller, what does an XIO pass to the right during prescan?

  4. The wire to a fault contact breaks. The fault bit drops to 0. What does an XIO on that bit do?

  5. Two XIOs are in series on bits A and B. When is the rung true?

  6. Rung 0 has an XIO on Run_Mem. Rung 5 writes Run_Mem. What does the XIO on rung 0 see?

  7. What is the structured text equivalent of XIO(Jam_Fault)?

  8. Which name does CODESYS use for the XIO symbol?

  9. An XIO on a tag is true all the time and the cross reference shows no writer. What is the most likely cause?

  10. Why should a forward/reverse program interlock built with XIOs not be the only interlock?

Five harder XIO problems

These are commissioning-grade problems. Try each on paper before opening the solution. The rungs are written in Logix rung text: XIC(tag) and XIO(tag) are contacts, square brackets with commas are parallel branches, and OTE(tag) is the output coil.

Problem 1: the infeed that never stops on a dead sensor

A case packer infeed uses XIC(Infeed_Running) XIO(Lane_Full) OTE(Infeed_Release). The lane-full photo-eye is a dark-operated sensor: its output is on while the beam is blocked. Twice this month a cable was crushed by a forklift and the infeed buried the packer in cartons. Redesign the signal and the rung so a dead sensor stops the infeed.

Show the solution

Switch the sensor to light-operated, so its output is on while the beam is clear, and name the bit for what a 1 means: Lane_Has_Room. Then read it with XIC:

XIC(Infeed_Running) XIC(Lane_Has_Room) OTE(Infeed_Release);

Now every failure that makes the input read 0 (a crushed cable, a dead sensor, a lost supply) reads as “no room” and stops the infeed. The original rung failed the other way because the XIO treated 0 as good news. A sensor whose output has failed on, or one aimed at the wrong reflector, can still read 1, so for a lane where a pile-up causes real damage, add a supervision rung: if Lane_Has_Room has not changed state for longer than the lane could plausibly run without a gap, raise a sensor alarm. That timer belongs to the timers page in this guide.

Problem 2: a one-scan pulse that never fires

A colleague built a manual one-shot for a reject counter:

XIC(Reject_PE) XIO(Reject_Mem) OTE(Reject_Pulse);
XIC(Reject_PE) OTE(Reject_Mem);
XIC(Reject_Pulse) ADD(Reject_Count, 1, Reject_Count);

It counts correctly in testing. In production, after someone moved the second rung to the top of the routine to “keep the memory bits together”, the count stays at zero. Explain why, and say how to make the pattern reliable.

Show the solution

The pattern depends on scan order. The XIO must read Reject_Mem before it is written in the same scan, so it sees last scan’s value. With the memory rung moved above it, Reject_Mem is set to 1 earlier in the same scan, the XIO reads 1 and is false, and Reject_Pulse is never true. Nothing counts.

The reliable fix is to use the instruction built for the job, which keeps the storage bit inside the instruction so rung order cannot break it:

XIC(Reject_PE) ONS(Reject_ONS) ADD(Reject_Count, 1, Reject_Count);

If you keep a hand-built version for a reason, put the read and the write on the same rung, in that order, and comment it. On Logix, also buffer the input once at the top of the routine: an input can change between the two rungs, set the memory bit and never fire the pulse. ONS avoids that by reading the rung once. The lesson for XIO is general: an XIO on a bit written later in the scan reads the previous scan’s value, and moving rungs changes the answer.

Problem 3: the CIP interlock after a download

The filler’s product valve rung is XIC(Fill_Step) XIO(CIP_Active) OTE(Product_Valve_Open). CIP_Active is a consumed tag from the CIP skid’s controller. During a weekend download of the filler program, the connection to the skid is down for several minutes while the skid is in its caustic step. What value does CIP_Active have, what can happen, and how should the rung be built?

Show the solution

You cannot know for certain without testing the connection’s fault behaviour, and that is the problem. Depending on how the data arrives, a consumed tag may hold its last value or may not be updated at all after a download, and a freshly downloaded tag starts at 0. If it reads 0, the XIO passes, and a fill step could open the product valve while caustic is in the line.

Build the permissive from positive proof that the skid is not cleaning and that you are still hearing from it:

XIC(CIP_Idle) XIC(CIP_Link_OK) XIO(CIP_Active) OTE(CIP_Permit);
XIC(Fill_Step) XIC(CIP_Permit) OTE(Product_Valve_Open);

CIP_Idle is a bit the skid sets to 1 only when it is idle, CIP_Link_OK comes from a heartbeat check and the connection’s own status, and the XIO stays as a second check. With this design, every communication failure removes the permit. And because product and caustic meeting is a serious hazard, the physical separation (mix-proof valves with proven positions, or a swing panel) stays the real protection.

Problem 4: interlock two conveyors that share a transfer

Two infeed conveyors, A and B, feed one transfer plate. Only one may run onto the plate at a time, A has priority, and a conveyor that loses its turn must wait until the other is stopped and its photo-eye Plate_Clear reports the plate empty. Write the two run rungs, each with its own request bit.

Show the solution
XIC(A_Request) XIC(Plate_Clear) XIO(B_Run) OTE(A_Run);
XIC(B_Request) XIC(Plate_Clear) XIO(A_Run) [XIO(A_Request) ,XIC(B_Run) ] OTE(B_Run);

Each run rung needs the other conveyor stopped (an XIO on its run bit) and the plate clear. The priority comes from the branch in B’s rung: while A is asking, B cannot start, but the XIC(B_Run) path lets a B that is already running carry on, so A wins contention without interrupting a transfer in progress. Rung order breaks the tie inside one scan, because A’s rung runs first and B’s XIO on A_Run sees A’s new value straight away.

Two practical points. Plate_Clear is read with XIC, so a dead plate sensor stops both conveyors rather than letting both run onto an occupied plate. And both rungs will drop out as soon as a product reaches the plate, so in a real program each run bit is held by a seal-in or a short sequence until the product has fully transferred. Those belong to the OTE and timer pages; the XIO’s job is the mutual exclusion.

Problem 5: the permissive that was always true

A mixer will not stop when its high-torque alarm should stop it. The run rung is XIC(Mixer_Start_Seal) XIO(Mixer_HiTorque) OTE(Mixer_Run). You find:

  1. The drive’s high-torque output lights its terminal LED during a test.
  2. Local:3:I.Data.7 goes to 1 during the test.
  3. The controller-scoped tag Mixer_HiTorque is an alias for Local:3:I.Data.7.
  4. The rung is in the routine Mixer_Logic of the program Mixer, which was copied from another line.
  5. Online, the XIO on Mixer_HiTorque stays true during the test.

What is wrong, and how do you stop it happening again?

Show the solution

Facts 1 to 3 show the signal reaching the controller-scoped alias correctly. Fact 5 says the XIO never sees it, so the XIO is reading a different tag. In Logix, a program-scoped tag takes precedence over a controller-scoped tag of the same name inside that program (Rockwell’s tag scope documentation describes this). The copied Mixer program most likely brought a program-scoped Mixer_HiTorque with it. Nothing writes that tag, so it is 0, and the XIO on it is permanently true. With an XIC the same mistake would have stopped the mixer and been found on day one; with an XIO it hid until the alarm was needed.

Delete the program-scoped duplicate after checking nothing else in the program uses it, so the rung binds to the controller tag, then test the trip again. To prevent it, review imported programs for program tags that shadow controller tags, run a cross-reference on every XIO tag for “no writer”, and use a naming standard that makes scope obvious.

Where XIO fits in this guide

XIO is the second instruction in Joltek’s PLC Programming guide, after XIC. Between them, they are every input contact you will read in a ladder program. The next page covers the instruction those contacts feed: the output coil, OTE, followed by latch and unlatch, the one-shot, and then timers and counters. The instruction glossary lists them all.

If your team needs this kind of grounding on its own equipment and programs, that is what our hands-on PLC and SCADA training for plant teams is for.

References and further reading

  1. Logix 5000 Controllers General Instructions Reference Manual (1756-RM003) · Rockwell AutomationExamine If Open (XIO): operand, execution table, prescan and postscan. Read in revision P (December 2014).
  2. SLC 500 Instruction Set Reference Manual (1747-RM001) · Rockwell AutomationXIO in RSLogix 500, including the normally closed overload example on I:0/10.
  3. LAD (S7-1200, S7-1500): Normally closed contact · Siemens, TIA Portal V20 online help
  4. MELSEC iQ-R Programming Manual (Program Design), SH(NA)-081265ENG · Mitsubishi ElectricNormally closed contact and the LDI, ANI and ORI instructions.
  5. CODESYS LD/FBD: Contact · CODESYS Group, online help
  6. LD Language Elements · Phoenix Contact, PLCnext Engineer help
  7. SIMATIC S7-1500 Cycle and Response Times, Function Manual · SiemensThe process image of the inputs is read at the start of each cycle.

← PLC Programming guide and instruction glossary

Have a project that needs technical ownership?

Send us the situation. If it is not something we should take on, we will say so.

The Plant-Side Brief

The weekly brief for the people who own a plant’s control systems.

One email every Wednesday for engineering and operations leaders responsible for controls, SCADA, MES and OT networks. Skim the top in two minutes; read the Deep Dive when you have fifteen.

  • One modernization problem, worked through to cost, risk and a schedule you can defend. The Deep Dive.
  • End-of-support dates before they reach your plant Windows, servers, controllers and HMI software. Lifecycle Watch.
  • A checklist your engineers can run that week not a framework to admire. Field Kit.
  • Every number sourced, no vendor agenda we are paid by plants, never by vendors.