when and & and not?

xarisss

Member
Join Date
May 2006
Location
gr
Posts
10
i have a rather easy question to post:
when programming a plc, when do we use and & when and not?
i am a bit confused...

thanks in advance...
 
AND's are used when you want function a AND b to be true for c to happen. Like the Logical and gate.

AND NOTS are when you want a and NOT b to occur to get c.

Switch a and switch b must be on for light c to illuminate.

Switch a must be on and switch b must NOT be on for c to illuminate.
 
yes, but what do we do in the combinations when a and b are normally open and normally closed?
 
Let's use an example to try to illustrate.

Suppose you have a two-position selector switch. You could wire a signal from each switch position to a PLC input. If you did, you probably would not need to use the AND NOT or the OR NOT instruction with those two inputs because the switch will normally be in one position or the other. (Note that I put qualifiers along with that statement.) If the switch is in position A, the logic permits one thing, if the switch is in position B, the logic permits something else.


Position A Do This
---] [-----------------( )-

Position B Do That
---] [-----------------( )-



Now, if you only wired one of those switch positions to a PLC input, you would have almost as much information (there's that pesky qualifier again). If the switch is in position A, it's not in position B and vice versa. However, in order to make use of the information, you will have to use a NOT instruction. If the switch is in position A, the logic permits one thing, if the switch is NOT in position A, the logic permits something else.

Position A Do This
---] [-----------------( )-

Position A Do That
---]/[-----------------( )-



I'll leave it up to xarisss to come up with what additional information you might get from wiring both switch positions to individual PLC inputs.
 
You are being confusing.

When to use AND, AND NOT, OR etc and how is dependent on the situation.

Take a simple motor start stop circuit, the Stop button is wired normally closed but the PLC uses a normally open contact. The start is a normally open and the PLC uses a normally open contact. This allows you to develop a latch circuit that will be unlatched when the Stop button is pressed.
stopstartmtr.jpg


You understand that a normally closed hardwired contact with a plc normally open contact will ALWAYS be ON if the button is not pushed?
 
Last edited:
"You understand that a normally closed hardwired contact with a plc normally open contact will ALWAYS be ON if the button is not pushed?"

So, what do we do? We use And Not for that contact?

For example, what would be the motor start circuit, if the start was normally closed (it can't be, but it's just an example) and the stop button NC as well?
 
xarisss said:
"You understand that a normally closed hardwired contact with a plc normally open contact will ALWAYS be ON if the button is not pushed?"

So, what do we do? We use And Not for that contact?

For example, what would be the motor start circuit, if the start was normally closed (it can't be, but it's just an example) and the stop button NC as well?[/QUOTE]

IT depends, plcs allow many options, but some of those options should not be.

If the START PB was a normally closed contact then the circuit would show a normally closed contact. All you have to remember is what ACTION you want i.e. do you want the ladder to ACT when the device is ON or OFF.
 
let's suppose that we want to control the machine with the NC start, as we did in the previous example, where the start was NO..

by the way, is there a place where i can download a tutorial with examples on how to programm in ladder diagram?
 
xarisss said:
let's suppose that we want to control the machine with the NC start, as we did in the previous example, where the start was NO..

I know that's this is just a example but....you should never do that, that would meen if you loose the input...so if the wire breaks the machine will start, not a good idea, even in a example, but the stop should be a NC, I think that Ron had a type-O and I;0/0 should of been XIO

just my 2 cents
 
geniusintraining said:
I know that's this is just a example but....you should never do that, that would meen if you loose the input...so if the wire breaks the machine will start, not a good idea, even in a example, but the stop should be a NC, I think that Ron had a type-O and I;0/0 should of been XIO

just my 2 cents

What are you saying, I made no typo. If the STOP PB is a normally closed pushbutton then you want to Examine if Closed i.e. to maintain the latch it must be closed. In my example if the signal is lost the STOP will be activated....the latched circuit will unlatch.

I know I have an attitude per se but has it come to the point where I will be disagreed with regardless if what I state is correct?

Are you part of the NEW GENERATION that wires a STOP PB Normally open then use a NC contact in the PLC?
 
Last edited:
rsdoran said:
What are you saying, I made no typo. If the STOP PB is a normally closed pushbutton then you want to Examine if Closed i.e. to maintain the latch it must be closed. In my example if the signal is lost the STOP will be activated....the latched circuit will unlatch.

I know I have an attitude per se but has it come to the point where I will be disagreed with regardless if what I state is correct?

Are you part of the NEW GENERATION that wires a STOP PB Normally open then use a NC contact in the PLC?


Damn Ron!, I looked at it wrong, don't shoot shoot me...I will stay away from any thread that you are part of OK...

If you look at my reply then you will see that I was refering to the broken wire (the real world) not the logic
 
If you are referencing discrete inputs from an input card, inputs are either 'on' or 'off'. If you want to reference an input being 'on' then you would use 'and'; if you want to reference an input being 'off' then you would use 'and not'.
 
donlavery said:
If you are referencing discrete inputs from an input card, inputs are either 'on' or 'off'. If you want to reference an input being 'on' then you would use 'and'; if you want to reference an input being 'off' then you would use 'and not'.

This simplifies it too much, you can reference an ON condition with an AND NOT instruction or vice versa. This versatility is why plcs are better than relays.

Mark please do not get upset with me.
If you look at my reply then you will see that I was refering to the broken wire (the real world) not the logic

I am not sure what you are saying, in my logic the STOP PB would be a normally closed contact so the program would "examine if closed" and maintain the latch circuit as long as the STOP PB WAS NOT PRESSED. IF the wire to the STOP PB were to break then the XIC in the program would go false and unlatch the circuit.

I say this because you referenced my example.
 
Back
Top Bottom