Skip to main content

Place First Green Disk

Now that the [If then else] block has been added to the project to determine if a green disk has been placed, the blocks need to be added to move the green disk to the Transport Conveyor, stop in front of the Pickup Sensor, and use the arm mounted on the VEX V5 Workcell to pick up and place the disk to the drop off location.

Green Sorted

To begin, the Diverter needs to be set in order for the green disk to pass through and stop at the Pickup Sensor.

Path and Sensor
  1. Add a [Spin to position] block to the ‘If first green disk, set Diverter to allow the disk to pass, stop at Pickup Sensor’ [Comment] block. Set the motor to ‘DiverterMotor’ and set the parameter to ‘0’ degrees.
    step 33
  2. Add a [Wait until] block to the [Spin to position] block. Set the parameter of the [Wait until] block with a <Greater than> block and a (Reflectivity of) block.
    step 34
  3. Set the sensor of the (Reflectivity of) block to ‘Pickup’ and set the parameter of the <Greater than> block to ‘35.’
    step 35
  4. Add a [Stop motor] block to the [Wait until] block. Set the motor to ‘TransportMotor.’
    step 36
  5. Once the green disk has stopped in front of the Pickup Sensor, the arm mounted on the V5 Workcell must pick up and place it to a known drop off location. Add the following blocks to the ‘Use V5 Workcell to place green disk at drop off location’ [Comment] block to pick up and place the green disk. Use the green disk drop off location values from previous Labs.
    step 37

    Note: the (x, y, z) coordinate values for the green disk drop off location has been determined in previous labs. However, the (x, y, z) values can be determined again using the ‘Display Position’ example project.

  6. Once the green disk has been placed, add a [Set Boolean variable] block to the ‘Track green disk as placed’ [Comment] block, and change the parameter to ‘true.’
    step 38
  7. Load a green disk into the Disk Feeder.
    Green Feeder

    Note: manually move the Diverter back to the starting position if it is not there already.
     

  8. Download and run the project.
    step 40
  9. Observe the green disk move on to the Transport Conveyor, stop in front of the Pickup Sensor, and be placed into the drop off location by the arm mounted on the V5 Workcell.
    Green Sorted
  10. Stop the project.
    step 42