push bottom

claudibb24

Member
Join Date
Jan 2006
Location
Lima
Posts
6
Hello,

I have to on and off a timer with a push bottom with only one in, how can i do that with ladder program.
Can you help me please, thanks
 
Sounds like you need a flip-flop. You need one button to cause a bit, or internal binary coil, to change states each time the button is pressed. You can then use this bit to start and stop the timer. There are many examples of doing this with various PLCs if you search the forum for "flip flop". A couple of questions:
1. What type of PLC are you using? Be very specific and you'll get better answers.
2. Do you want the timer to reset each time the button is pressed, or just continue from where it left off?
 
I'm sure that there are many, but one is with a counter, push the button and you get a 1, push the button again you get a 2, use the 2 in your logic to reset the counter and use the 1 to start your timer.

Or a latch with a one shot

 SOR XIC I:0.0/5 CTU C5:1 3 1 EOR  SOR EQU C5:1.ACC 2 OTE B3:1/0 EOR  SOR GRT C5:1.ACC 2 RES C5:1 EOR  SOR XIC B3:1/0 OTE B3:0/8 EOR  


I did this with a key switch once
 
You need to use a Transitional coil (One-Shot) and Set-Reset on a coil.
Use a counter if you don't have the Set-Reset function.

3 rungs:
Input 1, Transitional 1.
Transitional 1, Not Coil 1, Set Coil 1.
Transitional 1, Coil 1, Reset Coil 1.
 
i am using the plc twido TWDLMDA20DRT
I want to do a timer with a push bottom with only one in.
With a firt click in the bottom, i turn on the timer and a counter begin to count. The counter count just 6 minutes and it reset and the in of the timer have to go off.
Also, when i push the bottom it have to stop and continue when it left off, or it have to reset.
How can i do that
 
Is this better ?, I was bored
 XIC B3:1/0 JSR 5 


 XIO B3:1/0 JSR 3 


 XIC I:0.0/5 CTU C5:1 3 1 


 EQU C5:1.ACC 2 OTE B3:1/0 


 GRT C5:1.ACC 2 RES C5:1 


 XIC B3:1/0 OTE B3:0/8 



its a spring return key sw, to turn the system on and off, thats all I had, the diferent JSR are by passes
 
i am using the plc twido TWDLMDA20DRT
I want to do a timer with a push bottom with only one in.
With a firt click in the bottom, i turn on the timer and a counter begin to count. The counter count just 6 minutes and it reset and the in of the timer have to go off.
Also, when i push the bottom it have to stop and continue when it left off, or it have to reset.
How can i do thati am using the plc twido TWDLMDA20DRT
I want to do a timer with a push bottom with only one in.
With a firt click in the bottom, i turn on the timer and a counter begin to count. The counter count just 6 minutes and it reset and the in of the timer have to go off.
Also, when i push the bottom it have to stop and continue when it left off, or it have to reset.
How can i do that
 
First, you need a flip-flop to make the pushbutton On for the first push, and off for the second push. Use a Transitional coil to Set and Reset another coil.

Second is a Timer that you can start and stop without reseting. This is called an Accumilating Timer. If you don't have that feature, then make your own using a counter and a 1 second pulse. The Set coil will enable the 1 second pulse. On the reset line, test for the Counter-timer to see if it's done in series with the Set coil.

Finally, use the signal from the Counter-timer to run your 6 minute Counter.

Quote: Also, when i push the bottom it have to stop and continue when it left off, or it have to reset.
How can i do that?

On the reset line, put a test for "counter done" in series with the pushbutton. It will only reset if the counter is done.
 
Last edited:
geniusintraining said:
I'm sure that there are many, but one is with a counter, push the button and you get a 1, push the button again you get a 2, use the 2 in your logic to reset the counter and use the 1 to start your timer.

Or a latch with a one shot

SOR XIC I:0.0/5 CTU C5:1 3 1 EOR SOR EQU C5:1.ACC 2 OTE B3:1/0 EOR SOR GRT C5:1.ACC 2 RES C5:1 EOR SOR XIC B3:1/0 OTE B3:0/8 EOR
I did this with a key switch once

That is the hard way. There is no need to reset the counter and no need to do a compare. The least significant bit C5:0.ACC/0 changes state every time the timer increments.

0 0 0 0 Timer.Acc=0
0 0 0 1 Timer.Acc=1
0 0 1 0 Timer.Acc=2
0 0 1 1 Timer.Acc=3
0 1 0 0 Timer.Acc=4
0 1 0 1 Timer.Acc=5

ctuff029a0.GIF


The counter never requires resetting and this method will funciton properly even when the counter rolls over. However, if power is cycled, the ACC/0 bit will remain in its last state unless reset using the first pass bit.

This example and those give so far are for the AB plc and the OP said that he was using the Telemecanique Twido.

Since this is probably for a school assignement, I recommend the student attempt to understand the function of a flip flop and them implement it in logic for the Twido because that is what the instructor is expecting.
 
Last edited:
I concur...hence the name genius-in-training, that was the training part. I just like it when people address me they abbreviate the name and call me genius.

Thanks Alaric
 
OK, curiosity got the better of me and I looked up the TWIDO insturction set.

http://www.telemecanique.com/85256E69002E481A/all/CC1EC5F7B51A94ABC1256F4D004A53F3/$File/31003914k01002.pdf

As it is a Telemecanique product I wondered if its ladder might be similer to Modicon 984 Ladder, and it is similar.

Like the Modicon 984, the Twido uses a 7x11 array solver that solves the 1st column top to bottom, then the second colum top to bottom, etc. We can take advantage of that solve order to build a simple flip flop, which while it should work in the Twido, won't work in other PLCs (such as AB) that use stack solvers instead of array solvers.

%I.0.0.0 %M1 %M1
----]P[---+----]\[--------(S)
|
| %M1 %M1
+----] [--------(R)-



-]P[- is a rising pulse input instruction. It will be true for only one scan when the button is first pressed. If %M1 is off then it will be set. If it is on then it will be reset. Because the rung is solved in vertical columns there is no chance that the -(R)- will overwrite the -(S)-. Thus, bit %M1 will turn on and stay on when the button is pushed once and turn off when the button is pushed a second time. You can also use a -(R)- coil off the timer to also reset the %M1 bit when the timer is done.

I don't want to give you a complete solution for your homework, but I'm willing to start you in the right direction. I hope this helped.


disclaimer: I have never programmed a Twido but I am basing this upon what I know about similar PLCs and I had a look at the programming manual.
 
geniusintraining said:
I concur...hence the name genius-in-training, that was the training part.

The best way to learn is to do. This board is loaded with tips that even us more experienced guys learn from.

I just like it when people address me they abbreviate the name and call me genius.

How about it if we abbreviate it as GIT? 🍻

Our Brit friends on the board might get a chuckle out of that.

🍺
 

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
194
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,414
I have 2 Absolute Encoders 8192 steps per Rev. (Model TR Electronic CEV65m-11003) These Encoders communicate to the PLC5-60 via Parallel push/pull...
Replies
3
Views
1,540
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,449
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,784
Back
Top Bottom