Jump to content

Need Help with Turning Outputs in Subroutines


Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.