Programming Symbols

PLC_NEWBIE

Member
Join Date
Mar 2007
Location
Illinois
Posts
35
I've taken cobol, fortan, pascal, c, visual basic and many other types of programming. I'm having trouble with plc programming in general......normally open, normally closed, examine om, examine off.......these terms are confusing.......i get confused when for example it shows green bars around a contact on a program. does the bar mean its true?........

Can you simplify the symbols and what the green bars mean?...
 
Hello PLCNewbie;

Since you have experience in high-level programming, maybe this can help:

Look at the "green box" as the result of a logical test:

An XIC ("examine if closed", --[ ]--)on input testbit corresponds to:
IF testbit THEN... : TRUE when the testbit value = 1

AN XIO ("examine if open", --{/]--) on variable/input testbit corresponds to:
IF NOT(testbit) THEN... "True if testbit = 0 or (NOT(testbit) =1)

The result can be only TRUE or FALSE. The THEN... part of the equation is only processed if the IF part is TRUE. As in C or Pascal.

The other aspect of your question touches the Normally Open or Normally Closed status of the electrical circuits a PLC connects to. PLC inputs read voltages from the field. If a 24 VDC input card detects 22 V from the field, it interprets the signal as a "1"; if it reads, say, 5 V, it interprets it as a "0". These "1" and "0" are written to the CPU memory and used in the logic evaluations ("program").
Now whether these "1" or "0" values make any sense in terms of the program logic depends on what you need to know about those field circuits.
Say the input testbit corresponds to a simple pushbutton, wired Normally Open (the electric circuit is not active until someone presses the pushbutton). What you need to know (in the "IF testbit THEN..." logic)is whether this circuit is active, TRUE, in order to process the rest of the ELSE part.
If the same input is assigned to a safety switch, wired Normally Closed (the circuit is always active until someone presses the switch), then what you want to know is when this signal becomes "0": "IF NOT(testbit) THEN..."
In both cases, the logic needs to know when these input values becomes TRUE for the logic tests to allow processing of the logical combinations of the program.

Hope this helps,
Daniel Chartier

EDIT: Have a look at the ONLINE TUTORIAL available at the top of this webpage, it is a excellent starting point for beginners.
D.C.
 
Last edited:
PLC_NEWBIE said:
I've taken cobol, fortan, pascal, c, visual basic and many other types of programming. I'm having trouble with plc programming in general.

When I did some projects for Komatsu between 89-93, we had some Fortran based programs, which I was told was obsolete then.

"C" would be difficult to program with, compared to the manufacurers programming software.

I blame most of my computer problems to "Visual Basic".

I suspect that you haven't caught on to the logic of PLC programming.

I agree with dchartier that the "Learn PLC's" would be beneficial to you.

If you understand simple basic control circuits, then PLC programming is a snap. Forget True and False, "ON" and "OFF" works better. Or "NOT ON" and "NOT OFF".

"Here" is another good site for info.
 
PLC_NEWBIE said:
I've taken cobol, fortan, pascal, c, visual basic and many other types of programming. I'm having trouble with plc programming in general......normally open, normally closed, examine om, examine off.......these terms are confusing.......i get confused when for example it shows green bars around a contact on a program. does the bar mean its true?........

Can you simplify the symbols and what the green bars mean?...

Since you mentioned xio & xic then I will assume you are working with AB, probably SLC/Micrologix or possibly the trainer from thelearningpit.com

Yes, if it is highlighted in green then it is true but I think using true and false with plc's can make it harder to comprehend. I am not sure I will explain this properly but here goes.

In the industrial field(s), and others, people are making something happen i.e. running a motor, moving ?, hydraulic rams extend/retract, the list goes on. Over all you have to turn things ON and turn them OFF.

That said, as mentioned, a plc input works with certain levels of voltage to determine if it is off or turned on. We will keep it simpler for now though and use 24vdc for input voltage to turn it on, with no voltage the input would be off.

Normally open (N.O.) and Normally closed (N.C.) are terms for contacts, for this Lesson (?) we will think in terms of a relay. Normally open means the contacts are open when the relay is NOT energized and normally closed means the contacts are closed when the relay is NOT energized. This means if you connect power thru the normally closed contacts of a relay then power will flow as long as the relay is OFF, if you turn the relay ON then the normally closed contacts OPEN and the Normally Open contacts close; which allows power to flow through them.

The fact is there are pushbuttons, switches, and more that use N.O and N.C. contacts but I used the relay aspect for another reason.

You can think of plc inputs and outputs as relays, in a sense, for some it may help to understand. Above we used 24vdc for inputs, now look at it in the simplest form. You have a plc powered up with the common connected properly to the input side but nothing yet connected to Input 1. Now you create a single rung:

input1 Out
|------[ ]----------( )----|


If you are online with it nothing will be highlighted because nothing will be ON. If you apply the 24vdc to the input 1 terminal you will see it higlighted (turn green) and the output turn ON. Since [ ] is the similar (same) as a Normally Open contact then you could think of Input1 as being a relay and when you turned it on then the normally open contacts closed allowing power (signal) to turn ON the output (relay).

Take another single rung and change the input instruction:

input1 Out
|------[/]----------( )----|


Now without voltage applied to the input the internal relay is OFF which allows power to flow through the normally closed contacts; which turns on the output (relay). Put 24vdc signal on input1 and the relay turns on which opens the normally closed contacts interupting the power to the output.

For a more in-depth look then checkout this XIO-XIC explained page: http://www.patchn.com/xio_xic_explained.htm

A little more that may help, on this page I have a very basic motor circuit that is hardwired; http://www.patchn.com/motors.htm
The Stop button is Normally closed, Start button is normally open, and Ma is a normally open auxillary contact on the side of the starter. Watch because it is animated. This is part of what is probably consfusing you, if you program that control ckt in ladder, how would you do it? Here is how, can you tell me now, why I used the same instruction for the Stop and Start?

basicmotor.jpg
 
Last edited:
The simplest way to show ladder logic to a PC programmer is straight conversion.

Using rsdoran's last example above, here is the equivalent in a high level language:

O:0/0 = I:0/0 and ( I:0/1 or O:0/0 )


or using comments as opposed to addresses:

Output = Stop AND (Start OR Output)
 
To stir the pot a little more...


The classic PLC paradigm is power flow. Power flows down the "Buss Bar" on the left side of the page, and through the devices on each rung from left to right. The goal is to get the power to the last device on the right- the output.

Now, when you look at the rung and the device is green, it means that it's transmitting power to the next device to the right. The "normally open" and "normally closed" refer to the shelf state (unpowered state) of a relay's contacts. "Normally open" means that if the relay coil is not energized, the contact is open and no power flows. "Normally closed" means that if the relay coil is not energized, the contact is closed and power does flow. That's why you see the diagonal bars on some symbols- those are the "normally closed" contacts of a relay.

PLC's were originally all Boolean, and "Ladder Logic" reflects that. Over time, a lot more has been added, but most PLCs are still only a couple of steps above assembly language. You define and build all your logic yourself; it's fun once you get used to it. Keep at it, and keep asking questions!
 
I had a different problem when starting into control. I came from an electronic background and, upon first seeing a ladder-type control diagram, asked "what are all those capacitors doing?"
 
Bernie, I am glad I was not the only one who thought that. My first engineering job out of college was in an industrial plant and I was hired as a project engineer. My electronic training was handy, except for all those capacitors in the first relay ladder logic drawing I encountered. Had me confused for a couple of days as I remember. Funny how your perspective changes in just a short while.
 
Greetings PLC_NEWBIE ...

if you still need information on "what does the green mean?" click here ...

be sure to take a look at the TWO posts which start at that link ... if you still need help after that, please feel free to post again with specific questions and I'll be glad to dig deeper ...

basic idea: it is NOT the PLC processor who paints the screen green ... it's the RSLogix software ... the software does the best that it can - based on its ASSUMPTIONS about the conditions that it sees ... and (very important!) the information that the software has available to work with is quite often not a "real-time" match with what the processor is working with ... specifically, there's usually SOME amount of delay due to communication lags (think "cable, baud rate, etc.") between the processor and the software running on your programming computer ...

secret handshake: the "green on the screen" is a handy feature that MIGHT help you troubleshoot/understand how the processor is controlling the system ... on the other hand, the "green on the screen" is NOT (I repeat NOT!) the final authority on what the PLC processor is actually doing out there on the other end of that programming cable ... so ... in some cases the "green on the screen" can be very misleading ...

words of wisdom: if you ALWAYS trust the "green on the screen" indications, then SOMETIMES you will be wrong ...
 
Last edited:

Similar Topics

Hello All, I am stumped on how to convert a %MW to a %MF using Machine Expert Basic and a Modicon M221. The help files show a word to a double...
Replies
4
Views
174
Hi, I am trying to set up a plc. I've never done any programming with ladder logic previously. I'm trying to set up a a program to turn a device...
Replies
7
Views
261
Dear all, I have fx2n plc on my hand but I don't have the programming cable sc-09 and it would not be easy for me to get one. I need the cable...
Replies
3
Views
144
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
984
I need to pull the program off of an old 90-30 so I can convert it to Allen Bradley. This is my first time messing with GE and I don't have the...
Replies
2
Views
101
Back
Top Bottom