VDefLocal Method

Description
Detects a calibration plate placed on a work plane by a mobile camera, and defines local coordinates parallel to the work plane.
It also detects user’s workpiece at the tool end by a fixed camera and defines a local plane which is parallel to a fixed camera sensor.
Note: Robot operates automatically based on the detection results of the target. Be careful of interference between the robot and peripherals. Also, use with avoiding singularity nearby posture that each axis extends to prevent an error during the local coordinate setting.

Syntax
Sub VDefLocal(LocalNumber As Integer, LocalDefType As SpelLocalDefType, CalPlateType As SpelCalPlateType, Sequence As String, TargetTolerance As Double, CameraTool As Integer, RefPoint As SpelPoint)
Sub VDefLocal(LocalNumber As Integer, LocalDefType As SpelLocalDefType, CalPlateType As SpelCalPlateType, Sequence As String, TargetTolerance As Double, CameraTool As Integer, RefPoint As SpelPoint, Parent As Form)
Sub VDefLocal(LocalNumber As Integer, LocalDefType As SpelLocalDefType, CalPlateType As SpelCalPlateType, Sequence As String, TargetTolerance As Double, CameraTool As Integer, RefPoint As SpelPoint, RobotSpeed As Integer, RobotAccel As Integer)
Sub VDefLocal(LocalNumber As Integer, LocalDefType As SpelLocalDefType, CalPlateType As SpelCalPlateType, Sequence As String, TargetTolerance As Double, CameraTool As Integer, RefPoint As SpelPoint, RobotSpeed As Integer, RobotAccel As Integer, Parent As Form)

Parameters

  • LocalNumber
    An integer indicating the tool number to set the local coordinates for (1 to 15).
  • LocalDefType
    An integer indicating the local type.
  • J5Camera:
    Sets the local coordinates parallel to the calibration plate using the mobile J5 camera.
  • J6Camera:
    Sets the local coordinates parallel to the calibration plate using the mobile J6 camera.
  • FixedUpwardCamera:
    Sets the local coordinates parallel to the image sensor using a fixed upward-facing camera.
  • FixedDownwardCamera:
    Sets the local coordinates parallel to the image sensor using a fixed downward-facing camera.
  • CalPlateType
    An integer indicating the calibration plate type.
  • Large:
    Large calibration plate
  • Medium:
    Medium calibration plate
  • Small:
    Small calibration plate
  • XSmall:
    Extra small calibration plate
  • Sequence
    A string expression indicating the vision sequence name for the current project.
    When using the mobile camera, this is a vision sequence to take a picture of the calibration plate.
    When using the fixed camera, this is a vision sequence to detect a feature point at tool end, such as user’s workpiece.
  • TargetTolerance
    A real number indicating the threshold for determining the scale match.
  • CameraTool
    In the case of a fixed camera, this specifies the tool number that holds a tool offset of the detection target. To perform auto calibration, specify -1.
    Mobile J6 camera: If auto calibration has been executed, specify a tool number of mobile camera. To perform auto calibration, specify -1.
    Mobile J5 camera: Setting of this option is ignored.
  • RefPoint Point number which a local plane parallel to a work plane passes.
    This point is used to specify local plane height.
  • Parent
    Optional. A .NET form that is the parent of the window.
  • RobotSpeed
    Optional. Integer variable indicating the robot speed (%). Value range: 0 to 100 If omitted, set to “5”.
  • RobotAccel
    Optional. Integer variable indicating the robot acceleration (%). Value range: 0 to 99 If omitted, set to “5”.

See Also
VDefArm Method, VDefGetMotionRange Method, VDefSetMotionRange Method, VDefTool Method, VGoCenter Method

VDefLocal Example
VB Example:

Dim p2 = m_spel.GetPoint("P2")  
m_spel.VDefLocal(1, SpelLocalDefType.J6Camera, SpelCalPlateType.Large, "myseq", 1.0, 1, p2)  

C# Example:

SpelPoint p2;  
p2 = m_spel.GetPoint("P2");  
m_spel.VDefLocal(1, SpelLocalDefType.J6Camera,  
SpelCalPlateType.Large, "myseq", 1.0, 1, p2);