omron — RUNSIG program instruction

RUNSIG program instruction RUNSIG program instruction Syntax RUNSIG signal_num Function Turn on (or off) the specified digital signal as long as execution of the invoking program task continues. Usage Considerations Only one RUNSIG signal can be in effect for each program task. Parameter signal_num Optional real-valued expression that specifies one of the digital output signals (or an internal software signal) that is to be controlled. The signal is set to on during program execution if the value is positive. A negative value results in the signal being set to off during program execution, and turned on when execution stops.

If no signal is specified, any RUNSIG in effect for the task is canceled. Details This instruction causes the specified digital signal to be turned on (or off) as soon as the instruction is executed. The signal is turned off (or on) as soon as execution of the invoking program task stops (or the STOP instruction is executed). This instruction is useful in an application where auxiliary equipment must be stopped if an error occurs during program execution. Only one signal can be activated by a RUNSIG instruction at any one time (for each program task). An error condition results unless a program cancels the first RUNSIG before attempting to initiate a second.

If program execution is interrupted after a RUNSIG instruction has been executed, the specified signal returns to the selected state again if a PROCEED or RETRY command is issued. If an SSTEP or XSTEP command is issued, the signal returns to the specified state during execution of the instruction that is invoked. Similarly, processing of a DO command temporarily activates the RUNSIG signal for the corresponding program task. (The EXECUTE command and instruction cancel any previous RUNSIG for the specified program task.) eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 449