# XIC/XIO confusion



## 5volts (Jan 11, 2008)

The reason for this in PLC programming is to make the circuit "Fail Safe."
If for instance a wire breaks, the input to the PLC would drop out, stopping the circuit

Heres a simple way to look at it, in the PLC

If the normally open contact -| |- is Not-Hot (OFF) then the signal is OFF.

If the normally open contact -| |- is Hot (ON) then the signal is ON.

If the normally closed contact -|/|- is Hot (ON) then the signal is off

If the normally closed contact -|/|- is Not-Hot (OFF) then the signal is ON. 

Hope this helps. P


----------



## John (Jan 22, 2007)

daddymack said:


> This has baffled me for years. I just learned to accept it but now I hope someone can explain it to me.
> 
> Using a simple start stop program in PLC as an example. Why is the stop button a XIC? In motor control you would want your stop NC. Whats the logic behind the start and stop being in the same state at the atart up of a plc program?
> 
> ...


The PLC program doesn't know how the pushbutton is wired. All it knows is whether there is a ”TRUE “ or a “FALSE” input at the terminal.
Normally open contacts addressed to that input point are “FALSE”, normally closed contacts addressed to it are “TRUE”. The input will be “TRUE” when a physical pushbutton wired normally open is pressed, or because a physical pushbutton wired normally closed is not pressed. 

If the PLC does not see something ,you want it to go a fail safe condition. In the case of a STAR/STOP circuit you want to stop.

Trick question :whistling2:


----------



## daddymack (Jun 3, 2008)

Still kind of lost

OK, what I gather is that when power is applied, the stop is energized and changes state (Closes). Then pressing start completing circuit would turn on the light. I think I'm missing something here. I'm rushing cause I have to leave but want to geyt this down on paper.

In Motor control logic, you wire the stop NC. Pushing start turns on light.





stop start light

----------l l-------------l l------------------------------( ) PLC



--------O__O----------oTo-----------------------------( ) MC



Thats what I see. don't really need the stop because not interlocked but where am I off?

I know PLC is about true/false, on/off, 0/1. Somewhere in there is where I'm getting disconnected.


thanks


----------



## ron_b (Jul 15, 2008)

replace the "eXamine If Open/Closed" mentally to "eXamine If True/False". all the plc is looking for is to see if that rung is valid before moving on to the next sequence of instructions or to a subroutine. the inputs in a rung have to be valid, before any output will turn on. doesnt matter if the output is used as a bit instruction in another part of the program or if its actually being used to directly energize a coil of an ice-cube relay or motor starter.

hope this helps.


----------



## Kletis (Jan 18, 2008)

*XIC vs. XIO*

When hardwiring you always use a normally closed pushbutton when you wire in a stop for obvious reasons. When you wire into a PLC you always have to think about safety of course and also the programs ability to update when something happens in the process. If you wired a normally open contact for the stop you would have to energize the output in order to give a "true" signal to the processor to tell it to stop the logic. In this scenario what will happen if you lose power at your N.O. stop push button? You would then no longer have the ability to update the processor and tell it you want to stop the process.

If you wire this with a Normally Closed pushbutton, you are relying on having control power in order to run the logic. Now you are saying if you de-energize the input for any reason, you will lose the signal and stop your process. By leaving that input constantly energized, you ensure that if you lose control power whether it be by pressing the stop button, flipping a breaker or disconnect, or any other means your processor will be updated and you can have it affect your program as you would like.

As far as within the PLC, your hardwired normally closed pushbutton is always keeping the stop input energized. This means that any time the process is running properly you will have an energized stop input. Within the program, you will put in an XIC contact (open contact.) Any time that the input is true, this contact will change state. Since the input is always true in normal operation, your contact will be closed any time the process is running. With a closed contact, this will work just like the normally closed pushbutton works in hardwired logic. Think of it as a normally open contact held closed in normal operation.

I hope this helps!!! :thumbsup:

Kurtis


----------



## Ray Cyr (Nov 21, 2007)

daddymack said:


> Still kind of lost
> 
> OK, what I gather is that when power is applied, the stop is energized and changes state (Closes). Then pressing start completing circuit would turn on the light. I think I'm missing something here. I'm rushing cause I have to leave but want to geyt this down on paper.
> 
> ...


Another way to look at this is to look at the individual instructions in your example. You show a PLC rung and then a hardwired ladder logic from which we can draw direct comparisons.

Starting with the PLC rung, you have an XIC (eXamine If Closed), then an XIC, then an OE (Output Energize). The computer will only make the OE true if there is a path of true instructions from left to right.

An XIC instruction tells the computer to look at its (the instructions) associated device, if the device is closed then the computer sees the instruction as true.

In your example, the computer will see the normally closed stop push button as being in a true state until, and unless, the button is pushed. The computer will also see the normally open start push button as being in a false state until, and unless, the button is pushed. So when the start button is pushed, the computer will examine each device, see that each device is in a closed (XIC true) state and energize the output.

So your thinking that you don't really need the stop button, in this example, is correct since the only way to energize the output is to push the start button and hold it in a closed state.


----------



## Mountain Electrician (Jan 22, 2007)

> Using a simple start stop program in PLC as an example. Why is the stop button a XIC? In motor control you would want your stop NC. Whats the logic behind the start and stop being in the same state at the atart up of a plc program?


In a standard relay logic 3 wire motor control your start and stop are also in the same state to start the motor. The stop button is normally closed, and for the amount of time you push the start button, it is closed as well. Then both switches have to be in the same state (open) to stop the motor.

One of the hardest things for me to get my head around when I was learning PLCs was the difference between NO and NC in relay and ladder logic. 

The ---[ ]--- (XIC) is pretty straight forward...it's basically opposite of what you are used to seeing. In relay logic, NO means the power flow stops at that spot until the contacts change state, so you are waiting for something to happen. In ladder logic, the NO contact means it's already happened, the associated bit is on, and the power flow continues.

The ---[/]--- (XIO) is a little trickier. In relay logic, power flow passes a NC contact until the contacts change state. In ladder logic, the NC means that if the associated bit is off then the power flow continues. So, if it's off it's actually on. Clear as mud, right?

Another way to explain it might be that in relay logic, contacts are shown in the shelf state with no power applied, while in ladder logic XIC is normally false (true when the bit is on) and XIO is normally true (false when the bit is on)

Your example:

stop start light


----------l l-------------l l------------------------------( ) PLC


--------O__O----------oTo-----------------------------( ) MC



If the stop button is closed, the first input is on and the power flow continues. 

If input 2 comes on, (the start button is pushed) the power flow continues and the output is turned on. In this example the light will only be on as long as the start button is held in. 

More logic would need to be added to keep the output on after the start button is released, usually utilizing a set of auxiliary contacts from the motor starter. 

I probably haven't explained this well, but my advice is this: if you are really interested in learning PLCs and you have a good handle on sequential logic already, the next step might be learning some computer math. Binary, octal and hexadecimal is how a PLC sees the world, and a basic understanding of these numbering systems was a huge help to me in learning how a PLC works. After that, learning about logic gates, truth tables and boolean algebra will vastly improve your understanding of how the PLC executes its program. 

Depending on where you live, there are probably community college courses you can take that would be a big help. A great book that really made the difference for me was, "Programmable Logic Controllers, Practices and Concepts" by RA Gilbert and JA Llewellyn.


----------

