Conveyor Tracking Operation (Vision Tracking)

Next, let's create a conveyor tracking operation using vision.

The robot uses Pick & Place to move a workpiece (part) detected by vision from the conveyor to the table.

Procedure overview

  1. Create a virtual controller and configure a robot
  2. Create a project
  3. Add an object corresponding to the workpiece (part)
  4. Add and configure an object corresponding to the table
  5. Add and configure a conveyor object
  6. Configure and verify the supply settings for the conveyor object
  7. Add and configure a virtual camera
  8. Add conveyor tracking settings
  9. Perform vision calibration
  10. Create a vision sequence
  11. Perform and configure conveyor calibration
  12. Check workpiece (part) detection
  13. Create and run a program

Procedure details

  1. Preparation

    1. Create a new virtual controller connection.
      In system configuration, set Robot 1 to "GX8-C652S" (name: robot1).

    2. Create a new project named "ConvTrack_Vision".

    3. Add a Box object (SBox_1) corresponding to the workpiece (part) transported by the conveyor, and configure it as follows.

      • Change it to any color.
      • Position setting (Position X, Y, Z): 550, 550, 25 (Move it to a location where it will not interfere with the work.)
    4. Add a table (Box object) where the workpiece (part) will be placed, and configure it as follows.

      • Object name (Name): Table
      • Size setting (Half size X, Y, Z): 40, 300, 50
      • Position setting (Position X, Y, Z): -550, 0, 50
    5. Add a conveyor object and configure it as follows.

      • Position setting (Position X, Y, Z): -400, 0, 100
      • Orientation setting (Rotation Z): 90
      • Size setting (Half size Height, Width): 500, 100
    6. Configure the supply settings for the workpiece (part).

      • Click the "Operation" - "Supply" property of the conveyor object added in the previous step.
      • In the displayed Supply Setting dialog box, select [Enable Supply].
      • Set [Base Object] to "SBox_1", which was added in the previous step.
      • Set both [Min] and [Max] under [Interval] to "3.000".
      • Set [Z] under [Offset] to "26.000".

    7. Add camera settings.

      1. In [Vision] under the Epson RC+ 8.0 menu - [Setup] - [System Configuration], add a virtual camera.

      2. Select [Virtual], select "acA640-120gm" as the model, and then click the [Apply] button.

      3. Configure the camera object as follows and place it above the conveyor object.

        • Position setting (Position X, Y, Z): -400, -400, 700
        • Orientation setting (Rotation X): 180

    8. Add a conveyor tracking configuration and configure it as follows.

      1. In the Epson RC+ 8.0 menu - [Setup] - [System Configuration], confirm that an encoder has been added under [Controller] - [Conveyor Encoder].

      2. In the Epson RC+ 8.0 menu - [Tools] - [Conveyor Tracking], add a conveyor tracking configuration.

      3. Select [Vision] for [Type].

      4. Configure the conveyor object as follows.

        • Set the "Operation" property to "LinkTracking".
        • Set the "Conveyor ID" property to "1".

    9. Perform vision calibration.
      Create and perform a calibration named "ConveyorCalib".
      After vision calibration is complete, move the CAD data used for calibration to a location where it will not interfere with the work.

      For details on camera calibration, refer to the following manual.

      "Epson RC+ Option Vision Guide Software - Vision Calibration - Calibration Procedures - Calibration Procedure: Standalone Camera"

    10. Create a vision sequence and follow the steps below to check whether the workpiece (part) is detected correctly.

      1. Using the Conveyor Operation Panel, move the conveyor object to transport one Box that serves as the workpiece.

      2. Stop the conveyor object at a position within the camera field of view.

      3. Create a sequence named "BoxDetection" to recognize this workpiece.

      4. Run the "BoxDetection" sequence and confirm that the workpiece (part) is recognized correctly.

      5. Set the "Calibration" property to the calibration "ConveyorCalib" created in the earlier step.

      6. After confirming that the workpiece (part) is detected correctly, delete the workpiece (part) from the conveyor for now.

        • Right-click the conveyor object and select [Delete All Children].

    11. Perform conveyor calibration.
      For details on conveyor calibration in the Simulator, refer to the following.

      Robot Object - "Conveyor calibration"

      Perform simple calibration by following the steps below.

      1. In the layout tree, expand the "Conveyor Tracking" node under the robot node.

      2. Right-click "Conveyor 1", and then click [Calibrate with the simulator].

      3. Set the "Visible" property for each of the "Conveyor Origin", "Upstream Limit", and "Downstream Limit" properties to "True".

      4. Confirm the display of the conveyor origin, upstream limit, and downstream limit.

    12. Configure double registration prevention.
      Open the Epson RC+ 8.0 menu - [Tools] - [Conveyor Tracking], and set the distance for preventing double registration of workpieces to "200mm".

  2. Create a program

    Software trigger

    Create the following program as Main.prg.
    This program performs conveyor tracking operation using the camera software trigger.

    Function main
       SimSet Conveyor_1.ClearSupply
    
       Motor On
       Power High
       Speed 100
       Accel 100, 100
    
       Cnv_Mode 1, 1
       Cnv_Accel 1, 2000
       Cnv_QueRemove 1, All
    
       Integer i
       String name$
    
       Xqt VisionDetection
    
       TmReset 0
       SimSet Conveyor_1.Start
    
       For i = 1 To 10
          Wait Cnv_QueLen(1, CNV_QUELEN_PICKUPAREA) > 0
          Wait 0.5
    
          Jump Cnv_QueGet(1, 0) +Z(51)
    
          SimGet robot1.NearestObjToTool(0), name$
          SimSet robot1.Pick, name$
    
          Jump Here :X(-550) :Y(i * 60 - 320)
          SimSet robot1.Place, name$, Table
    
          Cnv_QueRemove 1, 0
       Next
    
       SimSet Conveyor_1.Stop
       Quit VisionDetection
    
       Print "Finished, ", Tmr(0), "[s]"
    Fend
    
    Function VisionDetection
       Integer numFound, i, state
       Real x, y, u
       Boolean found
    
       Off 10
       Wait 0.5
       Do
          VRun BoxDetection
          Cnv_Trigger (1)
    
          VGet BoxDetection.Geom01.NumberFound, numFound
          Print "Num Found ", numFound
    
          For i = 1 To numFound
             VGet BoxDetection.Geom01.CameraXYU(i), found, x, y, u
             Cnv_QueAdd 1, Cnv_Point(1, x, y)
          Next
    
          Wait 1
       Loop
    Fend
    

    Hardware trigger

    Conveyor tracking using the virtual hardware trigger of the camera object is also possible.
    Configure the hardware trigger by following the steps below.

    1. Set the "Trigger IO" property of the camera object to "10".

    2. Set the "Operation" - "Trigger IO" property of the conveyor object to "10", the same value set in the previous step.

    3. Set the "RuntimeAcquire" property of the Vision Guide sequence "BoxDetection" to "Strobed".

    4. Modify the function "VisionDetection" in the program created above as follows.

      Function VisionDetection
          Integer numFound, i, state
          Real x, y, u
          Boolean found
      
          Off 10
          Wait 0.5
          Do
              VRun BoxDetection
              On 10
      
              Do
        	      VGet BoxDetection.AcquireState, state
              Loop Until state = 3
      
              VGet BoxDetection.Geom01.NumberFound, numFound
              Print "Num Found ", numFound
      
              For i = 1 To numFound
        	      VGet BoxDetection.Geom01.CameraXYU(i), found, x, y, u
        	      Cnv_QueAdd 1, Cnv_Point(1, x, y)
              Next
      
              Off 10
              Wait 0.5
          Loop
      Fend
      
  3. Run the program

    1. Click the [Run Window] button on the toolbar to display the Run window.

    2. Select the function "main", and then click the [Start] button.