You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 7th, 2008, 01:56 AM   #1
hasan_ali
Member
United Kingdom

hasan_ali is offline
 
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.
  Reply With Quote
Old January 7th, 2008, 02:13 AM   #2
ggchavhan
Member
India

ggchavhan is offline
 
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.
  Reply With Quote
Old January 7th, 2008, 04:59 AM   #3
Ken Moore
Member
United States

Ken Moore is offline
 
Ken Moore's Avatar
 
Join Date: May 2004
Location: Upstate South Carolina
Posts: 2,325
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

  Reply With Quote
Old January 7th, 2008, 06:16 AM   #4
capnahab
Member
United States

capnahab is offline
 
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.
  Reply With Quote
Old January 8th, 2008, 07:10 AM   #5
parky
Member
United Kingdom

parky is offline
 
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.
  Reply With Quote
Old January 8th, 2008, 07:29 AM   #6
ggchavhan
Member
India

ggchavhan is offline
 
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 |
|----|\|---| |------|
|
|
  Reply With Quote
Old January 8th, 2008, 10:15 PM   #7
hasan_ali
Member
United Kingdom

hasan_ali is offline
 
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.
  Reply With Quote
Old February 2nd, 2009, 08:57 AM   #8
Scharbag
Member
Canada

Scharbag is offline
 
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:16 AM.


.