
adccommunitymod (AutomationDirect) asked a question.
Click subroutine execution order
Created Date: March 27,2017
Created By: mwdkmpr
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
When a call is encountered does the program go immediately to the subroutine or wait until the end of the main program and then run the subroutine? If I have an unconditional subroutine call, will this execute the subroutine just as if the subroutine was in the main program? Will asynchronous instructions such as MRX and MWX work correctly? Do timers work correctly? Do edge contacts always work?
Created Date: March 27,2017
Created by: mwdkmpr
When a call is encountered does the program go immediately to the subroutine or wait until the end of the main program and then run the subroutine? If I have an unconditional subroutine call, will this execute the subroutine just as if the subroutine was in the main program? Will asynchronous instructions such as MRX and MWX work correctly? Do timers work correctly? Do edge contacts always work?
Created Date: March 27,2017
Created by: bcarlton
The subroutine will execute at the point of the call. As far as the other stuff, if the subroutine is called continuously those instructions should behave just as if they were in the main program section. If called conditionally there could be problems.
Created Date: March 27,2017
Created by: mwdkmpr
Thanks Bernie