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
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
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.
malc cope Posted March 1, 2007 Report Posted March 1, 2007 Try The attached example latchstartstop.bmp
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.
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.
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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now