Xqt Method

Description
Start one SPEL+ task.

Syntax
Sub Xqt (FuncName As String [, TaskType As SpelTaskType])
Sub Xqt (TaskNumber As Integer, FuncName As String [, TaskType As SpelTaskType])

Parameters

  • TaskNumber
    Task number of the task to run (1 to 32)
  • FuncName
    The name of the function to be executed. It is possible to pass arguments to the function. Arguments must be in parenthesis, separated by commas. For details, see the SPEL+ - Xqt Statement and see the example.
  • TaskType
    Optional. Specifies the task type as Normal, NoPause, or NoEmgAbort.

Remarks
When Xqt is executed, control will return immediately to the calling program. Use the Call method to wait for a task to complete, or you can use EventReceived with the task state event to wait for a task to finish.

See Also
Call Method, EnableEvent Method, EventReceived Event

Xqt Example
VB Example:

m_spel.Xqt(2, "conveyor")  
  
' Supply an argument to the RunPart function  
m_spel.Xqt(3, "RunPart(3)")  
  
Dim funcToExec As String  
funcToExec = "RunPart(" & partNum & ")"  
m_spel.Xqt(3, funcCall)  

C# Example:

m_spel.Xqt(2, "conveyor");  
  
// Supply an argument to the RunPart function  
m_spel.Xqt(3, "RunPart(3)");  
  
string funcToExec;  
funcToExec = string.Format("RunPart({0})", partNum);  
m_spel.Xqt(3, funcToExec);