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 Quote 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted August 2, 2018 MVP 2022 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 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.