taknevs
Member
I have a basic doubt in using subroutines in ladder logic. say i call a subroutine from the main logic. Assume that in the subroutine, i am starting a timer for 2 secs using an input that stays CLOSED always, and when the timer is timing I keep an LED on.
my question is: do i assume that the subroutine will be executed continuously till the timer starts and gets done,
or
the subroutine will bet executed for one program cycleand so the timer will not get fully executed.
i do not have a clear idea about the subroutine handling and the book i read explained it, and i got more confused. my opinion is the subroutine should get scanned only once and control must be transferred to the main program.
but when i implemented this using practically (AB micrologix 1200), the timer was ON for 2 seconds which meant that the subroutine was continuously executed until the timer timed OFF.
taknevs
my question is: do i assume that the subroutine will be executed continuously till the timer starts and gets done,
or
the subroutine will bet executed for one program cycleand so the timer will not get fully executed.
i do not have a clear idea about the subroutine handling and the book i read explained it, and i got more confused. my opinion is the subroutine should get scanned only once and control must be transferred to the main program.
but when i implemented this using practically (AB micrologix 1200), the timer was ON for 2 seconds which meant that the subroutine was continuously executed until the timer timed OFF.
taknevs