Tutorial: A Level Application

My point:

My point:

Map inputs to internal coils in such a way so that the comment for the internal coil reflects the true state of its associated contact.

So.... when you read any N.O. contact in the program, it follows its comment.

When you read any N.C. contact in the program, You mentally insert a NOT into the comment.

This way you don't have to stop and think as to how it is wired, or wether it is normally open, or normally closed, or what is normal, etc. etc. etc. etc. when reading/interpreting code.
 
I don't think I missed your point... I did say that your method was just fine... :D

I was only giving you a different option... Naming the inputs accordingly to avoid confusion.

...so that the comment for the internal coil reflects the true state of its associated contact...

What do you mean by "true state"? Do you mean "valid (i.e. "ON") state"?

beerchug

-Eric
 
No wonder Phil is looking for a good explanation for this, even the pros get confused at times. I imagine each person has his own technique to help eliminate confusion for him/her but that may not applye to the next person.

What do you mean by "true state"? Do you mean "valid (i.e. "ON") state

If I aint mistaken the true state for an XIC, LoadNot, or LoadBar is "0" therefore if there is an input that is "ON" this symbol will be "OFF".

Or by "ON" do you mean the symbol is "active" in the ladder? I reckon for an XIC that would be the "true" state.

No wonder Phil was asking for explanations, this stuff can get corn fusion at times.
 
true state = state in which it (the coil) is true or ON state

Most people comment their coils this way anyhow. I.E.



Some Random Run Motor
Condition B3/1
--| |------------( )





You wouldn't call B3/1 "Stop Motor" if its "True" State (B3/1 = 1)actually started the motor. Nor should you label a coil "PE blocked", if the coil is ON when the PE is clear. I would say that this is pretty much a standard (if there was ever a standard) for naming internal coils, and is pretty much followed in most of the programs I have examined.

Think about it, the confusion always seems to lie with the I/O.

Why? you ask

We have to comment our inputs to reflect the real world device. So if we have a low level switch, for example, that is set up to go false on low level, we would have the following input to represent low level.


I:XXX
LSL-3XX
--|\|---



What I am saying is add a coil to the above...


I:XXX B3/1
LSL-3XX Low Level
--|\|-----------------( )



And call it Low Level.


If it is a low level switch that is true in order to signal a low level, we would use the following:


I:XXX B3/1
LSL-3XX Low Level
--| |-----------------( )



In either scenario,



B3/1
--| |--



would equal low level, which follows the naming convention already put in place, for your internal coils.



Plus, mapping I/O to internal coils has many many benefits which I am prepared to defend.
 
If I aint mistaken the true state for an XIC, LoadNot, or LoadBar is "0" therefore if there is an input that is "ON" this symbol will be "OFF".

Or by "ON" do you mean the symbol is "active" in the ladder? I reckon for an XIC that would be the "true" state.

True = (what I mean ) that there is a '1' in the plc data table for that address.


If we followed the naming convention for naming internal coils with inputs.....a low level switch (fail safe)that would have a 0 in the plc data table (XIO/N.C. passes power) on low level, we would name its address "Not Low Level".

An XIC/N.O. contact would indicate Not Low Level

and an XIO/N.C. contact would indicate (Not) Not Low Level.


Since we can't name our I/O this way.

   
LSL Low Level
--|\|-----( )




would put us back in the proper naming convention standard.
 
Phil, This is a great site.
For some years, I ran a basic PLC training course and this is how I explained N/O and N/C contacts wrt PLC's:
If you program a normally open contact, the contact inside the PLC program follows the state of the contact in the real world. i.e. if your switch contact is open, the contact in the program will be open, and if your switch contact is closed the contact in the program will be closed. Conversely if you program a normally closed (the inverse function) contact, the contact inside the PLC program will be in the opposite state to those in the real world i.e. if your switch contact is open it will be closed in the program and vice-versa.
 
NO/NC contacts

I don't use the terms "normally open" or "normally closed" with my students...I tell them to regard NO as a "copycat" contact, and NC as a "contrary" contact.

Then they only have to answer the question: "Do I want my ladder contact to behave the SAME way as the associated real-world input (use "copycat") or do I want it to have the OPPOSITE behavior (use "contrary")?
 
Relay Logic vs. PLC ladder logic

Back to the basics...
Decades ago when I was writing programs for mainframe computers, I wasn't confused at all. Period. End of statement. Then life took a turn, and I was designing/troubleshooting equipment using relay ladder logic diagrams. OK, still not confused but... Then along came IC's and Boolean logic, followed rapidly by mini-computers/pc's with DOS, Basic and Windows. Throw in 20+ years of hands-on industrial electrical maintenance and the infancy/evolution of PLC's. So to keep my mind clear in a multi-disciplined environment, I use the following rules to help me focus:

Relay Logic - real world scenario - contacts are either -[ ]- (open) or -[/]- (closed), based on the state of the coil. I can
"force" the relay with a screwdriver or jumper wire and see what SMOKES!

PLC Logic - symbols -[ ]- and -[/]- are not contacts! They are questions. The symbol -[ ]- is an "IF-then" question. IF this input is present (ON), THEN continue on this line. IF this input is not present (OFF) THEN STOP! NOW for the strange part. Remember that I said these symbols were really questions? The slash, / or \ ,is a graphical way to change the question to "IF's" opposite, or "IF not-then", or more concisely, IF this input is present (ON) THEN STOP! IF
this input is not present (OFF), THEN continue on this line. As you can see, the / or \ reverses the "logic". Remember that you are looking at a logic program, not a wiring diagram. If the answer to any question on a rung results in STOP, the output WILL NOT be actuated. So when you are looking at a computer monitor, and the hi-lighting stops at a -[/]- symbol, remember it's just logic!!

THOUGHT FOR THE DAY: If it looks like a duck, walks like a duck, quacks like a duck, and smells like a duck, but you know it contains
a PLC... it's probably an elephant! Have a great safari.
 

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,538
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
723
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
651
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
846
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,059
Back
Top Bottom