XIO and XIC... and variations thereof...

Terry Woods said:


Nobody has even suggested removing the symbols... the only suggestion was to understand the symbols in a more direct manner without relying on the imaginary relay to explain ON and OFF.

It's nice that you appear to understand how to make a logical NOT in an electrical circuit. However, it also appears that your primary need for understanding how a relay works might be so that you can understand how the "imaginary relay" works...

Okay, let me clear up this misconception. I do not think of an input of an "imaginary relay". I do think in simple terms of ON and OFF as you suggest. However, I also think that seeing the smybols and compairing them to the operation of a relay is a useful way of learning the symbols and the concepts of NO and NC (or OFF/ON if you perfer) in the first place.
Rote memorization of the symols and concepts is a lot more likely to be forgotten. Comparing them to (and this is a logical comparison, as the symbols come directly from relays) relay logic is a better way of remembering how this whole thing works. A student can go back at any time in the future and simply look at, or think about at a relay in order to refresh their memory. This can not be said for the ON/OFF method of teaching these concepts.


That may have been true 20 years ago, I very much doubt if it applies nowadays. Particularly young engineers getting started in larger companies are likely to start working with PLCs without ever seeing a relay.

New programmers may not be taught relays or any other electrical skills. This is a huge mistake. One can not be an effective programmer without first understanding the process to be controlled. The #1 step in doing this is to understand the operation of the rest of the control system. Except for a few toy problems in a classroom, this will certainly involve the use of relays.
 
Very good explanation, Terry. Thanks for the obvious effort (and skill) you put into this explanation. I feel compelled, though, to reiterate a couple of comments already made.

First, XIO and XIC are strictly Allen Bradley nomenclature, and I'm convinced half the problem with the concept you cover so thouroughly is that this nomenclature is inherrently obscure and non-obvious.

Second, I don't know why so many people get upset with or denigrate the electrical/relay/contact nomenclature. These aren't analogies - they are inherrent parts of RLL (Relay Ladder Logic) programming. The Ladder part of the term is based on JIC ladder diagrams for relay logic control panels. This language was specifically developed to allow electricians (not engineers) work with automatic controllers. The | | and |\| symbols aren't kind of sort of almost like relay contacts. They were by definition created to BE relay contacts, and the ( ) symbol was cerated to BE a coil.

The fact that the RLL symbol is compiled to become AND or TRUE or 1 and 0 is immaterial, just like the final compiled machine language version of C or BASIC is immaterial. In program creation the symbols and syntax used to write the logic is what differentiates one language from another.

Using electrical symbols to define logic was the intent of RLL, and these concepts are part of the language. If someone wants to use an anology to understand the concepts of RLL that's fine. Just don't imply that there is something primitive or improper about thinking in the terms that were part and parcel of the develpment of the language.
 
Last edited:
One can not be an effective programmer without first understanding the process to be controlled.

Certainly no argument about that and as Tom goes on to say, the RLL language was explicitly developed to allow electricians to work comfortably with PLCs. However, increasingly PLCs are being used in situations where 5 or 10 years ago a DCS/SCADA system would have been used (and are frequently being used to replace such systems where support is no longer available). While the engineers concerned very definitely need to have good process knowledge, they don't have to have in depth knowledge of all the bits and pieces, because there will be plenty of other people looking after that end of things.

Such people are much more likely to program in ST or IL, the only time I ever use ladder is if something complicated in FBD gets so big that it runs off the screen - it's certainly much more efficient in displaying logic.

Having said that, there's no doubt that having at least a basic knowledge of how your I/O functions is an enormous help when it comes to troubleshooting!
 
Here is a perfectly legitimate schematic showing two input devices connected to a PLC.


Field wiring PLC Inputs

| /
| /
+------o o----------o IN-1
| LS1
|
|
| |
| --+--
+------o o----------o IN-2
| PB1
|


.
Tom said...
"The | | and |\| symbols aren't kind of sort of almost like relay contacts. They were by definition created to BE relay contacts, and the ( ) symbol was cerated to BE a coil."

Now, in terms of the conventional application of the word "relay", where is the relay in the drawing above?

Of course, you can easily say that the symbols really refer to contacts within "a device"... not necessarily a conventional relay.

I could buy into that. However, the problem is that the explanation is explicitely designed around an Imaginary Relay. That is, an imaginary version of a conventional relay.

The following drawing is modified to include the Imaginary Relay.

Signals from
Field wiring PLC Inputs Imaginary Relay
n/c
| / imaginary +--|/|---> IN-1(a)?
| / coil for IN-1 |
+------o o----------( ) ---+
| LS1 | n/o
| +--| |---> IN-1(b)?
|
| n/c
| | imaginary +--|/|---> IN-2(a)?
| --+-- coil for IN-2 |
+------o o----------( ) ---+
| PB1 | n/o
| +--| |---> IN-2(b)?


.
The limit switch is using only one set of contacts... the normally open contacts.

The push button is using only one set of contacts... the normally open contacts.

The Imaginary Relay implies provides a signal through either a normally open contact or a normally closed contact.

Tom said...
"These aren't analogies..."

If the imaginary relay and its contacts are not an analogy then the drawing above implies, very strongly, that the internal view (the processor's view) sees the limit switch being wired with both the normally open contact and the normally closed contact (...maybe... but then, this is imaginary, so things might not be what they seem... maybe.).

Of course the schematic indicates that the limit switch is only using the normally open set of contacts.

No confusion there... huh?

How about if a REAL SPDT Relay is installed in the field and each contact provides a signal to IN-1 and IN-2 repectively.

Signals from
Field wiring PLC Inputs Imaginary Relay
n/c
| imaginary +--|/|---> IN-1(a)?
| coil for IN-1 |
+-------| |-----------( ) ---+
| CR1 | n/o
| +--| |---> IN-1(b)?
|
| n/c
| imaginary +--|/|---> IN-2(a)?
| coil for IN-2 |
+-------|/|-----------( ) ---+
| CR1 | n/o
| +--| |---> IN-2(b)?


.
Here a real relay contact is driving two imaginary relay contacts. Since both of the contacts in the real relay are being used, the real relay is driving four imaginary contacts.

naaaahh... no confusion there.

Tom said...
"Just don't imply that there is something primitive or improper about thinking in the terms that were part and parcel of the develpment of the language."

I'm not implying anything... I'm saying right out that interpreting the symbols as part of an imaginary relay (a relay that DOES NOT EXIST) is inherently confusing. It is an overly complicated, poorly conceived means for explaining a very simple concept... "Is it ON?" or "Is it OFF?"

The confusion comes in when a new programmer tries to corrolate the configuration of an Imaginary Relay with the configuation of the real field device.

It's kinda like comparing apples to oranges... they simply do not match.

If you want to "count apples" then get the oranges out of the picture.

Just as you don't need the oranges in order to count the apples, you don't need the Imaginary Relay to determine reality.

While it is true that most individual rungs of a program could be physically wired as indicated by the symbols in the rung, doing so would be moving backwards... don' cha think?

The idea of the PLC is to bring in to the PLC one "instance" of a signal from a particular set of contacts on a field device. This single "instance" could be from the normally open contacts, or from the normally closed contacts. You can just as easily bring in an "instance" from each set of contacts (each to a separate input).

The concept then provides for referring to a particular "instance" as many times as required. The signal from one SPST set of contacts (LS or PB for example) can be used in hundreds of places in the code without the slightest increase in current through that set of contacts.

All that is necessary is to determine... is the signal ON... or is the signal OFF.

BE THE COMPUTER...

Imagine yourself as the CPU (this is a more palatable imagining than the imaginary relay).

You are in the Master Control Room that is the heart of the CPU. On the wall to the left are indicator lights that provide the status of all digital inputs. If a light is ON then there is a signal from the particular field device. Occasionally, the status of those lights is updated. So, when you look at one of the lights, you are seeing the status as of the last update.

Now, there is a REAL corrolation between the PLC and these lights.

A signal from the field drives an LED in an opto-isolator. This is REAL. The status of the field device is determined by the status of that LED. If the device signal is ON, then the LED is ON. Otherwise, the LED is OFF.

So, as the Master CPU, you go through your code...

IN1 IN2 OUT1
----| |-----|/|------( )


.
The code says... If IN1 is ON and IN2 is OFF then turn ON Out1.

You could look at --| |-- as the basic symbol. This symbol could have been ANYTHING! It could even be something as silly as that symbol for the guy formaly known as Prince. In this case, the symbol means... "Is the indicator light on the wall for this Input ON?"

By placing a slash across the basic symbol you specify the negated version of the basic symbol --|/|--. This symbol means... "Is the indicator light on the wall for this Input OFF?"

So... you look at the IN1 indicator on the wall and you see that it is ON.
So far, so good...
Then you look at the IN2 indicator on the wall and you see that it is OFF.
OK... the required conditions have been met... turn ON Out1.

Now, if the Imaginary Relay is employed things become a bit more complicated.

IN1 IN2 OUT1
----| |-----|/|------( )


.
In this case, the code says... If the normally open contact associated with IN1 is HOT, and if the normally closed contact associated with IN2 is HOT then turn ON Out1.

Now, in keeping with the indicator lights on the wall, there has to be a slight variation in the indicators. In this case, there are two indicator lights for each input. One light is Green and the other is Red.

Arbitrarily, the Green light is associated with the normally open contact. The Red light is associated with the normally closed contact. If the normally open contact is HOT then the Green light is ON. If the normally closed contact is HOT then the Red light is ON.

Now the code says...

IN1 IN2 OUT1
----| |-----|/|------( )


.
If IN1 is Green and IN2 is Red then turn ON Out1.

Is there a big difference in this method? Not a heck of a lot of difference, but it requires envisioning something that is not there.

In the following sentence...
"If IN1 is Green and IN2 is Red then turn ON Out1."
...all of the words are symbols.

Green and Red are symbols that indicate a status.
Green could just as easily be spelled as "ON", and Red as "OFF".

Would anything be lost with that translation? No.

The only difference would be that the device status now corresponds to the status of a single light... this corresponds with reality without introducing non-existent components.
 
EUREKA -- I think he's got it.

I think I now understand XIO and XIC.
We will see in future eforts.

Many thanks to Terry for posting his analysis.

Sometimes the simple things are hardest to learn.
They only become simple
AFTER
you learn them and really comprehend.

Dan Bentler
 
These are not analogies.

There is absolutely nothing imaginary about the relay for a PLC input. It is a real genuine relay, it exists on the input card, it is a solid state relay, and it turns on contacts (bits) that are not mechanical but exist in the status chip on the input card. They are echoed as contacts in the I/O table and RLL program. The advantage is that you can have as many NO and NC contacts as you want, unlike the external electro-mechanical relay.

There is absolutely nothing imaginary about the coil for the output of a PLC. It is a real genuine relay, the coil exists in the RLL, and the output is in the I/O table and in the status chip on the PLC card and in the contacts on the output card. In fact, some of PLC output cards have SPDT contacts.

Your wiring is wrong, Terry. It should look like this:

External to PLC:

Field wiring PLC Inputs

| /
| / coil for IN-1
+------o o----------( ) ----------------
| LS1
|
|
|
| |
| --+-- coil for IN-2
+------o o----------( ) ----------------
| PB1
|
| OUT-1 Motor Starter
| Contact (External Device)
|------| |-------------( )----------------



And internal to the PLC:


|
| Contact Coil for
| for IN-2 OUT-1
|-------| |------+-------( )
| |
| Contact |
| for IN-1 |
|-------|/|------+



And, of course, the other beauty of RLL is that you can have lots and lots of internal relays, and timers, and counters, and create the logic in a very small footprint that would formerly take acres of backpanel space.

Now, any good electrician can read both of these "schematics". In computer parlance:

If PB1 is operated OR if LS1 is NOT operated then the motor starter will turn on.

I don't care if YOU or anybody else wants to use XIO or XIC or truth tables or boolean logic or anything other analogy that helps someone write good logic. Just don't try to tell me that there is something wrong with thinking in terms of coils and contacts for Relay Ladder Logic, when that is the very basis of the language!
 
Last edited:
XIC = eXist? I Change

If the input exists (external input signal is present) or true (internal bit/result is satisfied), then CHANGE the state to the opposite. Since it's drawn as a N.O. contact, that would mean "closing it."

The XIO isn't the XIC, so you don't need to memorize it. Just treat it the opposite of the XIC.

I like mnemonics because I'm lazy.

I guess you could do the following if you don't like my mutually-exclusive method:

XIO = eXist? I dOn't.
 
Tom said...

"It is a real genuine relay, it exists on the input card, it is a solid state relay, and it turns on contacts (bits) that are not mechanical but exist in the status chip on the input card."

Oh... so it's not a conventional relay? It's not a relay that has an actual normally open contact and a normally closed contact?

I agree with that.

The following is the input circuit on one of your favorite PLCs.

41ec55f839f05cd1.gif


This shows the input as I described... with the opto-isolator. The transistor being controlled by the LED is either ON or OFF. It is the state of this signal that is latched into the Input Table when the PLC fetches Input Status.

When the transistor is turned ON it goes into saturation... by all conventional understandings, it is a "switch". The switch is either ON or OFF.

Tom said...
"...that are not mechanical but exist in the status chip on the input card."

So... if it is "not mechanical" then why are new kids subjected to the explanation which asks them to think of a relay... in the conventional sense? All of the books, and I dare say, most instructors, try to explain it in this manner.

What you have described, under all conventional understandings, is a solid-state switch. Good for you! I think you're gettin' it.

One of the interesting aspects of a conventional relay is that both contacts are OFF during a transition. During that brief moment, the input is neither being asserted as being ON nor OFF. That just doesn't jive with the idea that the input is either ON or OFF.

Ahh, but then, it is an imaginary relay - the books say so. Since it is imaginary we can imagine that the transition takes place in zero-time.

However, if it is, as it in fact is, a "switch" controlled by an LED, then there is no transition period where it is neither. Even during the course of turning the switch ON, the "switch" is defined to be OFF if the current is below a particular level, and ON if the current is equal to, or above, that particular level. The switch is either ON or OFF.

Why not ask the kids to think in terms of a "switch"? The switch is either ON (--| |--) or the switch is OFF (--|/|--).



Tom said...

And internal to the PLC:


|
| Contact Coil for
| for IN-2 OUT-1
|-------| |------+-------( )
| |
| Contact |
| for IN-1 |
|-------|/|------+



So... where is the normally closed contact for IN-2 and the normally open contact for IN-1? If they in fact exist as you insist, then where are they? Wouldn't a real schematic show both contacts unless one or the other was not being used?

There is no normally open contact or normally closed contact.

There are only symbols which are mearly used in evaluating the state of the switch... nothing more... nothing less.

--| |-- = Is the switch ON?

--|/|-- = Is the switch is OFF?

The state of the switch, of course, indicates the state of the field device, whatever it is.

The very fact that I can raise all of these arguments against the imaginary relay concept means that the concept is anything but solid.

That's why so many of the neophytes give that "deer-in-the-headlights" look, followed by "Huh?" when first introduced to the concept.

It's a layer of confusion that simply doesn't need to exist.

The only thing that would be closer to reality would be Peter's AND and AND-NOT. But then, that is so "internal" that the direct corrolation with the field devices is lost in the translation
 
After a gap of three years, this naturally becomes a dead topic, but the issue is really confusing for a new-comer, who does not find one-to-one correspondence between the actual field switches used with relay logic and the contacts of PLC program.

If a PLC program is to be written simply by exactly copying relay logic schematic diagram, then one must use only N/O switches with the PLC inputs, even though the switches with the relay circuit may be of both N/O and N/C types. Using N/C switch with a PLC input inverts the logic, and the PLC program would look different.

So, to simplify matters, I always advice use of only N/O switches with PLC inputs.

And, let us dump the terminology of XIO and XIC!
 
Sinha
How can you program with out N/C or XIC contacts? Surely on certain apps there is a need to say if Limit Switch xxx is OFF or if motion is NOT occuring or if Sequcence Step is NOT etc

Cheers
 
sinha_nsit said:
So, to simplify matters, I always advice use of only N/O switches with PLC inputs.

Totally incorrect, STOP pushbuttons will always be N/C for instance, FAILSAFE inputs will always be N/C. There are probably loads of reasons where N/C contacts should be used.

This XIC/XIO rubbish is totally irrelavant to non AB users.
 
PeterW said:
Totally incorrect, STOP pushbuttons will always be N/C for instance, FAILSAFE inputs will always be N/C. There are probably loads of reasons where N/C contacts should be used.

This XIC/XIO rubbish is totally irrelavant to non AB users.

You are very much right. Thanks for pointing out my mistake. Actually, the failsafe design was not in my mind. I was only examining the logic of the program. However, since the concept is rather confusing, I still believe that initially a new-comer should be advised to 'replace' the actual N/C switch by a N/O type switch as PLC input, with the comment that it is not a safe design. Then he can at least easily read the PLC ladder because it will look similar to the hardwired schematic diagram. Next, failsafe design should be discussed, and its effect on PLC ladder (i.e.,a N/C switch appearing as a N/O contact - really confusing for a new-comer!) be explained. The whole problem arises because we tend to correlate hardwired schematic diagram with PLC ladder. Am I correct or simply escalating the confusion.
 
sinha_nsit said:
... I still believe that initially a new-comer should be advised to 'replace' the actual N/C switch by a N/O type switch as PLC input, with the comment that it is not a safe design. ...

WRONG!!

DO NOT teach bad habits. Ever. If you start out teach these bad habits - even with the "not safe" notation - it will be extremely hard to break those bad habits.

The best way is to just teach it right the first time. Then do it right every time.
 
OK. I accept everything, and take back my suggestion.
We can simply tell the students to copy the hardwired diagram, with both N/O and N/C switches represented by N/O contacts, and use actual switches (i.e., N/O or N/C types) for PLC inputs.
Actually, the best thing would be not to think in terms of hardwired diagram. A PLC program should be viewed as a computer program, even though initially PLC was invented to replace relay logic.

The concept of internal relays associated with each input and output is the right approach. This has already been explained in this thread.

Am I right now?
 

Similar Topics

I am a beginner at RSLogix 5000 and in ladder logic in general. I am tasked with making sense of an existing program and reprogramming it to make...
Replies
8
Views
6,053
Hi, I am using an AB PLC5. I have a rung with three branches on the right, so that it has three connections to the right (output) rail...
Replies
10
Views
7,165
Ok, I know in my own words the differences between XIO/XIC and NO/NC. The problem comes up when I try to convey to someone in a good way so it...
Replies
55
Views
50,513
Hi, I am new to plc and i was reading the contensts in plcs.net. I have a doubt. i am not able to understand when we should go for normally...
Replies
4
Views
5,926
I have Woodward Controller EASYGEN-3500XT and Phoenixcontact make IO CAN-CUPLER part no: 2702230, Analog Input card: 2861412, Analog Output Card ...
Replies
0
Views
29
Back
Top Bottom