flip flop logic

cclarsencc

Guest
C
where can i see some sample logic looking for a momentary input/"maintianed on state" then the same momentary input for fot the maintained off state thanx cc
 
[ladder}

|
|Input1 Internal 1
|--] [-------------------------------------------------------( )--
|
|
|
|Internal 1 Output1 Out 1
|--] [--------]/[-----------------------------------------( )--
| |
|Out 1 Internal 1 |
|--] [--------]/[------|

If you ever want to alternate between 2 outputs just add another line.
Out 1 Out 2
|--]/[------------------------------------------------------( )----
[/ladder]

Input 1 is naturally the N.O. momentary
Internal 1 is the plc internal bits..For AB that would be B3..GE %M000 etc etc]
Out 1 is Output 1
Out 2 is Output 2
 


|
|Input1 Internal 1
|--] [-------------------------------------------------( )--
|
|
|
|Internal 1 Output1 Out 1
|--] [--------]/[--------------------------------------( )--
| |
|Out 1 Internal 1 |
|--] [--------]/[------|

If you ever want to alternate between 2 outputs just add another line.
Out 1 Out 2
|--]/[-------------------------------------------------( )----



Input 1 is naturally the N.O. momentary
Internal 1 is the plc internal bits..For AB that would be B3..GE %M000 etc etc]
Out 1 is Output 1
Out 2 is Output 2

Gotta use proper symbols when doing this ] those work }those dont
 
Is my reply factually correct

That is basically what I use for my flip flop circuits too.

I believe that you have to ensure that Internal coil is only true on a false to true transition (pulsed or one-shoted) is this correct?

If you want the last state of the flip flop to remain on power-up, then you have to make the output retentive.

This is real easy to do in a modicon cause all you have to do is replace the coil with a retentive coil.

Now, for an Allen Bradley, the code would have to be re-written using latch instructions.
 
ganutenator:

You're right - internal 1 needs to be on for only one scan per push of the button (or you need to be really quick on the button).


Input Internal2 Internal1
-----] [-----+-----]/[---------( )---
|
| Internal2
+------------------( )---

 
have seen the flip flop concept at work in AB PLC5 by using the NOT function a input(s) and a ONS . The negative of this is it operates on a word.
 
Chako nothing personal but what is being downloaded? I posted a viable option ...is yours so complicated that you cant post it?

Chris I know you are in business and need to promote that ( L i been there) in what you do. Dont forget tho that this is an open forum and lessons/objects need to be posted.

I have noticed that most of your applications involve AB ladder, not all have then option/understanding of AB ladder.

We know you have a site that has files to download BUT please if the subject/file is appropriate to the topic then post it FOR ALL TO SEE.
 
I figurd it was easier to post a link. The link contains a PDF file which most people can view without AB Ladder software. Just my way of speeding up an answer I guess. Don't take it the wrong way?

Peace.
 
I am not trying to be argumentive Chris, just learn things. Your link was AB specific and showed no outputs. How does that explain/show a one PB to turn off/on an output.

Note: I am not good at plc's ( I am just an old tech still learning). There are many ways to do many things...thats what I want to understand.
 
Sorry I can't be more LINK SPECIFIC like you'd like because posting an exact link will not work from that site. However the example is on the very top of the list posted June 10, 2002. Called "Basic One Button Toggle 1.0". I dunno how else better to explain that. Download the example, open up with winzip. Look at the PDF file. Your example and my example are near the same.

When I said easier, I seen that you posted TWICE because you had trouble copy and pasting your "text" code to the board. I've already been down that road here, trying to copy and paste code to the board, and it takes more time than I wanted to invest, when in fact I knew I had an example ready to be downloaded in PDF format two days ago. And who knows, maybe the orginal poster has AB software, the RSS file is there, he/she could use it and look at the code in real software.

Don't be so hard on people that truely want to help in here, you're an old timer here, don't scare away people willing to post with "OT" dicussions.

Have a good week.
 
I accomplish this by using one counter and the "equal to" instruction. When the push button is pressed once it increments the counter by one. when the counter is equal to one I turn my bit on and it stays on. When the pushbutton is pressed a second time, the counter is incremented to 2 and when the counter is equal to 2, I turn my bit off and reset the counter.
 
I recently ran across the following code:

PB CHECK LIGHT LIGHT
---| |---+---|/|-----|/|---+---(L)
| |
| | CHECK
| +---( )
|
| CHECK LIGHT LIGHT
+---|/|-----| |---+---(U)
| |
| | CHECK
| +---( )
|
| CHECK
+---------------------( )



Yep, the whole thing in one rung of logic!
Of course, it uses multiple coils, which is something of a no-no (the middle one could be eliminated, but it's more ethetically pleasing the way it is.)

Just passing it on, FWIW. This is NOT intended for either student or real use..

It won't work in all PLCs, of course (it would fail miserably in a Modicon 984 for example, with its Left-to-Right, Top-to-Bottom.
scanning method.

As I said, just for jollies [size=0.5] (Well, I thought it was funny!)[/size].
 
instruction list

I thought I posted this before:


ld ixPushButton
r_trig (* rising edge on shot *)
xor oxLamp
st oxLamp



the r_trig will leave the condition true on a rising edge. The exclusive or will cause the lamp to toggle when the condition is true.

This is very simple and very compact.

If I want to do 32 pushbuttons at a time:


ld idPushButtons (* double word of push button inputs *)
xor mdLastPushButtons (* changed pushbuttons *)
and idPushButtons (* rising edge pushbuttons *)
xor odLamps (* toggle lamps that have rising edge *)
st odlamps
ld idPushButtons (* update lastpushbuttons for next scan *)
st mdLastPushButtons




Wow! Sure beats 32+ rungs.
 
Last edited:
OK since I am being attacked from people constantly that I have never talked to I am going to question this.

Who can understand it? Another programmer?

Do programmer always service your machines?

Is this more complicated than my 3 rung ladder..ie that much more compact in the long run?

Yes its less lines of code but is it truly more productive in the long run?

I have been accused of wanting to "dumb down" plc programming. Maybe that is correct in a sense.

MAYBE JUST MAYBE I want "others" besides programmers to know what is going on.

Overall I dont see where anyone is being DUMB when the technology matches the physical application...ie a way to see the schematic in progress.

Overall I kind of understand Peter's logic ( but i am an exception to the rule)
load pushbutton OR lamp
one shot
output lamp
OR lamp is the holding ckt
Push button again then it should release the OR condition

So many Engineers get so involved with what makes life simple for them they forget the obstacles that have to be overcome on the plant floor.

OK guys you GOT YOUR ONE SHOT with me
Show me where what you propose is BETTER for us plain ol electricians/maintenance guys THAN it is FOR YOU.

Personally I dont care how many rungs of code it takes...can an idustrial electrician that knows RLL understand it?

If you guys/engineers (who dont want me around because I am a symbol of your conscious) show me HOW its more effective to use all this **** than plain old ladder logic.

SHOW me WHY it does more than make LIFE easier for YOU.

PROVE TO ME THAT IT DOES MORE THAN MAKE YOUR SORRY OVERPAID LAZY A$$E$ LIFE SIMPLER

GET off your EGOSTITICAL sorry godlike syndromes and do something for once. PROVE IT.

IF by any remote chance you can...and I doubt it because your posts show your laziness...I will be gone forever from your miserable existence. POOR YOU.

Note: There are many Engineers/people on this forum I exclude from this, but those are the ones that are probably capable of stating things that sound resonable. If they state something though I will do as I say.
AT THIS TIME DO NOT EXCXLUDE THE FOLLOWING:
Terry Woods (even tho I think he is awesome)
ganutenator (says I do things which he is more guilty of}
Peter Nachtwey (you have a tendency only to coverse with ( what you may consider) peers)...in this case its not a good thing.

I in return accuse some of you of wanting to play GOD because you have control over an environment many people do not understand. You use the excuse to make your life easier that others are dumber and do not attempt to do/accomplish more. BS, you are just being LAZY.

Know what tho? I refuse to lower myself to your college graduate/engineering degree level. I will not curse you.

I have done, learned and accomplished many things in my lifetime that NONE of you can ever hope to do, degree or not. Foremost being I have 5 good kids which I gladly state as being my MAJOR accomplishments in LIFE.

I have been very wrong of my assessment of ME. I thought I was unable to teach people because of self percieved inability to properly state some things. Some of you (Terry comes to mind) are BY FAR more eloquent than I may ever be, BUT you are asinine. You do not care about your fellow worker(s) or anyone but yourself, your ideas and how hard your job may be for you.

GET A LIFE guys.
Prove it and I will be gone!
 

Similar Topics

I am having this issue trying to figure out how to do this. I have a Hydraulic ram that travels when a machine is running. The ram extends to the...
Replies
31
Views
9,538
Hi, i am trying to use a different method of using one pushbutton to start/stop a system. I know how to do it using two rungs and a one shot. I...
Replies
12
Views
9,152
U
how can i create a flip flop in ladder logic? It needs to be triggered by one input and has two out puts that flip flop with no time limit for...
Replies
20
Views
55,359
Hi everyone, I'm learning ladder logic and have built a flip flop circuit (see pic) from an online tutorial. Closing the switch A is meant to...
Replies
19
Views
6,948
I found and fixed issue. B3:3 was used in MOV.
Replies
11
Views
2,600
Back
Top Bottom