MANE4280U-Lab 4-Group 1
MANE4280U-Lab 4-Group 1
MANE4280U-Lab 4-Group 1
Abstract 2
Discussion of the Program 3
Results 4
Discussion of Results 6
Sources of Error and Problems Encountered 7
Conclusion 7
References 8
Appendix 8
1
Abstract
In this laboratory session, the team was tasked to perform conveyor servicing with the
help of a vision system in collaboration with an EPSON Pro Six PS3. The team had to learn how
to calibrate the vision system to use in collaboration with the EPSON Pro Six PS3. The
calibration process involved setting up the camera, making a calibration plate, producing a vision
sequence to detect calibration reference targets and creating a calibration scheme. After teaching
the system the reference points, the calibration cycle was initiated and the system located the
target points. This step was repeated to certify successful calibration. A program was drafted to
execute the conveyor service operation. The goal was to draft a program that will command the
robot to pick up four soccer ball discs randomly located on the conveyor and place them in the
desired location. The vision system helped to locate the discs on the conveyor belt for the robot
to pick up. Similar to lab 2, the program included instructions for the conveyor to move the discs
to the pick-up area, while the robot performs the load/unload task. The motion of the conveyor
belt was controlled using an IR sensor. When the IR sensor detects an object, it sends a signal to
the conveyor to turn off the belt. This operation was repeated until all four discs were placed in
the desired position.
Introduction
The purpose of this lab is to service a conveyor by using a vision system in tandem with
the EPSON ProSix PS3. The team will need to learn how to calibrate the vision system to use it
with the EPSON ProSix PS3. Calibration enables parts to be found in the robot's world
coordinate system or physical measurements to be taken. Vision systems are very significant in
robotics and automation applications. They may be used for a range of activities, including part
inspection and identification. The calibrated system will be implemented to enable the robot to
pick up objects discovered on the conveyor using the vision system. The objects will be
positioned and oriented at random on the conveyor. The EPSON ProSix PS3 will be programmed
to unload a succession of objects from a conveyor and arrange them in the desired area. The
conveyor will be controlled by the robot controller I/O as well as an IR sensor that will be
utilized to turn the conveyor on and off. The conveyor will be configured to index each new
2
object into position so that the robot may unload and arrange them off the conveyor. The vision
system will be applied to identify the location and orientation of the conveyor's objects. The
team will learn how to use the vision system in conjunction with the robot and other automation
equipment and sensors as part of this laboratory project.
The requirement of this lab was to generate code for the Epson ProSix PS3 to
successfully pick up four soccer ball discs from the conveyor system, and place them at a
destination in a line 50mm apart from one another (as shown in Figure 1).
It was required to manually teach the Epson ProSix PS3 point P1 which is the drop off
location of the first disc. The remaining 3 discs will have a 50mm offset between each other.
3
Additionally, the conveyor belt uses the IR sensor to detect when a disc reaches the
pickup window and will automatically shut the conveyor off when the disc is detected. The discs
were to be placed on the conveyor belt in random locations and orientations. With the use of the
vision camera, it detected the exact locations and orientations of the discs within the pickup
window for the robot to successfully pick up the discs, no matter where it was within that
window.
Results
After taking into account the requirements of the program, the code was generated [Appendix 1].
Line 1 indicates the beginning of the program. Lines 2 through 4 are required at the
beginning of the code because it is defining and initializing important parameters to the Epson
ProSix. Line 2 resets the robot, line 3 initializes the robot, and line 4 sets the robots motors to
low power. It was required to run the robot on low power so that the movements of the robot
were slower to reduce the chances of unforeseen crashing/ damages.
Line 5 executes a task simultaneously to allow for multitasking. In this case, the conveyor
belt function is set to run simultaneously to the Epson ProSix robot. On line 6, Pulse 0,0,0,0,0,0
moves the robot to its home position, which zeros its coordinates of orientation. Line 7 instructs
the robot to move to P0. In line 8, disco is being defined as an integer, which means the index
will be only a whole number and not a fraction or decimal. Line 9 defines the real variables used
for the conveyor pickup window and can be broken down as follows;
● x: Defines the real variable represented in the x coordinate of the disc.
● y: Defines the real variable represented in the y coordinate of the disc.
● u: Defines the real variable representing the angular position of the disc.
● found: is a boolean variable that represents whether the disc was found by vision
camera within the pickup window
Line 10 defines the height that the end effector should be in when picking up the discs
from the conveyor. Line 11 is required to ensure the robot's gripper is in the open position. The
0.5 represents the time the pneumatic will operate for. In this case the pneumatic stays on for 0.5
seconds.
4
Line 12 is the beginning of a for loop. A For loop executes one or more statements for a
specific count [spel+ manual]. In this case the specific count is disco which is being set from 1
through 4 because there are 4 discs to pickup and place. Line 13 signifies the IR sensor to wait
until a disc is found by the vision camera, or when line 14 is satisfied. When a disc is found
within the pickup window via the vision camera, found is set to false. Once found is false, the
code proceeds to the while loop in line 15. Line 15 begins a while loop only if found is false.
Line 16 runs the vision sequence created when calibrating the vision camera to find the discs
within the pickup window. Once a disc is located within the pickup window line 17 is executed
which gets the x and y coordinates along with the angular position, u, of each disc. Line 18 ends
the while loop once the location and orientation of the disc is found by the vision camera. Line
19 tells the robot to go and position itself according to the disc within the pickup window, but
50mm above the disc. This is to ensure the robot does not hit the conveyor system. At line 20 the
robot's end effector is ready to pick up the disc. Line 21 closes the gripper and engages the
pneumatic system for 0.5 seconds. Once the gripper is closed, the robot is ready to drop off the
disc. Line 22 is a jump 3 statement which instructs the robot to go to the drop off location and
can be broken up as follows;
● Jump3: Jump 3 executes the approaching, departing, and destination of the robotic arm
when moving to pick up the package from the conveyor belt. It consists of three specific
coordinates for the robot to move to
● P* +Z(50): This is the first coordinate point in the Jump3 statement. P* is defining a
parameter at a point and +Z(50) is telling the Epson ProSix to raise 50mm in the
z-direction. A 50 mm height is to ensure that the robot clears the obstruction of the
conveyor belt so that it does not crash into it while moving to the drop off location.
● P1 +Z(150)+X(disco * 50): This is the second coordinate point in the Jump3 statement. It
is calling on the robot to position to the drop off location, P4. The +Z(150) is stating that
the Epson ProSix will be 150 mm above the drop off location. The +X(disco * 50) is the
offset to place the discs in the x direction. For example, if disco is 1 then X=1x50 =
50mm. If dropping off the third disc then disco is 3 then X=3x50 = 150mm offset.
● P1 +X(disco * 50): This is the third coordinate point in the Jump3 statement. At this
point the end effector of the Epson ProSix is at the exact position it needs to be to drop
off the disc.
5
Line 23 opens the gripper for 0.5 seconds and the disc is officially placed in its location.
Line 24 loops the code back to line 12 for the next disco which will be the next disc. This section
of the code will keep looping until disco equals 4 (the 4th disc).
Lines 26-29 will only occur at the end of the For loop when disco equals 4 (after the 4th
disc is placed at the drop off location). Line 26 quits the conveyor belt function and goes in hand
with line 27, which stops operation of the conveyor belt. Line 28 calls the robot to go to a point,
which is to move 50 mm in the Z direction. Line 29 does the same operation as line 6, which
brings the robot to its home position and zeros its orientation. Line 30 indicates the end of the
function.
Similar to lab 2, lines 31-38 defines the conveyor belt function with the IR sensor. Line
31 is defining the conveyor belt as a function. Line 32 begins a while loop if the following
conditions are true. Line 33 is an if statement and is checking the status of the IR sensor. The IR
sensor produces a value of 0 (false) or 1(true). If the IR sensor equals 1, then the code runs to
line 34, which turns off the conveyor belt. Line 35 is an else statement, which goes in hand with
line 36 and indicates to turn on the conveyor belt if the IR sensor in line 33 is producing a status
of 0. Line 37 ends the if statement, which is the code from lines 33-36. Line 38 ends the while
loop when the conditions are satisfied and returns to the beginning of the while loop. Line 39
indicates the end of the function.
Discussion of Results
To begin, the vision camera was calibrated for a fixed downward calibration. Refer to the
appendix for the document of the steps taken to calibrate the vision system. Once completed,
point P1 was taught to the Epson Pro Six, which would be the drop off location. Next, the height
at which the end effector would be at was found by manually moving the robot to the pickup
window where it would pick up a disc from the conveyor. Next OpenGripper, CloseGripper and
the conveyor belt were set as outputs in the I/O editor, while the IR sensor was set up as an input.
The soccer ball discs were then placed on the conveyor belt at random locations and orientations.
The code was uploaded to the RC+ Robot Controller and the Epson ProSix was performing the
6
task. It successfully picked up each disc off of the conveyor belt with randomized locations and
orientations. This indicated that the vision system was successfully working, providing the robot
with the real coordinates of each disc that made its way to the pickup window. While the robot
was dropping off each disc, the conveyor belt and vision system worked simultaneously. This
means that as the robot was dropping off each disc, the conveyor belt was preparing the pickup
of the next disc at the same time. This was successfully repeated for all 4 discs, and each disc
was successfully spaced 50mm apart from one another at the drop off location.
The team had to make minor tweaks to the code that was developed for the pre lab. For
example, a jump3 statement was eliminated as it was not needed when picking up the discs from
the conveyor. Another adjustment made was instead of creating a pallet and matrix system for
the drop off locations, it was much simpler to create an offset in the x-direction for each disc.
The teams encountered no problems or sources of errors while performing the lab activity.
Conclusion
To summarize the goal of this laboratory, the team had to use the vision system feature to
identify four discs on the conveyor that were placed at different points along the conveyor. A
program is then written to perform conveyor service. Before running the program, the vision
system had to be calibrated (the procedure can be seen in the Appendix) and the Z value that will
determine the height from which the robot will pick up components from the conveyor will be
declared manually because the camera only tracks x and y displacement. The program initially
pauses the IR sensor function until the camera locates the first object. Once the object is located,
the robot is commanded to move +50mm on the z-axis, above the object on the conveyor. Then it
will drop down to the object, close the gripper, and return it to the drop-off, where it will stack
along the x-axis. While the robot operates the pick/place task, the IR sensor function is initiated
and signals the conveyor to move the rest of the discs along the belt. The team was able to
complete the requirements of the lab without encountering any issues. The team was able to alter
the prelab code to ensure the operation performed smoothly during the lab. One of the alterations
included creating an increment counter that increases the x variable by 50mm each time for
7
placement of the discs after pick up. The team learned from this lab the significance of
implementing a calibrated vision system to perform conveyor servicing. The vision system
allows the robot to locate and pick up discs at a higher success rate even if the discs are placed at
random positions along the conveyor belt.
References
[2] Nokleby S., (2006. Laboratory Project 2: Conveyor Servicing Using the Epson ProSix PS3.
Oshawa; Ontario Tech University.
[3] EPSON, (2005, June 1st. EPSON SPEL+ Language Reference. Oshawa; Ontario Tech
University.
[4] EPSON, (2005, March 1st. Vision Guide 4.0 Properties and Results Reference. Oshawa;
Ontario Tech University.
Appendix
Lab Code:
1. Function Main ‘beginning of the program
8
12. For disco = 1 To 4 'performing a for loop for four discs
13. Wait Sw(IR) ‘signals IR sensor function to wait until disc is located by camera
14. found = False ‘boolean variable set to false
15. While found = False ‘performs while loop if found is false
16. VRun Lab4G1 'run the vision sequence to find discs
17. VGet Lab4G1.Soc.RobotXYU, found, x, y, u ‘gets coordinate values for x, y, u
18. Wend ‘ends while loop
19. Go XY(x, y, z + 50, u, 180, 0) ‘robot moves to 50 mm above pick up position obtained from vision system
20. Go XY(x, y, z, u, 180, 0) ‘robot moves to pick up position obtained from vision system
22. Jump3 P* +Z(50), P1 +Z(150) +X(disco * 50), P1 +X(disco * 50) ‘robot places disc
23. On GripperOpen, 0.5 ‘robot's gripper is in the open position
24. Go P* +Z(150) ‘robot rises by 150mm above current position
25. Next disco ‘loop continues and robot moves to next disc
9
Pre-lab Code:
1. Function Main ‘beginning of the program
14. Wait Sw(IR) ‘signals IR sensor function to wait until disc is located by camera
15. found= False ‘boolean variable set to false
16. While found= False ‘performs while loop if found is false
17. VRun Lab4 ‘run the vision sequence to find discs
18. VGet Lab4.Soc.RobotXYU, found, x, y, u ‘gets coordinate values for x, y, u
19. Wend ‘ends while loop
20. Go XY(x, y, z, u, 180, 0) ‘robot goes near pickup position
23. Jump3 P* +Z(100), Pallet(1, disco) +Z(150), Pallet(1, disco) ‘robot places disc in pallet
24. On GripperOpen, 0.5 ‘robot's gripper is in the open position
25. Next disco ‘loop continues and robot moves to next disc
10
31. Function belt_F ‘starting another function defining the conveyor
The fixed downward calibration vision sequence must locate nine calibration targets. It uses a
target plate or sheet that contains 9 targets. Two methods consist of;
1. Creating an object for each target, for a total of 9 objects
2. Use multi result objects (Blob or Correction) to return 9 results.
Procedure was developed with the assistance of reference [4]:
Step 1: Mount the camera
- Mount the camera so that it looks down into the robot envelope. Be sure robot clears the
camera
Step 2: Make a calibration plate (Assuming its already made)
- Make a plate or sheet with 9 holes or 9 target marks that span the field of view of the
camera
Step 3: Create Vision sequence to find calibration reference targets
a) Create sequence to locate the calibration targets. An object for each target can be created
or create 1 object to find all 9 targets provided the target can return multiple results
“Blob” and “Correction Recognition”.
b) After sequence is created, test to see that it finds all 9 points
Step 4: Create a Calibration Scheme
a) Click “New Calibration” on the Vision Guide tool bar or from the vision menu.
Enter a name for the new scheme
b) Set the “TargetSequence” property
c) If required, set the “Lamp” property
11
d) Set the “RobotArm”, “RobotLocal”, “RobotNumber”, and “RobotTool” properties
Step 5: Teach Points
a) In the “Vision Guide Calibration” tab click “Teach Points”. The “Teach Calibration
Points” dialog will open.
b) Follow the instructions in the message box near the bottom of the dialog and teach each
reference point. You will be prompted to teach the point and then turn the U axis 180 o to
teach the point again.
NOTE: Skip turning the U axis 180o if using a tool. Then click “Next” to move to the
next step.
Step 6: Calibrate
- In the “Vision Guide Calibration” tab, click “Calibrate” to start the calibration cycle. The
software will locate the 9 targets and then locate them again to verify successful
calibration.
12