omron — Subroutines

Subroutines from interrupting it. When a RETURN instruction is executed in the reaction program, the main program priority is automatically reset to the level it had before the reaction subroutine was called. For further information on reactions and program priority, see the following keywords: LOCK, PRIORITY, REACT, and REACTI in the eV+ Language Reference Guide . Error Trapping Normally, when an error occurs during execution of a program, the program is terminated and an error message is displayed on the system terminal.

However, if the REACTE instruction has been used to enable an error-trapping program, the eV+ system invokes that program as a subroutine instead of terminating the program that encountered the error. (Each program task can have its own error trap enabled.) Before invoking the error-trapping subroutine, eV+ locks out all other reactions by raising the main program priority to 254 (see Asynchronous Processing on page 32). See the description of the REACTE instruction in the eV+ Language Reference Guide for further information on error trapping. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 33