So, time for the next thing I need help with.
I have been handed a hardware configuration with a heater controlled by a DO, and a temperature sensor feeding a DI. The robot needs to play the part of a thermostat, regardless of what the robot's status is.
The complicating factor is that I need to do an AND function -- I need to enable/disable the heater based on a Flag, so my BG program was basically:
DO[1] = DI[1] AND F[1]
Which worked fine, right up until I halted the BG program to do some work on a different section of it, while the DO was On. And stayed on, until the heater eventually blew a fuse.
I thought I could fix this by using a PULSE on the DO instead of a simple output assignment, but even if I do a simple DO=PULSE 1.0Sec command in a BG program, the DO never turns on.
I could perhaps use a Marker, but I would need to connect the Marker to something (system variable?) that would be tied to the run/halt state of the BG program.
I know how I could fix this easily in other brands, but I'm wondering what the best solution is on a Fanuc.