Is there a way to monitor if a background program is on? Right now I am turning on a flag if on, but nothing that turns it back off except an initial program.
I feel like there may be a system variable for this that I'm not seeing?
Is there a way to monitor if a background program is on? Right now I am turning on a flag if on, but nothing that turns it back off except an initial program.
I feel like there may be a system variable for this that I'm not seeing?
Not sure if there is or is not a system variable, but you could always fake a hearbeat signal. Add a couple of lines to your BG program that if FLAG[1] is ON, turn it OFF, and if FLAG[1] is OFF turn it ON. If your cycle time is too fast to catch the pulse, you can work in timers or counts or waits to drag it out a little, or to give better than binary resolution of the status (for example, count a register up to 10,000, then reset to 0. If you see the value changing, your program is running)
$MIX_BG[n].$STATUS
[n] is the program # of the Background Logic list. Read only, cannot be stopped/started from a TP program.
1 = Stopped
2 = Running (Normal)
3 = Running (Fast)
4 = Error