omron — REACT program instruction

REACT program instruction REACT program instruction Syntax REACT signal_num, program, priority Function Initiate continuous monitoring of a specified digital signal and automatically trigger a subroutine call if the signal properly transitions. Usage Considerations The REACT (and REACTI) instruction can be executed by any of the program tasks. That is, each task can have its own, independent reaction definition. Any of the first twelve external input signals (1001 to 1012) can be simultaneously monitored. Reactions are triggered by signal transitions and not levels.

Thus, if a signal is going to be monitored for a transition from off to on and the signal is already on when a REACT (or REACTI) instruction is executed, then the reaction does not occur until the signal goes off and then on again. A signal must remain stable for at least 18 milliseconds to assure detection of a transition. NOTE: If software signals are being used to trigger reactions, the WAIT instruction (with no argument) should be used as required to ensure that the signal state remains constant for the required time period. The requested signal monitoring is enabled as soon as a REACT (or REACTI) instruction is executed.

Because of the way eV+ processes program instructions, this can result in an effect on the motion initiated by the motion instruction preceding the REACT (or REACTI) instruction in the program. (See the section Motion Control Examples in the eV+ Language User's Guide for a discussion of robot motion processing.) Parameters signal_num Real-valued expression representing the signal to be monitored. The signal number must be in the range 1001 to 1012 (external input signals) or 2001 to 2008 (internal software signals).

(The software signals can thus be used by one program task to interrupt another task.) If the signal number is positive, eV+ looks for a transition from off to on; if signal_num is negative, eV+ looks for a transition from on to off. program Name of the subroutine that is to be called when the signal eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 417