Professional Documents
Culture Documents
Abstract 3
Results 4
Discussion of Results 7
Sources of Error and Problems Encountered 7
Conclusion 8
References 8
Appendix 8
2
Abstract
The group was tasked to design a program to move the EPSON ProSix PS3 robot to the
end-effector along some desired path. The objective was to write out letters using a pen to
simulate a dispensing operation. The group was provided with an Inverse displacement solution
of the EPSON ProSix PS3 to create the required joint displacements to obtain some desired path.
A code was created to write the initials of the first names of the group members on paper. The
code featured functions that controlled the height position of the pen. The group was able to
perform the lab requirements successfully with the robot able to write the initials of all three
members (see Figure 3).
Introduction
The EPSON Pro Six PS3 robot uses an inverse displacement solution to move the end
effector along the desired path in this session. This laboratory focuses on path planning because
it is a key component in robot programming. The desired letters can be written by using the
inverse displacement solution to generate the joint displacements needed to achieve the desired
path. In addition, an error checking function must be included to ensure that the inverse
displacement solution is within the robot’s joint limits. This lab differs from the previous two in
that the previous ones required us to use the jog and teach method. This lab will provide the
opportunity to learn valuable lessons on path planning.
3
● S - For team member Sumirthan
The letters of the initials were to be drawn within a size constraint according to the paper
used. The constraints of the paper size are as follows;
Figure 2: The Initials of Each Letter With Respect to the Coordinate System
Additionally, the robot was taught to start the operation at point P0 which was a random
location at a height above the paper. Initializing the process at point 0 ensured the operation ran
smoother, quicker and safer.
Results
After taking into account the requirements of the program, the code was generated [Appendix 1].
Lines 2 and 3 are declaring global variables to be used throughout the function. In line 2
Long Pulses(7) declares a long integer variable for Pulses(7) which are the robots movements.
Line 3, Boolean FailFlag, declares that FailFlag could either be true or false. Lines 4-5 declares
the Pen-down and Pen-up variable heights allowing for whole number inputs or decimal inputs.
Lines 7 through 9 are required at the beginning of the code because it is defining and initializing
4
important parameters to the Epson ProSix. Line 7 resets the robot, line 8 initializes the robot, and
line 9 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.
On line 10, Pulse 0,0,0,0,0,0 moves the robot to its home position, which zeros its
coordinates of orientation. The Pen-down location was set to a value at which the marker made
contact with the paper, which in line 11 was set at -200mm. Meanwhile, the pen-up location was
set to -170mm in line 12, which means when it was required to lift the marker, it would rise
30mm above the paper. Line 13 instructs the robot to move to P0.
Lines 14-130 consisted of the code required to draw out the letters. A few common
commands used will be listed.
If it was required to move to a point on the paper without drawing, the command would
generally appear as follows;
Inverse y-coordinate, x-coordinate, pen_up
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
● Inverse y-coordinate, x-coordinate, pen_up: Inverse refers to the Inverse function that
was provided to the team on canvas (Lines 134-280). y-coordinate, x-coordinate, pen_up
refers to the py,px, and pz coordinates, which is the center of the end-effector, also known
as the center of the marker holder.
● If FailFlag = False Then: FailFlag is a variable that can be true or false and determines
whether the specified location is unachievable by the EpsonPro Six. If the FailFlag is
false then the position can be achieved within the range of the robots joint limits. In this
line an if statement is used, which is stating that if the FailFlag is False, Then continue
to the next line of code within the if statement.
● Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6)): Is an array
that utilizes the inverse function to calculate the joint values required to move the robot to
the specified position.
● EndIf: Ends the if statement, and the code continues onto the next line.
5
If it was required to move to a point on the paper to begin drawing, or to draw in a continuous
path, the command would generally appear as follows;
The “S” initial required a curved path. If it was required to move to a point on the paper in a
curved path, the command would generally appear as follows;
Inverse py, px, pz
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
CP On
● CP On/ CP Off: Continuous path motion was turned on if a curved path was required.
When a curved path was no longer required, continuous path motion was turned off and
would be written on the same line as CP On to replace CP On.
Line 131 moves the robot to its home position, which zeros its coordinates of orientation
and line 132 turns off the Epson ProSix motors. Lines 134-280 were provided to the team to
6
download via Canvas and consists of the Inverse function. The Inverse function also sets the
FailFlag as an error flag variable.
Discussion of Results
Once the code was uploaded to the RC+ Robot Controller, the program was executed.
The Epson ProSix successfully drew the first initial “A”, second initial “N” and the last initial
“S”. Below are the results of the letters drawn;
Figure 3: Results of the initials “A” “M” and “S” drawn on the paper
The group encountered no problems while performing the lab activity. The code written
to program the robot had no errors. The only mistake observed was when the robot did not place
the pen down to paper on the first attempt. This issue was resolved by changing the ‘pen_down’
value in the code which affects the height between the pen and paper. The robot was able to place
the pen down to paper in the next attempt.
7
Conclusion
The goal of this lab is to move the end-effector along the desired path using the inverse
displacement solution of the EPSON ProSix PS3 robot. Path planning is a critical component in
robot programming for tasks like dispensing. To generate the necessary joint displacements for
the desired path, the group was given an inverse displacement solution of the EPSON ProSix
PS3. The first letters of the group members' first names were written on paper using a code. The
code featured functions that control the height between the pen and paper. It also included an
error checking function that ensured that the inverse displacement solution is within the robot’s
joint limits. There were no problems experienced when performing the lab activity; the robot
operated smoothly throughout the task. This lab taught the group that there are other methods to
program the EPSON robot’s movement besides Jog and Teach mode.
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.
Appendix
Lab Code:
1. 'START OF CODE
8
8. Motor On // turns robot’s motor on
9. Power Low //sets the operating speed of the robot to low
14. 'Letter A
15. '1st position
16. Inverse 680, -80, pen_up // declares initial point for A with pen up
17. If FailFlag = False Then // checks to see if position in range of robot’s joints limit
18. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
19. EndIf //ends if statement
20. Inverse 680, -80, pen_down // moves initial point for A with pen down
21. If FailFlag = False Then // checks to see if position in range of robot’s joints limit
22. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
23. EndIf //ends if statement
9
41. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
42. EndIf
52. Inverse 600, -70, pen_up // lifts pen up from final point of C
53. If FailFlag = False Then
54. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
55. EndIf
56. 'Letter M
57. '1st position
58. Inverse 680, -30, pen_up // moves pen up with first point of M
59. If FailFlag = False Then
60. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
61. EndIf
62. Inverse 680, -30, pen_down // puts pen down at same position
63. If FailFlag = False Then
64. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
65. EndIf
10
73. If FailFlag = False Then
74. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
75. EndIf
86. Inverse 680, 30, pen_up // lifts pen up from final point of M
87. If FailFlag = False Then
88. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
89. EndIf
90. 'Letter S
91. '1st position
92. Inverse 680, 40, pen_up // lines pen up with first point of S
93. If FailFlag = False Then
94. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
95. EndIf
96. Inverse 680, 40, pen_down // puts pen down at same point
97. If FailFlag = False Then
98. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
99. EndIf
100. CP On // turns on continuous path motion
11
106. '3rd position
107. Inverse 600, 80, pen_down // moves to point 3 of S with pen down
108. If FailFlag = False Then
109. Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
110. EndIf
12
135. 'Copyright 2006 to 2015
136. 'Scott Nokleby, PhD, PEng
137. 'Faculty of Engineering and Applied Science
138. 'University of Ontario Institute of Technology
139. 'NOTE: In SPEL+ Atan2 arguments are reversed.
140. 'Variable declaration (note that SPEL+ defaults all values to zero) - 2014.
141. Integer i, j, k, n
142. Double a, b, c, d, l_tool
143. Double Thetas(7), PperRad(7)
144. Double T0tool(5, 5), T06(5, 5), Ttool6(5, 5)
145. Double R30(4, 4), R36(4, 4)
146. Double K1, K2, K3, K4, K5
147. Double c1, s1, c3, s3, c23, s23, c4, s4, c5, s5, c6, s6
148. Double r13, r21, r22, r23, r31, r32, r33
13
169. 'Multiply T0tool*Ttool6 to find T06.
170. n=4
171. For i = 1 To n
172. For j = 1 To n
173. For k = 1 To n
174. T06(i, j) = T06(i, j) + T0tool(i, k) * Ttool6(k, j)
175. Next
176. Next
177. Next
184. c1 = Cos(Thetas(1))
185. s1 = Sin(Thetas(1))
197. c3 = Cos(Thetas(3))
198. s3 = Sin(Thetas(3))
14
201. K5 = s3 * c - c3 * d + 0
212. R30(3, 1) = s1
213. R30(3, 2) = -c1
214. R30(3, 3) = 0
15
233. Print "No Solution for Theta 5"
234. FailFlag = True
235. Exit Function
236. Else
237. Thetas(5) = Atan2(-r23, Sqr(1 - r23 * r23))
238. EndIf
239. c5 = Cos(Thetas(5))
240. s5 = Sin(Thetas(5))
259. 'Adjusts Theta 2 to accommodate the fact that the Pro Six zero configuration
260. 'is not the same as the one used in the inverse displacement solution.
261. Thetas(2) = Thetas(2) - PI / 2
16
267. Thetas(6) = Thetas(6) + PI
268. EndIf
269. EndIf
277. For i = 1 To 6
278. Pulses(i) = PperRad(i) * Thetas(i)
279. Next
280. Fend
Pre-lab Code:
'START OF CODE
Function Main
Reset
Motor On
Power Low
Pulse 0,0,0,0,0,0
pen_down = -210 //declared pen down z value
pen_up = -170
CP On //turns on continuous path motion
'Letter A
'1st position
Inverse 680, -80, pen_up
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
17
EndIf
'2nd position
Inverse 520, -60, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'3rd position
Inverse 680, -40, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'4th position
Inverse 600, -50, pen_up
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'5th position
Inverse 600, -70, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'Letter M
'1st position
Inverse 680, -30, pen_up
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
18
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'2nd position
Inverse 520, -10, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'3rd position
Inverse 680, 0, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'4th position
Inverse 520, 10, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'5th position
Inverse 680, 30, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'Letter S
'1st position
Inverse 680, 40, pen_up
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'2nd position
Inverse 680, 80, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
19
'3rd position
Inverse 600, 80, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'4th position
Inverse 600, 40, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'5th position
Inverse 520, 40, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
'6th position
Inverse 520, 80, pen_down
If FailFlag = False Then
Move Pulse(Pulses(1), Pulses(2), Pulses(3), Pulses(4), Pulses(5), Pulses(6))
EndIf
Pulse 0,0,0,0,0,0
Motor Off
Fend
20