Single button Start Stop latching logic

Understanding can be hard...

Terry Woods created a thread http://www.plctalk.net/qanda/showthread.php?t=22175&highlight=flip+flop

In that thread he shows how to create a flip-flop, one pb to alternate on/off of one output. In that thread he shows how to do it on virtually any plc with nothing but AND's and AND NOT.

I now understand that just because you can does not mean you should. Using some instructions may make the code hard to decipher for some.

I know many feel that noone needs to EVER look at their code etc...., but at some point it may be necessary.

Its hard enough just trying to learn all the instructions etc for different brands.

Why not get together and decide on ONE simple method, regardless of rung count etc., that will do the job and anyone should understand?

OHHH I forgot, y'all are engineers, my sincere apologizes.
 
rsdoran said:
I now understand that just because you can does not mean you should.
That also sounds like something I would say.

OHHH I forgot, y'all are engineers, my sincere apologizes.
For what? I must have missed it. Anyway, you posted a link that shows all of this been done before and better. I would have done the same thing but used this thread instead:

http://www.plctalk.net/qanda/showthread.php?t=330&highlight=toggle

That thread is 5 years and 1 month old. People are still reinventing the wheel and some aren't very round.
 
Any sensible engineer would not set outputs directly anyway, use internal bits for the latch & then use these to drive the outputs with safety logic (where a hold in sequence is required rather than start from scratch).

I have used single button logic many times for start/stop circuits & one cycle step sequences (for setup purposes).
Any control system should have a hardwired safety circuit monitored by the plc so in the event of e-stop or guard removal all start/stop logic is reset or held so on safety circuit reset the start button for normal control has to be re-initiated.
 
Friends I'm using S7 - SIMATIC 300, could you help me for a coil with;
1. Flow sensor switch.
1. Auto/Manual power on button.
2. start/stop switch.
 
i want a single push button program in just one rung.....in cx programmer......
welcome to the site
Please search for FLIP FLOP if this is what you want
or
Look up KEEP relay in the help file in CX Programmer
there is a perfectly good example there
 
Stealing parky's ladder - only reference the input once.


I0/0 . . . .B3/1. . . B3/0
----| |---+--|/|--------( )
|
|. . . . . . B3/1
+-------------( )

B3/0 O:1/0 O:1/0
--| |--------|/|---+---( )
|
B3/0 O:1/0 |
--|/|--------| |---+


After looking at Bernie Carlton's post I was trying to understand how a scan would look each time one was executed. How do I learn what happens after each scan of this when I0/0 is 1 or 0? I run RS500 Emulate but this doesn't seem to give me the complete picture.

Thank you for help on scans.
 
Last edited:
After looking at Bernie Carlton's post I was trying to understand how a scan would look each time one was executed...

(I0/0 - false, O1/0 - false, B3/0 - false, B3/1 - false)
waiting

(I0/0 - true, O1/0 - false, B3/0 - false, B3/1 - false)
1. scan:

i0/0 is 1 and (not B3/1) is 1 -> B3/0 is 1
i0/0 is 1 -> B3/1 is 1
-----------------------
b3/0 is 1 and (not O1/0) is 1 -> 01/0 is 1
second branch disregard
==============================

(I0/0 - true, O1/0 - true, B3/0 - true, B3/1 - true)
2. scan

i0/0 is 1 and (not B3/1) is 0 -> B3/0 is 0
i0/0 is 1 -> B3/1 is 1
-----------------------
first branch disregard
(not b3/0) is 1 and (O1/0) is 1 -> 01/0 is 1
==============================
...

(I0/0 - false, O1/0 - true, B3/0 - false, B3/1 - true)
x scan

i0/0 is 0 and (not B3/1) is 0 -> B3/0 is 0
i0/0 is 0 -> B3/1 is 0
-----------------------
first branch disregard
(not b3/0) is 1 and (O1/0) is 1 -> 01/0 is 1
==============================

(I0/0 - false, O1/0 - true, B3/0 - false, B3/1 - false)
x +1 scan

i0/0 is 0 and (not B3/1) is 1 -> B3/0 is 0
i0/0 is 0 -> B3/1 is 0
-----------------------
first branch disregard
(not b3/0) is 1 and (O1/0) is 1 -> 01/0 is 1
==============================
...

(I0/0 - true, O1/0 - true, B3/0 - false, B3/1 - false)
x+1+y scan

i0/0 is 1 and (not B3/1) is 1 -> B3/0 is 1
i0/0 is 1 -> B3/1 is 1
-----------------------
first branch disregard
(not b3/0) is 1 and (O1/0) is 1 -> 01/0 is 1
==============================

(I0/0 - true, O1/0 - true, B3/0 - false, B3/1 - true)
x+1+y+1 scan

i0/0 is 1 and (not B3/1) is 0 -> B3/0 is 0
i0/0 is 1 -> B3/1 is 1
-----------------------
Code:
b3/0 is 1 and (not O1/0) is 0   -|
                                 |-> O1/0 is 0
(not b3/0) is 0 and (O1/0) is 1 -|
==============================

(I0/0 - true, O1/0 - false, B3/0 - false, B3/1 - true)
x+1+y+1+1 scan

i0/0 is 1 and (not B3/1) is 0 -> B3/0 is 0
i0/0 is 1 -> B3/1 is 1
-----------------------
Code:
b3/0 is 0 and (not O1/0) is 1   -|
                                 |-> O1/0 is 0
(not b3/0) is 1 and (O1/0) is 0 -|
==============================

(I0/0 - false, O1/0 - false, B3/0 - false, B3/1 - true)
x+1+y+1+1+1 scan

i0/0 is 0 and (not B3/1) is 1 -> B3/0 is 0
i0/0 is 0 -> B3/1 is 0
-----------------------
Code:
b3/0 is 0 and (not O1/0) is 1   -|
                                 |-> O1/0 is 0
(not b3/0) is 1 and (O1/0) is 0 -|
==============================

(I0/0 - false, O1/0 - false, B3/0 - false, B3/1 - false)
state as at beginning
 
Last edited:
Another important thing, that (as far as i can see) nobody implemented is a delay between the start and stop operation. Depending on the type of your button (specially hardware buttons), there could be several transitions on/off/on/off.. (i think they call it bouncing)on only "one" press. So, if you press "one" time the button, and you dont have a delay programmed, you cannt certenly control the start/stop of your motor.
 
Last edited:
i think that hardware prevent this transitions caused by pushing and releasing button internally by how long signal should be on before input goes on.
 
Another important thing, that (as far as i can see) nobody implemented is a delay between the start and stop operation. Depending on the type of your button (specially hardware buttons), there could be several transitions on/off/on/off.. (i think they call it bouncing)on only "one" press. So, if you press "one" time the button, and you dont have a delay programmed, you cannt certenly control the start/stop of your motor.
When this is done correctly - either by PLC or hardwire Relay logic, timers are not needed nor is there a need for delays
:)
 
good training test isnt it.
this is one of my favorite tests for apprentices
So No I will not answer
 
I will say this
1. avoid using 'SCAN' as this usually refers to the PLC rung read process.
2. Using the term 'STATE' referring to logic conditions
How many Logic states are there for this function.

Definitely not 2 or 3
 

Similar Topics

Hello everyone, been awhile since I've posted..... As the title suggests, using Crimson 3.1 software (Red Lion) I cant seem to figure out if its...
Replies
4
Views
1,713
Hi, So I have one push button(non-latch momentary) and would like use it to trigger two function sequences with the short press for primary...
Replies
3
Views
2,004
I've used the simple momentary switch toggle logic for a few decades now. Now I need to find logic that allows the toggling to latch/unlatch a...
Replies
26
Views
9,865
I'm a beginner in PLC education, struck with a problem. Anyone can please help. The problem is: I have a single push button. When I press &...
Replies
30
Views
15,207
Hello, I have a SLC5/05 and am having problems writing code for a pushbutton (momentary) to start and stop a process. The problem is this... Due...
Replies
20
Views
16,010
Back
Top Bottom