PLC5 Latch/Unlatch using a single pushbutton

Rhonen

Member
Join Date
Jan 2004
Posts
2
Using PLC5 logic.

Awhile ago I came accross a circuit that utilized 1 push button and 2 rungs of logic with one TON in each that simulated a latched "on" state when first pressed and a unlatched "off" state when that same pushbutton was pressed again. I'm trying to recreate that same circuit for a project I'll be modifying tomorrow.

I was wondering if anyone has come accross a circuit like this and could post the code. In the mean time I'll break out my pencil and see if I can come up with that circuit again.

If there is an easier way than this to simulate a steady reversal of current state using one pushbutton that I'm overlooking could you please post it here.

Thank you in advance.
 
With a PLC5 u dont need to use a TON, just use a one shot.

First rung have pushbutton one shot a bit
|------|PB|-----------(ONS)------------(B3/0)
Second rung you invert the logic on branches to latch or unlatch the bit.

|------| |------|/|---+-----------------( )
| |
| |
|------| |------| |---+

I left the documentation off but the XIO and XIC are relevant to B3/0 and the output, shouldnt take long to figure this out.

I just had an 18 hour day so I am being lazy.
 
Here is an alternative. Remember, there are many different ways to solve this particular problem, all of which will work fine. I offer this solution simply as an alternative. Regards.

[Rung 0]
BST XIC I:001/0 NXB XIC O:000/0 BND BST XIO I:001/0 NXB XIO B3/0 BND OTE O:000/0

[Rung 1]
BST XIC I:001/0 NXB XIC O:000/0 BND BST XIO I:001/0 NXB XIC B3/0 BND OTE B3/0

I:000/0 = User push button address
O:000/0 = Toggle bit address
B3/0 = Toggle auxiliary bit address

Note: The above syntax uses AB's ASCII editing mode. To enter this code, and assuming you are using RSLogix5, double click on the desired rung number and type (or copy) the blue text shown above.
 
Last edited:
One Button - One Rung

3d1cfe6d4acaac97.gif




This code is a direct implimentation of the following FlowChart.

This thing works... at least, it works in an S7.

I have it running right now on an S7-200.


3d1cfec24b300d7f.gif


...couldn't help it...
 
thank you

I would like to thank everyone here for the info ive just started in the plc field after schooling for a while in programming with c#, visual basic.net, sql, and java.
 
I have done that as a confirmation, i.e. hold for 1 sec to start AUTO mode, tap once for Manual mode.

SOR XIC B9:0/0 BST TON T4:98 0.01 100 0 NXB OSR B13:0/3 OTE B3:0/11 BND EOR

SOR BST XIC T4:98/DN NXB XIC B3:0/10 XIO B3:0/11 BND BST XIO B10:0/8 XIC B3:1/7 XIO B3:0/14 NXB XIO B3:0/0 BND XIC I:1.0/3 XIC B3:0/2 BST OTE B3:0/10 NXB OTE B10:0/0 BND EOR
 

Similar Topics

I am trying to convert an old PLC5 program. I have several instances in the unlatch instruction where they give a B file on top of the unlatch...
Replies
9
Views
2,042
Another very basic question. I have read ALL of Ron Beaufort's latch/unlatch comments and full blown explainations I could find on this board. I...
Replies
19
Views
15,813
I am using the following formula and I am getting error, Invalid Expression - too many closing parenthesis. when i copy the formula to notepad or...
Replies
4
Views
158
Preface: Kinda long, so I made section titles Intro: I just want to see if anyone here has seen anything similar. A PLC5-40 series C enhanced...
Replies
3
Views
377
Back
Top Bottom