Halt Statement

Temporarily suspends execution of a specified task.

Syntax
Halt taskIdentifier

Parameters

taskIdentifier
Specify the task name or task number as an integer value or an expression.
A task name is the function name used in an Xqt statement or a function started from the Run window or Operator window.
Task number (integer) range is as follows:

  • Normal task: 1 to 32
  • Background tasks: 65 to 80
  • Trap tasks: 257 to 267

Description
Halt temporarily suspends the task being executed as specified by the task name or number.

To continue the task where it was left off, use Resume. To stop execution of the task completely, use Quit. To display the task status, click the Task Manager Icon on the Epson RC+ Toolbar to run the Task manager.

Halt also stops the task when the specified task is NoPause task, NoEmgAbort task (special task using NoPause or NoEmgAbort at Xqt), trap tasks, or the background tasks. However, stopping these tasks needs enough consideration. Normally, Halt is not recommended for the special task.

See Also
Quit, Resume, Xqt

Halt Statement Example
The example below shows a function named “flicker” that is started by Xqt, then is temporarily stopped by Halt and continued again by Resume.

Function main
  Xqt flicker        'Execute flicker function

  Do
    Wait 3           'Execute task flicker for 3 seconds
    Halt flicker

    Wait 3           'Halt task flicker for 3 seconds
    Resume flicker

  Loop
Fend

Function flicker
  Do
    On 1
    Wait 0.2
    Off 1
    Wait 0.2
  Loop
Fend