VRun Method

Description
Run a vision sequence in the current project.

Syntax
Sub VRun (Sequence As String)

Parameters

  • Sequence
    A character string indicating the sequence name in the current project.

Remarks
VRun works with sequences using any type of camera calibration or no calibration.
To display graphics, you need to use a SPELVideo control and set the SpelVideoControl property of the Spel class instance to the SPELVideo control.
After you execute VRun, use VGet to retrieve results.

See Also
VGet Method, VSet Method

VRun Example
VB Example:

Function FindPart(x As Single, y As Single, angle As Single)As Boolean  
  Dim found As Boolean  
  Dim x, y, angle As Single  
  With m_spel  
    .VRun("seq01")  
    .VGet("seq01", "corr01", "found", found)  
    If found Then  
      .VGet("seq01", "corr01", "cameraX", x)  
      .VGet("seq01", "corr01", "cameraY", y)  
      .VGet("seq01", "corr01", "angle", angle)  
      FindPart = True  
    End If  
  End With  
End Function  

C# Example:

bool FindPart(float x, float y, float angle)  
{  
  bool found;  
  m_spel.VRun("seq01");  
  m_spel.VGet("seq01", "corr01", "found", found);  
  if (found) {  
        m_spel.VGet("seq01", "corr01", "cameraX", out x);  
       m_spel.VGet("seq01", "corr01", "cameraY", out y);  
        m_spel.VGet("seq01", "corr01", "angle", out angle);  
}  
return found;  
}