Abb | Multitasking

MODULE BackgroundMonitor VAR bool emergency_flag; PROC main() WHILE TRUE DO emergency_flag := DI_EMERGENCY; IF emergency_flag THEN StopAllMotion; ENDIF WaitTime 0.05; ! 50ms cycle ENDWHILE ENDPROC ENDMODULE

| Task Type | Description | Typical Use | |-----------|-------------|--------------| | | Standard motion + logic | Main robot movement program | | Static Task | Always running in background (no start/stop) | Safety monitoring, global state handling | | Semistatic Task | Can be started/stopped but not deleted | Secondary motionless logic | abb multitasking

Both tasks run simultaneously. If the emergency input triggers, Task 2 stops all motion without interfering with Task 1’s program flow except through the shared StopAllMotion call. Tasks often need to exchange data or avoid conflicts. ABB provides several mechanisms: MODULE BackgroundMonitor VAR bool emergency_flag