Xqt Statement
Initiates execution of a task from within another task.
Syntax
Xqt [taskNumber,] funcName [(argList)] [, Normal | NoPause | NoEmgAbort ]
Parameters
- taskNumber
- Optional. The task number for the task to be executed. The range of the task number is 1 to 32. For background tasks, specifies integer value from 65 to 80.
- funcName
- Specify the name of the function to be executed.
- argList
- Specifies a list of arguments passed to the function when it is called. Multiple arguments are separated by commas.
- Task type
- This value is optional. Usually omitted. For background tasks, specifying a task type means nothing.
- Normal
- Generates a normal task.
- NoPause
- Specify this task type when a Pause statement or a Pause input signal is generated, and when a task which does not pause with the safeguard open is generated.
- NoEmgAbort
- Specify this task type if you want to generate a task that continues processing in the event of an emergency stop or an error.
Description
Xqt starts the specified function and returns immediately.
Normally, the taskNumber parameter is not required. When taskNumber is omitted, SPEL+ automatically assigns a task number to the function, so you don't have to keep track of which task numbers are in use.
Notes
Task Type
Specify NoPause or NoEmgAbort as a task type to execute a task that monitors the whole controller.
However, be sure to use these special tasks based on the understanding of the task motion using SPEL+ or restriction of special tasks.
For details of special tasks, refer to the following manual.
"Epson RC+ User’s Guide - Special Tasks"Background task
When executing Xqt in a background task, the generated task is also the background task.
To execute the main function from a background task, use the StartMain statement.
The details of the background task is explained in the following manual:
"Epson RC+ User’s Guide - Special Tasks"
Unavailable Commands in NoEmgAbort Task and background task
The following commands cannot be executed in NoEmgAbort task and background task.
A | Accel |
AccelR | |
AccelS | |
AIO_TrackingStart | |
AIO_TrackingEnd | |
Arc | |
Arc3 Statement | |
Arch | |
Arm | |
ArmCalib | |
ArmCalibCLR | |
ArmCalibSET | |
ArmClr | |
ArmSet | |
AutoLJM | |
AutoOrientationFlag | |
AvoidSingularity | |
B | Base |
BGo | |
BMove | |
Box | |
BoxClr | |
Brake | |
C | Calib |
Cnv_AbortTrack | |
Cnv_Accel | |
Cnv_AccelLim | |
Cnv_Adjust | |
Cnv_AdjustClear | |
Cnv_AdjustGet | |
Cnv_AdjustSet | |
Cnv_DownStream | |
Cnv_Fine | |
Cnv_Mode | |
Cnv_OffsetAngle | |
Cnv_QueAdd | |
Cnv_QueMove | |
Cnv_QueReject | |
Cnv_QueRemove | |
Cnv_QueUserData | |
Cnv_Trigger | |
Cnv_UpStream | |
CollisionDetect | |
CP | |
CP_Offset | |
Curve | |
CVMove | |
E | ECP |
ECPClr | |
ECPSet | |
F | Find |
Fine | |
FineDist | |
Force_Calibrate | |
Force_ClearTrigger | |
Force_Sensor | |
Force_SetTrigger | |
G | Go |
H | Hand_On |
Hand_Off | |
Home | |
HomeClr | |
HomeSet | |
Hordr | |
I | Inertia |
J | JTran |
Jump | |
Jump3 | |
Jump3CP | |
JRange | |
L | LatchEnable |
LimitTorque | |
LimZ | |
LimZMargin | |
Local | |
LocalClr | |
M | MCal |
MCordr | |
Motor | |
Move | |
O | OLAccel |
P | Pass |
PerformMode | |
Pg_LSpeed | |
Pg_Scan | |
Plane | |
PlaneClr | |
Power | |
PTPBoost | |
Pulse | |
Q | QP |
QPDecelR | |
QPDecelS | |
R | Range |
Reset *1 | |
Restart *2 | |
S | Sense |
SetLatch | |
SFree | |
SingularityAngle | |
SingularityDist | |
SingularitySpeed | |
SLock | |
SoftCP | |
Speed | |
SpeedFactor | |
SpeedR | |
SpeedS | |
SyncRobots | |
T | TC |
TGo | |
Till | |
TLSet | |
TLClr | |
TMove | |
Tool | |
Trap | |
V | VCal |
VcalPoints | |
VCls | |
VCreateCalibration | |
VCreateObject | |
VCreateSequence | |
VDefArm | |
VDefGetMotionRange | |
VDefLocal | |
VDefSetMotionRange | |
VDefTool | |
VDeleteCalibration | |
VDeleteObject | |
VDeleteSeuence | |
VEditWindow | |
VGet | |
VGoCenter | |
VLoad | |
VLoadModel | |
VRun | |
VSave | |
VSaveImage | |
VSaveModel | |
VSet | |
VShowModel | |
VStatsShow | |
VStatsReset | |
VStatsResetAll | |
VStatsSave | |
VSD | |
VTeach | |
VTrain | |
W | WaitPos |
Weight | |
WorkQue_Add | |
WorkQue_Reject | |
WorkQue_Remove | |
WorkQue_Sort | |
WorkQue_UserData | |
X | Xqt *3 |
XYLim |
- *1 Reset Error can be executed
- *2 Executable from the Trap Error processing task
- *3 Executable from the background tasks
DO NOT use XQT command repeatedly in Loop statements. Do not use XQT command repeatedly in Loop statements such as Do…Loop. The controller may freeze up. If you use Loop statements repeatedly, make sure to add Wait command (Wait 0.1).
See Also
Function/Fend, Halt, Resume, Quit, Startmain, Trap
Xqt Statement Example
Function main
Xqt flash 'Start flash function as task 2
Xqt Cycle(5) 'Start Cycle function as task 3
Do
Wait 3 'Execute task 2 for 3 seconds
Halt flash 'Suspend the task
Wait 3
Resume flash 'Resume the task
Loop
Fend
Function Cycle(count As Integer)
Integer i
For i = 1 To count
Jump pick
On vac
Wait .2
Jump place
Off vac
Wait .2
Next i
Fend
Function flash
Do
On 1
Wait 0.2
Off 1
Wait 0.2
Loop
Fend