omron — REACTE program instruction

REACTE program instruction REACTE program instruction Syntax REACTE program_name Function Initiate the monitoring of errors that occur during execution of the current program task. Usage Considerations The main purpose for the REACTE instruction is to allow for an orderly shutdown of the system if an unexpected error occurs. If a robot hardware error occurs, for example, a REACTE program can set external output signal lines to shut down external equipment. Using the REACTE instruction for other purposes requires extreme caution. The REACTE instruction can be executed by any of the program tasks. That is, each task can have its own, independent REACTE definition.

(A task cannot directly trap errors caused by another task, but tasks can signal each other via global variables or software signals.) The ERROR real-valued function must be called before a REACTE with no program name, since the REACTE clears the previous errors See the list below for other considerations. Parameter program_name Optional name of the program that is to be called when a program error occurs. If no program is specified, the previous REACTE is canceled, and any pending error message is discarded. Details If an error occurs after a REACTE instruction has been executed, the specified program is invoked, rather than stopping normal program execution.

(The program is invoked as though by the CALL program instruction.) The ERROR real-valued function can be used within the error-handling program to determine what error caused the program to be invoked. There are several special considerations that must be kept in mind when using this facility: l The program priority is raised to 254 when the error-handling program is invoked, locking out all reaction programs. l Execution of the program task stops if an error occurs while the system is processing a previous error. l There must be room on the user program stack for one more subroutine. Therefore, eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 420