![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Dec 2007
Location: Midlands
Posts: 54
|
push button to turn on and off light
Dear,
I have an exercise that i have to turn on and turn off the light with the same push button. How would be the ladder? i am using Allen Bradley Control Logix PLC. |
|
|
|
#2 |
|
Member
![]() Join Date: Nov 2006
Location: pune
Posts: 128
|
Mr Ali
hi You have to use X_Or logic, or you can use ROL instruction. No of ways this logic can develop. |
|
|
|
#3 |
|
Member
|
This topic has been covered many many many times. Search the site for "flip flop".
__________________
"To give real service you must add something that cannot be bought or measured with money; and that is sincerity and integrity." - Donald A. Adams |
|
|
|
#4 |
|
Member
![]() Join Date: Jan 2008
Location: ATLANTA
Posts: 5
|
There are two ways to attack the problem. Either use complicated ladder logic or a two position switch. The problem today is that everybody is trying to fix problems with the PLC when simple hardware logic triumphs. I am a simple hardware person who hates computers.
|
|
|
|
#5 |
|
Member
![]() Join Date: Oct 2004
Location: Midlands
Posts: 939
|
look at previous post about turning on an output with one push button
Last edited by parky; January 8th, 2008 at 07:16 AM. |
|
|
|
#6 |
|
Member
![]() Join Date: Nov 2006
Location: pune
Posts: 128
|
Look the logic
pb b3:0/0 b3:0/1
|----| |-----[OSR]--------------() | | b3:0/1 Lamp lamp |----| |---|\|------|----------( ) | | | b3:0/1 Lamp | |----|\|---| |------| | | |
|
|
|
#7 |
|
Member
![]() Join Date: Dec 2007
Location: Midlands
Posts: 54
|
Resolved
Thanks to everybody for giving so useful suggestions.
Previously i was using the counter to count the number of times the push button is pressed. and using its ACC value to latch and unlatch the light. It was causing the program longer and using more memory because i had to control several lights through push buttons. Now i followed the concept of flip flop. Ken, i got that and completed the exercise. ggchavhan, simplified in a good way. |
|
|
|
#8 |
|
Member
![]() Join Date: Feb 2009
Location: Saskatoon
Posts: 1
|
I love the internet sometimes...
I needed to have a latching solution to allow the flip-flop to be retentitive and possibly manipulated durring initial PLC startup. There is a nice PDF, which exists in this forum, that has 10 flip-flop examples. These examples helped me figure this problem out. I was sooo close to the solution, missing on small line of code which the PDF pointed out to me. Ladder logic is neat stuff once you pull your head from your but... Now they need a latch command in function block that works! Cheers, Dave Last edited by Scharbag; February 2nd, 2009 at 09:05 AM. |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|