Scott59 Posted March 12, 2016 Report Share Posted March 12, 2016 Hello All I am calling a subroutine from the main and have two outputs linked to a button on the HMI screen.When i push the button, the two contacts and Output Coils energize but when i release the button the contacts turn off but the Output coils stay on. i have tried several combinations of contacts and coils...whenever i can get the output coils to energize they wont turn off. What i am trying to do is...when i push the HMI button i need the outputs to energize as long as i hold the button on...then turn off when i release the button. Link to comment Share on other sites More sharing options...
Alexander Posted March 14, 2016 Report Share Posted March 14, 2016 What type of coil are you using? If you are using set coils, that is why they are staying on. You would need to use direct coils in order for them to shut off when they are not powered. Also, how are you calling the subroutine? Is it always running or does it only run when the buttons are pressed. If they only run when the buttons are pressed then when you release the button it stops calling the subroutine. This will also cause the outputs to remain on since the logic that controls when the output turns on/off is in that section of ladder. If not called it will remain at it's previous state. Link to comment Share on other sites More sharing options...
Scott59 Posted March 16, 2016 Author Report Share Posted March 16, 2016 Hello UniGuru I have a HMI Button linked to MB 7, I then have a Direct Contact tied to MB 7 then linked to the Call Subroutine function in the main ladder, In the Subroutine I have Direct Contacts 3 of them tied to MB 7 linked to Direct Coils that are associated to my Outputs. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 16, 2016 MVP 2023 Report Share Posted March 16, 2016 It sounds like you stop calling the subroutine when you let go of the button. Since the subroutine is no longer called, it cannot turn off the coils. Unless there is some specific need, do not conditionally call your subroutine. Link to comment Share on other sites More sharing options...
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