PHoskins Posted August 2, 2018 Report Share Posted August 2, 2018 When I call a sub routine in ladder it appears it only scans it once. is this correct? Is there a way to call a sub routine and have it scan till it sees its return? Thanks Paul Link to comment Share on other sites More sharing options...
PHoskins Posted August 2, 2018 Author Report Share Posted August 2, 2018 I see my issue I had it tied to a button so it called the routine only while the button was held down. Changed it to a bit that gets turned on and off when the routine is done. Still figuring this stuff out but I'm getting there. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted August 2, 2018 MVP 2023 Report Share Posted August 2, 2018 I strongly recommend that you do not do conditional subroutine calls. Write your logic so that the subroutine will always be called continuously. Coils in an uncalled subroutine are in limbo and can give you unexpected results. Under normal circumstances, a well-written program avoids conditional subroutine calls. 1 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