Hi,
I have a program that declares an interrupt which uses a timer flag event.
When i select and run my main program, from which i make a call to my subprogram (the interrupt program) to turn on the interrupt and start the timer, the interrupt is called without issue until i release the start button (stops the main program). If i try to press the start button again to continue with the main program the interrupt is not called again.
Any ideas?
Main:
Subprogram:
Code
DEF Workzone_Interrupt( )
GLOBAL INTERRUPT DECL 1 WHEN $TIMER_FLAG[20]==TRUE DO GetPOSACT ( )
INTERRUPT OFF 1
$TIMER_STOP[20]=TRUE
iInterval=-15
$TIMER[20]=iInterval
INTERRUPT ON 1
$TIMER_STOP[20]=FALSE
END
GLOBAL DEF GetPOSACT ()
$TIMER_STOP[20]=TRUE
$TIMER[20]=iInterval
;... Do Stuff ...
WAIT FOR TRUE
$TIMER_STOP[20]=FALSE
END
Display More