mr_electrician Posted March 1, 2007 Report Posted March 1, 2007 (edited) Hello guys, I am thankful that there are people like you to help peoplelike me who are learning PLC programming. I need help with what is probably simple logic for most, but frustrating for me to figure out. I am using a S7-200 micrologic plc and I want to be able to turn on and off my conveyor section with the same push button input. I can get it to latch using a set bit but I am not sure how to unlatch it by using the reset bit. Can someone show me the logic for turning on and off 1 output using 1 input which is a momentary push button. Thank you in advance. Edited March 1, 2007 by mr_electrician Quote
s7xp.com Posted March 1, 2007 Report Posted March 1, 2007 Use a MW as integer. On the rising edge of the input increase the integer with 1. In case the integer >=2 then integer =0 If integer = 0 then output =0 If integer = 1 then output =1 Or use a pulse with bit logic, otherwise you are in a loop. Good luck Quote
Groo Posted March 1, 2007 Report Posted March 1, 2007 Look at this thread. http://www.plctalk.com/qanda/showthread.ph...ighlight=toggle My simple solution is post 37, there are a few ways listed though. Quote
malc cope Posted March 1, 2007 Report Posted March 1, 2007 Try The attached example latchstartstop.bmp Quote
mr_electrician Posted March 1, 2007 Author Report Posted March 1, 2007 Thank you very much. The provided logic works just the way I wanted it to do. Quote
Groo Posted March 2, 2007 Report Posted March 2, 2007 OK, I'll attach a picture This one is simpler. Quote
mr_electrician Posted March 2, 2007 Author Report Posted March 2, 2007 Thanks Groo, that will help as well. I will give it a try just for practice, as well in my future programs. You guys ROCK! Ilook forward to learning lots from you guys. Hope you don mind getting bombarded with what might seem like simple logic to some of you guys. Quote
bapi Posted March 31, 2007 Report Posted March 31, 2007 One more thing you can do is to use a counter. One push of the button can move bit 1 in the counter (use logic ... if count value is one ...it is ON )next push adds one more and if the count value is 2 reset counter ( this is OFF ).. try this it works -Anshuman Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.