Tutorial: A Level Application

Bernard

Member
Join Date
Dec 2002
Posts
6
Question regarding the tutorial: A Level Application

Per the text associated with the ILLUSTRATION "Both of our inputs will be NC (normally closed) fiber-optic level sensors."


"Here we have a need for 3 I/O (i.e. Inputs/Outputs). 2 are inputs (the sensors) and 1 is an output (the fill motor). Both of our inputs will be NC (normally closed) fiber-optic level sensors. When they are NOT immersed in liquid they will be ON. When they are immersed in liquid they will be OFF."

If I am interpreting, (THE PROGRAM SCAN), ladder diagram correctly, the Ladder diagram illustrates the inputs "0000" and "0001" as Normally Open.
Please Clarify.

Thank You: Bernard
 
Yes, the PLC inputs in the ladder are Normally Off (Normally Open to be more specific). They will CLOSE when the input turns ON. In this case, the input is ON when the sensor is NOT immersed in liquid.

Therefore, in the ladder diagram, the 0000 contact will be CLOSED when the sensor is NOT immersed in liquid.

Does that help?

beerchug

-Eric
 
I get that question alot...

Hi Folks,

For anyone curious, this thread references these 3 pages:

page 1
page 2
animation

Mike and Eric's replies are correct... of course :)

That is actually my most popular 'emailed' question. So, you would think I could take a hint and modify the page to include more detail... but that's another story.

Anyway, I think that's the toughest thing for ME to get across to beginners. (ie. how external world NO/NC switches relate to the choice of 'user defined contacts' within the ladder logic program.) I find most (many?) people think they must be the same. (ie. NO real world switch means NO contact in their program. NC real world switch means NC contact in their program)

Anyone care to take a chance at explaining it in a way YOU feel a beginner might understand?
As an incentive(?) to reply I'll include them(with proper credit to the authors) in a future edition of the sites plc programming tips newsletter.

Enjoy,
 
Hi Phil,

One trick that I used to teach some of our co-op students/workers was to pretend that the PLC input was a relay coil. If the input is on, regardless of what type of device is connected to it (N.O. or N.C. real world switch) the relay coil is energized. Next, think of the input contacts used in the program as contacts for that imaginary relay. now ask yourself "What do the N.O. and N.C. contacts do when the relay is on or off?"

That hint seemed to get the idea across pretty well and was easy to visualize.
 
Phil,

I see some guys get confused when examine is used in the definition of bits, as in examine if open (XIO), examine if closed (XIC).

I always seem to get the point across by describing it this way;

When you put XIC (examine if closed or NORMALLY OPEN) instruction into a rung with one output, what you actually want is a scan for 1. You want rung continuity when the bit is 1, the processor is scanning for a one with this instruction, so when the input is ON it will allow rung continuity and the output will be energized.

When you put XIO (examine if open or NORMALLY CLOSED) instruction into a rung with one output, what you actually want is a scan for 0.
You want rung continuity when the bit is 0, the processor is scanning for a zero with this instruction, so when the input is OFF it will allow rung continuity and the output will be energized.

Normally open = Scanning for a 1.
Normally closed = Scanning for 0.

May not work for all.......
 
Normally Confused

I think that one of the most confusing pieces of nomenclature is the word "Normally". The other thing that really gets newcomers is the confusion between the N.C. -|/|- device contact, and the -|/|- in the ladder logic. For more on the latter, find Terry's rant about "-| |- is asking a question...."

For the tank, you are using the normally closed contacts of two level switches.

Howver, normally, the level of the tank will be between the two switches. So normally, the normally closed contact of the low level switch will be ON (since the switch will be closed, i.e, under water), while the the normally closed contact of the high level switch will be OFF (since the switch will be open;, i.e, above water).

So normally, one -|/|- contact = TRUE, while the other -|/|- = FALSE.

By the time you get to the ladder logic, a beginner can get really confused as to whether he should use the -|/|- or -| |- logic to correspond to the -|/|- or -| |- contact of the switch, that is or isn't active under typical conditions.

If the phrasing wasn't "the norm", I'd suggest a campaign to eliminate the concept of NO and NC.

If you think this example is bad, try figuring out whether to use the NC or NO contact on a dark-sensing photoeye that you want "fail-safe" (i.e, loss of signal = trouble).
 
Abnormally Closed

It's always the simple things that get the most confusing, isn't it? When I train a rookie, I always use Greg's explanation and make the analogy between PLC inputs and relay coils. After all, that is the hitorical basis. (I avoid XIC and XIO like the plague - talk about double-speak, arcane, brand specific terminology!)

And for a relay, or a float switch, or a switch contact block, I tell them that "normal" has nothing to do with the application or the preferred state. "Normal" should describe the state of the contacts when the device is sitting loose on the desk, with no power or process environment. That seems to help.
 
I think the common nomenclature used for the functions in question is misleading.

In my opinion, "normally opened" and "normally closed" are terms that should only be used when referring to real-world contacts - NOT PLC instructions. There is too much opportunity for confusion.

Here's how I learned it:


A
---] [--- "Examine On"

Examine if the bit is on (i.e. logic 1, closed hardwired circuit, voltage present at input point). If it is on, the instruction is true.


B
---]/[--- "Examine Off"

Examine if the bit is off (i.e. logic 0, open hardwired circuit, no voltage at input point. If it is off, the instruction is true.

This nomenclature works regardless of the NO/NC properties of the physical contact. It also keeps things straight when performing reverse logic.

It works for me, anyway.
 
I am working on something but it may take me a week or so to get it together, are there any limitations, rules or guidelines to this? I hope to make it simple and brief, at first I thought there may be an issue with putting it here but I have already thought of a solution to that.
 
I try to use the comparison of when the plc scans it is asking a question Ie is the switch closed/open - yes = true or No = false. I try to wire in the field such that the healthy state is a closed input. (Loss of signal will cause a fault condition).
 
When you are writing and programing a N C contact, you will have to invert the NC contact to a NO contact.
 
You're all gurus... I mean members :)

Hi Folks,

Sorry for my delayed reply. Santa's busy running around at the last minute. utoh

Great stuff! Awesome advice. I'll certainly use it in mixed form.

For reference, tomorrows newsletter will include some great troubleshooting tips Jeff Brandt emailed me a while ago. So, this topic will appear in early-mid January's edition. (There's still alot of time to submit more ideas if anyone has any. More is better if it helps someone) Full credit will be applied as promised to those who posted ideas.
(If you don't get the free site newsletter, and want to... you can signup here: newsletter -shameless self plug- )

rsdoran said:
I am working on something but it may take me a week or so to get it together, are there any limitations, rules or guidelines to this?

Ron, you're scaring me here. ;) No rules... I think. But keep in mind that the newsletter is text form. I was just planning to cut-and-paste the replies in with the authors name. Unless there are 100 of them or something...

The purpose was that since I get so many emails about this topic I felt a lot of people could benefit from reading different explanations and seeing other peoples perspectives on the issue. I probably didn't need to offer any incentive (some may think it's actually NOT an incentive, but anyway...) since many people freely share their knowledge/experience here without any, but I wanted to give people proper credit for 'their' words. It seems 'the right thing to do'. (there are currently 10's of 1000's of subscribers but if even only 1 person finds it useful I'll be happy it helped them :nodi: )
So I hope that helps answer your question.

Enjoy,
 
some very good responses here

I read this post a few days ago, and just haven't had time to reply, but was definetly thinking of the photo-eye example. It usually tripped me up after about a 10 hour day on an install. I used it to gage when it was time to go home. As soon as I couldn't figure out the photo-eyes anymore, I would call it a day. What made it worse was that the plant couldn't decide on one type of operation. Some where "light operate" and some were "dark operate".

Correct me if I am wrong here:

light operate = input goes high when light reflects off of reflector; nothing blocking photo-eye; PE contact is normally (sorry) open but held closed.

used to represent PE clear
---| |--

used to represent PE blocked

----|\|--


dark operate = input goes low when light reflects off of reflector; nothing blocking photo-eye; PE is normally closed but held open.

used to represent PE clear
---|\|--

used to represent PE blocked

----| |--




This can be quite confusing. What I did, and I think someone may have partly mentioned this is......


Use an internal coil to represent all inputs. This coil would be commented to reflect its true state. For example.


PE1 PE1 Clear
I:XX1 B3/1
--| |---( )

PE2 PE2 Clear
I:XX2 B3/2
--|\|--( )



Then, when you were using the coil in logic you could read it to yourself as follows....
 
PE2 Clear
B3/2
--| |--


"If PE2 Clear Then"

or

PE2 Clear
B3/2
--|\|--


"If PE2 NOT Clear Then"



It sounds silly, but it really helps when you can fly through your code without having to stop and think about states of contacts. Every time you see a normally open contact, XIC, XON (whatever), you can read the comment as the condition that needs to happen. Every time you see a N.C. contact (XIO, XOF?) you can read the comment with a "NOT" in front of it.

This is my favorite way for dealing with this. My second favorite is when people use:

1 = "this"
0 = "that" in the comment field

but this still stops you in your tracks for a second, if you haven't had that first cup of coffee (I am up to red eyes now).

Oh, and I forgot about them photo-eyes with a N.O. and a N.C. set of contacts. Oh, and that darn PNP NPN dilema.


And darn if allen bradley... (love hate relationship) didn't right after I thought I was comfortable with "examine on" and "examine off" go off and change their terminology to "examine if closed" and "examine if open". Oh, if that didn't just clear it all up for everybody. No need for the F1 key anymore after that fix.

I do have the XIC and XIO thing permanently installed in my brain now after all that programming in ASCII--- easy to forget that not everyone knows AB.


Man... hard to get the thoughts on to paper. And to think that I wanted to be a teacher.



time for the preview
 
Ganutenator, this sort of relates to the topic of "which type of sensor to use", which has been discussed before. As Kellian mentioned, you (preferably) want the sensor to let you know it's "healthy"...

Example 1:

A sensor is used to monitor an overload clutch. You want the sensor to OPEN when the clutch is disengaged (for the same reason you use a NC contact on an E-Stop button). Therefore, a loss of signal (for ANY reason) will indicate that there is a problem.

Example 2:

A photoeye is used to monitor the discharge of a machine (and stop the machine if it's blocked). Here you would use a "Light-Operate" photoeye (output ON when the discharge is clear). Again, a loss of signal (for ANY reason) will indicate that there is a problem.

Example 3:

A photoeye is used to monitor the infeed to a machine (to know when there are sufficient parts to run). Assuming that you're using a retro-reflective or through-beam photoeye (blocked when parts are present), you would use a "Dark-Operate" photoeye. (output ON when parts are present). Once again, a loss of signal (for ANY reason) will indicate that there is a problem.

Using an internal coil to represent inputs is fine if that helps prevent confusion, but you can also just name your inputs accordingly. There's almost always an antonym available.

Depending on the type of sensor used, my above examples could be named like this:

Example 1: "Clutch Engaged" or "Clutch Disengaged"
Example 2: "Discharge Clear" or "Discharge Blocked"
Example 3: "Infeed Full" or "Infeed Empty"

beerchug

-Eric
 

Similar Topics

Refer to: SCAN 02-0100 I took the liberty, for my own edification to to identify/individualize the two (2) relay contacts identified as "1000"...
Replies
3
Views
4,516
Hi. I am trying to understand some old code for B&R 2005 PLC created in PG2000 software. There are procedures concerning axes but I cannot find...
Replies
2
Views
701
I'm testing the ability to make a custom ActiveX control for PVP7 applications to be able to write data out in an XML format. With my simple...
Replies
0
Views
623
Hi guys, Can you share me any educational links & tutorials for B&R PLC structured text programming? The help section in their automation...
Replies
1
Views
830
Hi all, PLC machine vision is barely talked about anywhere yet it is very important PLC and Industrial automation topic. Like you see vision...
Replies
0
Views
1,046
Back
Top Bottom