CFBFP Posted October 3, 2014 Report Share Posted October 3, 2014 Hi at the end of each subroutine in the ladder program you find "RET". You can't move it to the right or place it somewhere else. I want to conditionally return from a subroutine, but I can't move this object to insert a condition. Why is it? How then to conditionally return from a subroutine? f. Quote Link to comment Share on other sites More sharing options...
cantcliff Posted October 3, 2014 Report Share Posted October 3, 2014 The one listed in the subroutine may be required by the software, but you should be able to add additional RETs to the subroutine. Have you tried adding an additional rung with your conditions and adding a second RET function to it? Reference Page 34 of the Ladder Programming PDF, or the help system in visilogic shows an example of what I mean. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 4, 2014 MVP 2022 Report Share Posted October 4, 2014 I'm curious as to the logic you are using that would require a conditional RET? This invites the possibility of a Watchdog Timer alarm. You might consider a variation with conditional CALL of the Subroutine instead. 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.