Quit Statement

Terminates execution of a specified task or all tasks.

Syntax
Quit { taskIdentifier | All }​

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
  • All: Specifies this parameter if all tasks except the background task should be terminated.

Description
Quit stops the tasks that are currently being executed, or that have been temporarily suspended with Halt.

Quit also stops the task when the specified task is NoPause task, NoEmgAbort task (special task using NoPause or NoEmgAbort at Xqt), or the background tasks. Quit All stops all tasks including the tasks above other than the background tasks.

Quit All sets the robot control parameter as below:

Robot Control parameter

  • Current robot Speed, SpeedR, SpeedS (Initialized to default values)
  • Accel, AccelR, AccelS: Default values
  • Current robot QPDecelR , QPDecelS (Initialized to default values)
  • Current robot LimZ parameter (Initialized to 0)
  • Current robot CP parameter (Initialized to Off)
  • Current robot SoftCP parameter (Initialized to Off)
  • Current robot Fine (Initialized to default values)
  • Current robot Power Low (Low Power Mode set to On)
  • Current robot PTPBoost (Initialized to default values)
  • Current robot TCLim, TCSpeed (Initialized to default values)
  • Current robot PgLSpeed (Initialized to default values)

See Also
Exit, Halt, Resume, Xqt

Quit Statement Example
This example shows two tasks that are terminated after 10 seconds.

Function main
  Xqt winc1   'Start winc1 function
  Xqt winc2   'Start winc2 function
  Wait 10
  Quit winc1  'Terminate task winc1
  Quit winc2  'Terminate task winc2
Fend

Function winc1
  Do
     On 1; Wait 0.2
     Off 1; Wait 0.2
  Loop
Fend

Function winc2
  Do
     On 2; Wait 0.5
     Off 2; Wait 0.5
  Loop
Fend