Hi all,
In the past I have use Sub Routines more as a organizational tool for my programs than anything else. I would just put things into nice little routines and would have the main program scan them continuously.
Now I have a new project were I have a Sub Routine that is used to search a DINT array for a matching number entered via a PanelView. If that number is found I set a timer to keep the user "logged in" for 30 minutes to get them time to complete a offload. This routine is only executed when a numbers is entered. So the rest of the time the routine isn't scanned or executed.
My question revolve around how the Processor deals with routines and tags in those routines that are not scanned. For example take the routine I just mentioned. If I get a good number and I start the timer then exit the routine. What happens to the timer that is in the routine? Since the routine isn't executed until the timer times out and a new number is entered. Does it just stop were it left off?? What is the best way to handle something like this? Is this a good place to use JMP with Parameters?
Any ideas you can give would be very helpful. I can post the program if needed.
In the past I have use Sub Routines more as a organizational tool for my programs than anything else. I would just put things into nice little routines and would have the main program scan them continuously.
Now I have a new project were I have a Sub Routine that is used to search a DINT array for a matching number entered via a PanelView. If that number is found I set a timer to keep the user "logged in" for 30 minutes to get them time to complete a offload. This routine is only executed when a numbers is entered. So the rest of the time the routine isn't scanned or executed.
My question revolve around how the Processor deals with routines and tags in those routines that are not scanned. For example take the routine I just mentioned. If I get a good number and I start the timer then exit the routine. What happens to the timer that is in the routine? Since the routine isn't executed until the timer times out and a new number is entered. Does it just stop were it left off?? What is the best way to handle something like this? Is this a good place to use JMP with Parameters?
Any ideas you can give would be very helpful. I can post the program if needed.