Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Hi all, I have Button GUI that makes a variable = 1 and then calls a Sub Routine (Collecting Pulses) This works as expected but locks up because there is nothing to break the do while. I wish to use a second GUI button to make my iCalibratingOccurring = 0. The do while condition will not be true and then the SR will be exited.
sub CollectingPulses do while iCalibratingOccurring = 1 pause (1000) iPulses = iPulses + 1 ctrlval(dCalibratePulses) = str$(ipulses)
loop end sub
I have found the following that when edited can use pins as an interrupt. SETPIN pin, type, subroutine I have tried a couple of alterations to make it work but with no such luck yet.
Thanks in advance. Carl
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572
Posted: 11:54am 27 May 2019
Copy link to clipboard
Print this post
You are sitting in an interrupt routine waiting for an interrupt. That can't work as the second interrupt can't be serviced until the first one exits. Use flags in the interrupt routines and put the wait logic in the main program