Antal Posted November 30, 2020 Report Share Posted November 30, 2020 Hi. Single Push Button On/Off. I did this project with a 2-sec timer. Good solution? I look forward to your opinions. Greetings B.A Quote Link to comment Share on other sites More sharing options...
Dave Posted November 30, 2020 Report Share Posted November 30, 2020 Not sure why you need the timer(s), but if you don't need the delay, you could use the Toggle Coil instruction, triggered by a rising edge on your push-button input. If you do need the delay, then just use one timer and trigger the Toggle Coil instruction on the rising edge of the timer.out bit....makes for less rungs and easier to follow logic. 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted November 30, 2020 MVP 2022 Report Share Posted November 30, 2020 I don't understand what "M0", "M1", "Output", or the timer are for, but a single pushbutton on/off requires NO ladder logic at all. The button itself (unless it's a physical pushbutton connected to a digital input instead of an on-screen button) can be programmed to toggle an output, and other things, without any ladder logic. If it is a physical button, be aware that there is a Toggle Coil available to simplify things. Quote Link to comment Share on other sites More sharing options...
Antal Posted December 2, 2020 Author Report Share Posted December 2, 2020 I'm very new, this is my first project. It is a physical push button connected to a digital input. Quote Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted December 2, 2020 MVP 2014 Report Share Posted December 2, 2020 Yes, it is unclear what you are trying to do. As @Flex727 has said, there is a Toggle Coil which could be used with your Timer as below. User has to hold the button for the length of the timer to turn on or turn off. Quote Link to comment Share on other sites More sharing options...
Antal Posted December 2, 2020 Author Report Share Posted December 2, 2020 Thanks for the reply, it's so very simple and it works. We always do the complicated solution first . Quote Link to comment Share on other sites More sharing options...
Antal Posted December 2, 2020 Author Report Share Posted December 2, 2020 Hi Simon I solved it that there would be no hysteresis. It works well. There is a simple solution? Thanks in advance for the answer. Greetings B.A Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 2, 2020 MVP 2022 Report Share Posted December 2, 2020 One piece of advice: DO NOT place multiple separate logic threads in a single ladder rung. Move that second line in rung 10 to the next rung. The whole point of ladder rungs in ladder logic is to separate logic threads for the compiler. By the way, what's the purpose of adding and subtracting 5? Quote Link to comment Share on other sites More sharing options...
Antal Posted December 2, 2020 Author Report Share Posted December 2, 2020 Thank you for your answer. Thanks for the advice. I wanted to solve the hysteresis by adding and subtraction. I am very beginner in PLC programming. This is my 4th day in PLC programming. So far I have only written programs for microcontrollers. Greetings B.A Quote Link to comment Share on other sites More sharing options...
Antal Posted December 12, 2020 Author Report Share Posted December 12, 2020 Hi How many items can be maximum in one Rung? Input conditions. Thanks in advance for the answer. B.A. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 12, 2020 MVP 2022 Report Share Posted December 12, 2020 7 hours ago, Antal said: How many items can be maximum in one Rung? Input conditions. I don't know the answer to this question, but I guarantee it is WAY more than you have in this example. I wouldn't worry about it. I'm sure it would give you a compile error if you exceed the limit, and even if you did, it is very simple to break things up to get under the limit. Quote Link to comment Share on other sites More sharing options...
Antal Posted December 13, 2020 Author Report Share Posted December 13, 2020 Hi Thank you for your answer. I tried this but it doesn't work. Please help so we can solve it. Could you give me a solution to this. Thanks in advance for the answer. Greetings B.A Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 13, 2020 MVP 2022 Report Share Posted December 13, 2020 You need a coil at the end of rung 9, then a contact of that coil at the beginning of rung 10. But as I said, in your case there is no need to break this up as you have not even come close to exceeding the maximum number of items in a single ladder rung. Quote Link to comment Share on other sites More sharing options...
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.