# Relay Logic vs Ladder Logic - instruction order



## Navyguy (Mar 15, 2010)

Looking for a simple way (preferably a graphic or flow chart) to explain why in relay logic we show (wire) the (N/C) stop button ahead of the(N/O) start button, and in ladder logic we show the (XIC) stop button after the (XIC) start button.

I have tried to explain the difference regarding the scan cycle on some PLCs as well as the use of structured text as a programming language to explain the difference (notwithstanding electrically it works exactly the same). Just to clarify, this is not a discussion about using an XIO as a stop button; that is very easily demonstrated.

Cheers
John


----------



## gpop (May 14, 2018)

In relay its easier to chase the hot wire with a voltmeter if the stop is before the start. 

In logic we tend to look at argument, permissive, result.

Most of the time we still use a fail safe NC/XIO as the stop


----------



## dronai (Apr 11, 2011)

PLCS.NET is the best place to ask the guys that do this for a living. 
I asked our Engineer this same question, because he drew it after the start, and he said it doesn't matter.


----------



## gpop (May 14, 2018)

Navyguy said:


> Looking for a simple way (preferably a graphic or flow chart) to explain why in relay logic we show (wire) the (N/C) stop button ahead of the(N/O) start button, and in ladder logic we show the (XIC) stop button after the (XIC) start button.
> 
> I have tried to explain the difference regarding the scan cycle on some PLCs as well as the use of structured text as a programming language to explain the difference (notwithstanding electrically it works exactly the same). Just to clarify, this is not a discussion about using an XIO as a stop button; that is very easily demonstrated.
> 
> ...


Not everything written in ladder logic will work in relay logic. Ladder only has 2 states which is on or off. 
A relay (non solid state) technically has 3 states as there is a point in time when the common on the relay is between N/O and N/C.


----------



## dronai (Apr 11, 2011)

gpop said:


> In relay its easier to chase the hot wire with a voltmeter if the stop is before the start.
> 
> In logic we tend to look at argument, permissive, result.
> 
> Most of the time we still use a fail safe NC/XIO as the stop


You must have a mechanical E stop (NC), and I think the PLC uses a NO, which will be aTrue condition


----------



## Navyguy (Mar 15, 2010)

dronai said:


> You must have a mechanical E stop (NC), and I think the PLC uses a NO, which will be aTrue condition


It is pretty rare that you would use and XIO as a stop condition. All emergency stops are outside the PLC program using an MCR and are mostly hard wired to the power supply of the outputs of the PLC. In some cases, such as a complex shutdown system you may be permitted to use an MCR PLC for shut down, but even that works on the outside of the PLC that is running the process.

Cheers
John


----------



## dronai (Apr 11, 2011)

Navyguy said:


> It is pretty rare that you would use and XIO as a stop condition. All emergency stops are outside the PLC program using an MCR and are mostly hard wired to the power supply of the outputs of the PLC. In some cases, such as a complex shutdown system you may be permitted to use an MCR PLC for shut down, but even that works on the outside of the PLC that is running the process.
> 
> Cheers
> John



I think we are saying the same thing ? What I wrote above, is how I remember being taught in a class.


----------



## Navyguy (Mar 15, 2010)

gpop said:


> Not everything written in ladder logic will work in relay logic. Ladder only has 2 states which is on or off.
> A relay (non solid state) technically has 3 states as there is a point in time when the common on the relay is between N/O and N/C.


That is true, but a similar time exists during the scan cycle to; while not a physical change in state, there are times when instructions don't match with their bits that they are associated to.

Cheers
John


----------



## Navyguy (Mar 15, 2010)

dronai said:


> I think we are saying the same thing ? What I wrote above, is how I remember being taught in a class.


I understood that you wire the e-stop or standard stop to the NO contacts and use and XIO in the PLC. That is generally considered a potentially dangerous situation.

Did I misread / misunderstand your post?

Cheers
John


----------



## bill39 (Sep 4, 2009)

Wow, XIO & XIC are possibly the worst abbreviations ever. I’ve been working with Allen-Bradley PLC’s since 1983 and I still can’t remember the difference.

They used to refer to them as Examine On and Examine Off.


----------



## dronai (Apr 11, 2011)

Navyguy said:


> I understood that you wire the e-stop or standard stop to the NO contacts and use and XIO in the PLC. That is generally considered a potentially dangerous situation.
> 
> Did I misread / misunderstand your post?
> 
> ...


Opposite, N/C E-Stop, N/O PLC


----------



## Navyguy (Mar 15, 2010)

dronai said:


> Opposite, N/C E-Stop, N/O PLC


Are you calling an XIC a PLC N/O? Maybe that is where I am losing you...

You are not actually wiring the physical N/O contact on the e-stop?

Cheers
John


----------



## Navyguy (Mar 15, 2010)

bill39 said:


> Wow, XIO & XIC are possibly the worst abbreviations ever. I’ve been working with Allen-Bradley PLC’s since 1983 and I still can’t remember the difference.
> 
> They used to refer to them as Examine On and Examine Off.


I agree to some extent. I seem to go through cycles of using and not using PLCs, it takes me a bit to get "reoriented" as it were.

I like to use the language "go look for 1 or 0" and "go write a 1 or 0"; I find it makes it easier to understand what the instruction is meant to do.

Cheers
John


----------



## dronai (Apr 11, 2011)

Yep, Field wiring E-stop N/C, PLC stop - N/O There's nothing complicated about this. The N/O is just an input from the field wiring. It's a true condition, because the Field E-stop is N/C


----------



## Navyguy (Mar 15, 2010)

dronai said:


> Yep, Field wiring E-stop N/C, PLC stop - N/O There's nothing complicated about this. The N/O is just an input from the field wiring. It's a true condition, because the Field E-stop is N/C


OK, I am just not used to referring to the PLC instructions as N/O and N/C; I tend to only use those terms in relay logic. I find using those terms in PLC programming only confuses the situation because they actually have nothing to do with a "change in state" of the physical contact in the real-world.

Cheers
John


----------



## dronai (Apr 11, 2011)

Navyguy said:


> OK, I am just not used to referring to the PLC instructions as N/O and N/C; I tend to only use those terms in relay logic. I find using those terms in PLC programming only confuses the situation because they actually have nothing to do with a "change in state" of the physical contact in the real-world.
> 
> Cheers
> John


I work around our Engineer/ programmer, and learned a lot from him. I think of everything as relay ladder, PLC or Relay doesn't matter with the simple stuff, contacts, and coils. When you get into the advanced functions, it gets complicated, but that's what Engineers are for.


----------



## dronai (Apr 11, 2011)

There you go


----------



## gpop (May 14, 2018)

dronai said:


> You must have a mechanical E stop (NC), and I think the PLC uses a NO, which will be aTrue condition


My bad. Thankfully ladder logic has pictures which avoids having to use the term xio and xic.


----------



## oliquir (Jan 13, 2011)

i always use nc contact on the stop even if it goes into plc inputs, it is easier to understand that every stop, e-stops, safety limit switchs are all nc contacts


----------



## bill39 (Sep 4, 2009)

I believe the terms XIO & XIC are unique to Allen-Bradley PLC’s. While AB has the major share in the USA, workers here who have only used Omron, Automation Direct, Siemens and others may not be familiar with XIO & XIC. This is why I continue to use NO & NC terminology. 

I understand the confusion w/using NO & NC but it is what it is. This is why newbies need to understand the concept of failsafe and actual wiring. There is more to it than just programming.

Next comes the importance of creating the proper PLC descriptors. ALWAYS make the description be as if it is a 1 (HI or ON). Don’t describe an input simply as “Ram extended LS”. Describe it as “Ram is extended” or “Ram is retracted”.


----------

