CYCLE.END program instruction CYCLE.END program instruction Syntax CYCLE.END task_num, stop_flag Function Terminate the executing program in the specified task the next time it executes a STOP program instruction (or its equivalent). Suspend processing of an executable program until a program running in the specified task completes execution. Usage Considerations The CYCLE.END instruction has no effect if the specified program task is not active. The CYCLE.END instruction suspends execution of the program containing the instruction until the specified program task completes execution.
If a program is aborted while its execution is suspended by a CYCLE.END instruction, the program task specified by the CYCLE.END instruction will still be terminated (if the stop_flag is TRUE). Parameters task_num Optional real value, variable, or expression (interpreted as an integer) that specifies which program task is to be monitored or terminated. If the task number is not specified, the CYCLE.END instruction always accesses task #0. stop_flag Optional real value, variable, or expression interpreted as a logical (TRUE or FALSE) value. If the parameter is omitted or has the value 0, the specified task is not stopped-but the CYCLE.END has all its other effects (see below).
If the parameter has a nonzero value, the selected task stops at the end of its current cycle. Details If the stop_flag parameter has a TRUE value, the specified program task will terminate the next time it executes a STOP program instruction (or its equivalent), regardless of how many program cycles are left to be executed. NOTE: CYCLE.END will not terminate a program with continuous internal loops. Such a program must be terminated with the ABORT command or instruction. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 142