Input monitoring while the program is running

I have IRC5. I want to monitor inputs and set output while the robot is running its program. How do I multitask? I have a PLC that I am utilizing. I also want the robot to stop when the light curtain is broken.

There is a system output for program executing. Read the system parameter manual for that. You must have the multitasking option in order to use multitasking. A light curtain ought to be wired into the panel board auto stop circuit. It is a dual channel circuit. You can probably find that in the manual for IRC5 electrical diagrams or something like that.