VGetRobotToolXYU Method
Description
Retrieves robot world X, Y, and U values for tool definition.
Syntax
Sub VGetRobotToolXYU (Sequence As String, Object As String, Result As Integer, ByRef Found As Boolean, ByRef X As Single, ByRef Y As Single, ByRef U As Single)
Parameters
- Sequence
A string expression indicating the vision sequence name for the current project. - Object
A string expression indicating the object name for the sequence. - Result
An integer expression indicating the result number. - Found
An integer variable indicating the Boolean found status. If found is false, then X, Y, and U are undefined. - X
A real number variable indicating the X coordinate in millimeters. - Y
A real number variable indicating the Y coordinate in millimeters. - U
A real number variable indicating the angle in degrees.
Remarks
Use VGetRobotToolXYU to easily define a tool for a part viewed by an upward camera. This allows you to pick up a part, search for it in the upward camera FOV, define a tool for the part, then place the part.
See Also
VGetCameraXYU Method, VGetPixelXYU Method, VGetRobotXYU Method
VGetRobotToolXYU Example
VB Example:
Dim found As Integer
Dim x As Single, y As Single, u As Single
Dim seq As String, blob As String
seq = "testSeq"
blob = "blob01"
' Move part above upward camera
m_spel.Jump("camPos")
m_spel.VRun(seq)
m_spel.VGetRobotToolXYU(seq, blob, 1, found, x, y, u)
m_spel.TLSet(1, x, y, u)
C# Example:
bool fnd;
float x, y, u;
string seq, blob;
seq = "testSeq";
blob = "blob01";
// Move part above upward camera
m_spel.Jump("camPos");
m_spel.VRun(seq);
m_spel.VGetRobotToolXYU(seq, blob, 1, out fnd, out x, out y, out u);
m_spel.TLSet(1, x, y, u);