One Push Button: Please Please explain clearly

Sample Code - Ladder

This logic is developed for momentary push button. FYI safety systems does should not use this On-Off Logic.
this is the type of training aid we give people who wish to learn control systems.
I like to set this task for apprentices to use relay logic. - NO PLC
one N/O push button 3 to 5 relays (3 is harder) and 1 light
Press the button the light goes ON
Press it again and the Light goes Off.



Coolasad14 - your program is good - but too complex - try again
The answers earlier on this post are better.


As i had
 
Greetings Jamal ...

the step-by-step explanation you requested for how a Flip/Flop rung operates has been posted at the following link:

http://www.plctalk.net/qanda/showthread.php?p=427567&postcount=1

I used a slightly different rung construction from the one that you posted so that you could try it out on an Allen-Bradley - and on many other brands ...

the step-by-step explanation takes about ten pages of text to go through all of the scans required to fully describe all of the nuts-and-bolts involved ...

here is a preview ...

.

classic_flipflop_lesson.JPG
 
Last edited:
Coolasad14 - your program is good - but too complex - try again
The answers earlier on this post are better.

Thanks for your feedback. Actually I developed this logic on the first day of my learning ladder logic and I didn't get time to revise it as I work exclusively on Function block programming for PLCs now.
Can you kindly guide me if it will be a handicap for me if I am not very good in ladder Logic while being excellent in FB Programming.
 
Ladder has some advantages but -
All programming methods have their uses - Dont want to start arguments as to which is better - Use what ever suits the environment.
In Australia I am a qualified Electrician - Also worked as a senior technician.
My Reason for liking Ladder is it is easier for other electricians to read and fault trace - A printout is also easier for them.
I fully understand that other programming methods are quicker and better.
 
I agree with IJK's version it's the most simple and works with AB, S7-300 and GE.....I stay clear of OTL's I've seen bad things happen with some code after a download since they are retentive.

1PB_FlipFlop.JPG
 
Flip/Flop – the debate rages on ...

Greetings jac ...

I'm afraid that we have a potential problem here ...

quick question: what is "PB1" in your program shown above? ...

if PB1 happens to be an actual field input device (a real pushbutton) then the rung construction you've shown above won't work reliably for an Allen-Bradley ControlLogix or CompactLogix system ...

the reason is tied to the "non-synchronous" processing of the inputs (and outputs) on those particular platforms ... (oops!) ...

specifically, if PB1 is held ON in the field, the output will be randomly turned ON and OFF ...

the (dot bit) addresses that you've shown in your figure indicate that you were using a ControlLogix or CompactLogix system for your example ...

I have no familiarity with the other brands you mentioned – so I can't comment on them ...

incidentally, the construction that you've shown WILL work OK with other (older) Allen-Bradley platforms (PLC-5, SLC-500, MicroLogix, etc.) ... those systems DO have a synchronous processing sequence for their inputs and outputs ... but ... make sure that the status of PB1 is not also being used in any "downstream" locations of the program – or problems will result ...

going one step further ...

I stay clear of OTL's I've seen bad things happen with some code after a download since they are retentive.

certainly I won't argue that an unexpected "retentive" operation can indeed cause problems after a download, etc. – but then again – sometimes we really do NEED a retentive operation regardless of its potential for "download" surprises ...

my distinguished colleague daba brings up some excellent points in the following recent thread ...

http://www.plctalk.net/qanda/showthread.php?p=427659&postcount=4

please don't get the impression that I'm trying to nit-pick your post – but MANY beginners will be reading this in the future – and there are some potential problems and misconceptions here that need to be cleared up ...

 
Last edited:
Sorry Ron,
I should have stated that example is for use from a HMI. Set the bit in the HMI and the PLC will turn off after the scan.
To use with a hardwired input you would need to replace the first OTE with a internal bit as well as the two corresponding in the next rung.

Cheers
 
@ adfox
Do you spot it now?
Kalle

I see it now. Sorry - I need to sleep just a little more.
But my intentions were pure :)

Just to correct:

A PushButton
Fp aux
= PushButton_Pos

A PushButton_Pos
AN State_ON
S State_ON

A State_ON

L S5T#50ms
SD SomeTimer

A SomeTimer
A PushButton_Pos
R State_ON

This will work, but
the method krk showed is more elegant.
 
Last edited:

Similar Topics

FactoryTalk View ME running on PanelView Plus 7, connected to Compact GuardLogix 5380 PLC Customer is asking for a physical push button to be...
Replies
6
Views
211
Looking for some help ! I need to change an inverters frequency using two speed steps. The operator uses a momentary push button. So first press...
Replies
8
Views
1,427
Hello all, I'm currently working on a project where I need to have a reset in place on my HMI (PanelView Plus 1500 for reference) to put my...
Replies
5
Views
1,454
Hello everyone, Does anybody know if there is a way of simulating the behaviour of a FTV momentary push button on iFix? I am trying to create a...
Replies
5
Views
1,802
Hi All Could anyone advise me on how to protect the push button on the screen from occasional touch? I've faced up the problem that I can't...
Replies
22
Views
6,641
Back
Top Bottom