Sie sind auf Seite 1von 75

Flow Chart

TCP Setting

Camera Setup Tool and


adjust the Brightness
and Focus

Camera Calibration Tool


(Pre-setting)

User Frame Setting (Touch Up


method, Automatic Grid Frame Set,
Robot Generated Grid Calibration

Continued Camera
Calibration Tool
(Plane 1 and Plane 2)

Vision Process Tool –


Teach Part Pattern and
Set Reference Position

If
Necessary
Programming and Accuracy Adjustment by
Test Run PR or ADJ_OFS.

1
2D iRVision Setup – Before Setup

Before setup the 2D iRVision, please make sure the following:

i) Make sure the camera glass is clean. Wipe with soft cloth or tissue paper
gently.

ii) Make sure the camera is installed to the frame or robot securely.

iii) Normally, the camera should be installed flat. Sometimes it could be


intentionally installed with certain angle

iv) In case of Fixed Frame Mounted, make sure the Field of view is fulfilled
to the requirement before start the setting. Especially when Analog
Camera is used.

v) In case of Fixed Frame Mounted, make sure the robot is able to reach
the field of view to pick up the parts.

vi) In case of Fixed Frame Mounted, make sure the pedestal/frame is rigid
and securely fixed to the table/conveyor.

vii) In case of Robot Mounted Camera, make sure the camera installed to
the area that did not interfere with the robot J5 swinging movement.
This is to prevent the camera crash when J5 swing.

viii) In case of Robot Mounted Camera, make sure the camera installed
securely to the robot extension because robot is moving fast.

ix) In case of Robot Mounted Camera, make sure the camera installed to
the J6, or extension which connect the J6 only.

2
x) When deal with the robot offset, ALWAYS BE CAREFUL to the robot
motion. Make sure the space is enough for the robot to offset. During
setting, make sure slower down the robot speed.

xi) Make sure the additional lighting is in the good condition.

Overview 2D iRVision
 Basic configuration of the 2D iRVision:

 2D iRVsion is used to detect the work piece with random position and
orientation. Thus, jig is not necessary to be installed to fix the work piece
position for the robot to pick up.

3
 Since it is only 2 Dimensional, 2D iRVision can only calculate the offset of
the following Axis:

i) X-Axis
ii) Y-axis
iii) R-Rotation

 The camera can be installed with 2 methods:

i) Fixed Frame

- Fixed Frame means the camera is installed to a frame/pedestal


and the frame/pedestal is securely fixed the table. In the others
word, the camera always maintained at same position.

- Fixed Frame method has the advantage such as the robot did not
need to follow the robot movement. This can avoid the camera
move to the hazard position, where could damage the camera.

- Fixed frame camera also has the advantage in term of cycle time.
Imagine, after the camera snap the part and the robot pick up the
part then load into next station, before the robot finish the
loading job, the camera can snap the next coming part. Then after
the robot done the loading task, it can come back to the pickup
table and pick the part immediately.

- However, the vision accuracy of the Fixed Frame type is lower


than the Robot Mounted Type.

4
(Fixed Frame Mounted)

ii) Robot Mounted

- Robot mounted type means the camera is installed to the robot


extension. In the others word, the camera is followed the robot
movement. As long as the position is within the Work Envelop.

- Robot mounted type has a significant advantage, which is the


wider Field of View. As long as the part is place within the robot
work envelop, the camera can move to the particular position,
snap and calculate the vision result for the robot to pick up the
part correctly.

- Robot Mounted type also has another advantage, which is better


accuracy. This is because the camera calibration can be done by
using Automatic Grid Frame Set. This method allowed the camera
to be calibrated by using 2 planes and calculate the Focal Distance
automatically, up to 3 decimal points.

5
- Robot Mounted type has a disadvantage. The camera is mounted
at the robot extension. This will cause serious damage to the
camera if the operations are not performed properly.
Furthermore, if the camera followed the robot to move to any
positions, include enter the CNC machine etc. The camera could
be damage by the coolant. Moreover, the high humidity in the
CNC Machine will cause the camera become dirty and image
become blur.

- In term of cycle time, Robot Mounted Camera will increase the


cycle time. Imagine, when the robot pick up the part and then
move to the place position, the next part already arrived at the
pickup position, but the camera couldn’t snap to the part,
because the camera is still at the place position.

(Robot Mounted Camera)

6
Theory of the 2D iRVision

1) FANUC has 2 main types of 2D iRVision camera, which are Analog Camera
and Digital Camera. Below table shown the details of each type of camera:

7
8
Example – Calculation of Field of View

 Assume Analog Camera Sony XC-56 is used.


 Assume the Distance from the camera to the work piece, D is 1000mm.

Image Size of Sony XC-56 = 640 Pixel x 480 Pixel

Cell Size of Sony XC-56 = 7.4µm

(𝐷−𝑓)
𝐿= × Lc
𝑓

1000 −8
= × (640 × 480 × 7.4 × 10-6)
8

992
= × 640 × 480 × 0.0074
8
= 124 × 2273.28

= 281,886mm2 (Area of Field of View)

9
640 Pixels
A

Field of View 480 Pixels

480
B = 640
𝐴

= 0.75 𝐴

Area of Field of View = 281,886mm2

A × B = 281,886

0.75A2 = 281,886

281,886
A = 0.75
B = 0.75 × 613

A = 613.064mm =459.75mm

≈ 613𝑚𝑚 ≈ 459𝑚𝑚

613 mm

459 mm

613
Magnification =
640

= 0.958mm

10
Offset Calculation
Fixed Frame Offset and Tool Offset

11
12
13
Part Z-Height

14
15
About the Calibration Grid Plate and Camera Calibration
 Standard FANUC Calibration Grid Plate has 5 sizes. Which are 7.5mm,
11mm, 15mm, 22.5mm, and 30mm

 When selecting the Calibration Grid Plate, make sure all the circles in the
plate enough to cover the entire Field of View.

 If the Field of View is too big, use AutoCAD or any other software, plot the
grid and print on “Mahjong Paper”. Avoid printing by using A4 paper and
then sticking the papers together. This will cause human error, where we
cannot confirm the papers are stick exactly straight.

 If the Field of View is too big, put the Calibration Grid Plate on a box (make
sure a stable and even box). That means, we raise the height of the plate
and so that it is closer to the camera, result in bigger scale. But this method
is quite risky, where the Part Z height setting must be correct, and program
could be required Position Register (PR) to adjust the offset error.

16
How the Camera calculate the Offset

30mm

C
A

 Assume the Grid Plate is 30mm center to center.

Discussion

i) By follow the User Frame direction, when the part located at Position A,
the Coordinate is UF (X: 0, Y: 0).

ii) By follow the User Frame direction, when the part located at Position B,
the Coordinate is UF (X: +30, Y: +90).

iii) By follow the User Frame direction, when the part located at Position C,
the Coordinate is UF (X: -60, Y: 0).

iv) By follow the User Frame direction, when the part located at Position D,
the Coordinate is UF (X: +60, Y: -60).

17
2D iRVision Setup

Step 1: TCP Setting


 Setup a TCP by using 3 points or 6 points method.

Step 2: Camera Setup Tool

1) Adjust the surrounding lighting to the optimum condition. Then adjust the
exposure time to desired value.

2) Open the LED Light cover (camera with LED option), then adjust the
aperture and focus to the optimum by follow the below step:

18
a) Place the “Calibration Grid Plate” under the “Field of View”. Adjust the
additional lighting and “Aperture” to the desired brightness. Re-confirm by
place the actual work piece under the “Field of View”.

- To adjust the brightness of the image, there are few settings need to be
consider:

i) Aperture.

: Camera brightness. You can adjust the aperture by open the LED
cover (Camera with LED Option).

ii) Surrounding Lighting

: Make sure the surrounding lighting is enough and balance within


the “Field of View”.

: Once the image become darker, the camera is difficult to detect the
work piece. In this situation, additional lighting is very important to
supply the light ray to the image.

: Furthermore, vision result always affected by the surrounding


lighting, which it could be unstable and inconsistent time by time. In
this case, additional lighting is able to give the more consistent light
ray to the image, because normally the additional lighting is installed
near to the camera.

iii) Exposure time

: Exposure time can be set in the “Vision Process Tool”. For visual
tracking, as the conveyor keep moving without any stoppage, lower
exposure time must always to be considered in order to reduce
camera capture time, hence decrease the cycle time.

19
b) To adjust the focus, rotate the focus ring below the aperture ring to the
clockwise direction and observe the result. If focus become even more blur,
rotate the ring to counter clockwise direction until the image become clear
(Overshoot a little bit is ok as need to find the clearest image. After that
just adjust it back to the optimum focus).

Remark: Please consider the work piece features when adjust the
brightness/exposure time. Some work pieces can be reflected when expose
under strong light ray, causing camera receive the bound back noise.

3) Check the camera cable connects to which port of the Multiplexer, and
then choose the port number.

4) Choose the camera type according to the order spec.

5) Set the Default Exposure Time. In here, the exposure time is set for adjust
the aperture and focus.

6) Check the box of “Robot Mounted Camera” if the camera is mounted to the
robot J6. Do not check if camera is mounted to fixed frame.

Step 3: Camera Calibration Tool Setting


- Camera Calibration Tool is very important for vision setup. Robot offset will
be inaccurate if the calibration did not perform properly.

- Once started the Step 3 (Camera Calibration Tool Setting), Step 4 (User
Frame Setting) and Step 5 (Calibrate camera) must perform following, until
these 3 steps completely done. Do not perform these 3 steps separately.

20
Fixed Frame Camera

Method 1 - Manual Touch Up Method

 Perform the Camera Calibration Tool Setting by follow the below steps:

REMARK: YOU CAN USE THIS METHOD ALSO FOR THE ROBOT MOUNTED CAMERA. HOWEVER,
THIS IS NOT A GOOD OPTION FOR YOU TO USE. UNLESS THE WORKING SPACE IS LIMITED,
CAUSED YOU CANNOT PERFORM “AUTOMATIC GRID FRAME SET” METHOD.

i) Place the Calibration Grid Plate to the Field of View. Make sure all the
circles in the Grid Plate enough to fill in the entire Field of View.

ii) Make sure place the Grid Plate in straight position.

21
iii) Then set the Parameter in the below screen.

- Application Frame

: Normally set “0”, or set the same value as Cal. Grid Frame

22
23
- Select the Camera, by follow the “Camera Setup Tool” setting.

- Set the optimum Exposure Time value. Make sure the image is not too dark
or too bright.

- Set the Grid Spacing value. Make sure it is follow as printed on the
Calibration Grid Plate.

- Number of Plane set to be “1”. Because the camera height and the Grid
Plate height always maintained when camera is installed to a Fixed Frame.

- Robot-Held Cal. Grid set to “No”, because the robot does not hold the Grid
Plate. The plate is placed on the table.

- Set the Cal. Grid Frame number to the User Frame number that you choose
to overwrite. Each Robot can set up to 9 User Frame. Normally choose an
empty User Frame to prevent the Vision User Frame overwrite the others
Station User Frame (e.g. User Frame of Place table, machine table etc.).

- For the Projection, choose “Perspective”. Then set the Focal Distance by
follow the camera specification (normally you can find the specification
printed on the camera). Do not set wrongly as it will cause the inaccurate in
vision result.

- If the Calibration Grid Plate is placed within the Field of View, then at the
Fixture Position Status, Click “Set”.

- The “Plane 1” DOES NOT SET FIRST. After done the User Frame, only you
can set.

iv) Set the User Frame by using Touch Up method. In the Teach Pendant,
choose the 4 Points method. Then move the TCP to the target point,
press “Shift + Record (F5)” in the Teach Pendant.
24
v) After the User Frame done, for the ‘1st Plane’, press the “Snap”, and
then click the “Find”.

vi) Crop the unnecessary area of the image as shown below:

25
vii) After crop the unnecessary area, click “ok”. Then below screen will
appeared:

Check the Calibration Data

26
i) Since the User Frame Setup method is Touch Up method, there is 1
plane calibration. Thus, “Projection” is set to “Perspective”; the Focal
Distance is set manually by follow the camera spec, 12mm.

ii) Lens Distortion is 0.00014. This value can be more accurate if the points
/ circles of the Calibration Grid Plate are covered the entire Field of View.

iii) Magnification is the size of 1 Pixel.

iv) The Mean Error Value and Maximum Error Value are both must less
than “1” for better vision accuracy.

Remark:

i) Make sure after the User Frame setting, the Calibration Grid Plate does
not moved, until the entire calibration process done.

ii) If the Means Error Value or Maximum Error Value are more than “1”
the best way to solve the problem is recheck the setting in the “Setup”
tab, If all settings are correct, adjust the Exposure Time and redo the
User Frame and Camera Calibration.

27
Fixed Frame Camera

Method 2

Robot Generated Grid Method

 Perform the Camera Calibration Tool Setting by follow the below steps:

28
i) Prepare a Target and make sure it fulfill the below condition:

29
Remark:

i) Do not make the target size too big. Else, problem below will be
occurring.

Distance from the edge to


the center of circle

Center of Circle

D
B
A

C
A

 Area A, B, C, and D are empty. If the work pieces fall in these areas, pickup
accuracy will be affected. This problem is caused by the distance from the
edges to the center of the circle is too large.

30
ii) Flow Chart of Using Robot Generated Grid Calibration Tool:

31
iii) Application Frame

32
iv) Perform the setup at the Vision Setup (Web Server) by follow the below
step:

a) At Camera Setup Tool, set as below:

b) At the Camera Calibration Tool, set as below:

33
34
Remark:

I) Make sure the Target attached to the robot EOAT is located in the Field
of View, as center as possible.

II) Set the Application Frame. Normally, if the camera frame is parallel with
the World Coordinate, we can set the Application Frame Number to “0”.

III) If the camera frame is not parallel to the World Coordinate (the camera
is not installed flat, for example 45 degree relative to the World
Coordinate, the Application Frame must be used, means you need to
make a User Frame, so that the user frame is parallel to the camera)

IV) Choose the Camera by follow the “Camera Setup Tool” setting.

V) Set the Exposure time.

VI) Maintain the Multi Exposure to “1”. Because if you increase the value of
Multi Exposure, although it can increase the chance of find the target,
but it will cause the calibration time become longer. This is because of
Multi Exposure is means how many time the camera snap per single
Run_Find Command. If set Multi Exposure to 2, means for every snap
command executed, the camera will snap twice.

VII) Robot Generated Grid Calibration Tool required 2 planes. Set the Plane
spacing.

VIII) If the Target is already at the center of the Field of View, Press “Record”
to set the Initial Position.

35
36
v) Perform the setup at the Teach Pendant by follow the below steps:

a) Logout the Vision Setup (Web Server). This step is very important and
must follow. Follow the below steps to logout the Vision Setup (Web
Server).

- At the Teach Pendant, Press “Menu”, then choose “iRVision”, and then
choose “Vision Setup”. (R-30iB Controller)

37
- The Teach Pendant will show a message to ask you if you are confirm to
logout the Vision Setup (Web Server), choose “ok”.

b) After logout the Vision Setup at Web Server, follow the below step:

 From the above screen, Press “F3 - Detail”. Below screen will show:

38
Remark:
i) Choose the Camera Calibration, by follow the setting in “Camera
Calibration Tool” (Web Server).

ii) If the camera frame is parallel with the World Coordinate, set “0” to the
Application Frame.

iii) Make sure the Start Position is “Recorded”.

iv) Choose a new User Tool that never been used.

Caution: If choose the User Tool number that already been used for
the gripper etc., the User Tool will be overwrite after the calibration
done.

39
v) Set the number of Grid for the column and row. Means, how many
points you prefer to have for the column and row. If follow the standard
Calibration Grid Plate, it is 11 x 11, total 121 circles (points). You can set
any number for Row and Column. But if the values are too large, the
calibration will take longer time.

vi) Then, Hold the Deadman Switch, press “Reset” to reset the alarm, Hold
the “Shift”, then Press “F5 – Run”.

vii) Keep Hold the Deadman Switch and Shift button. If accidently release,
better Restart the process.

viii) Normally, the override speed set to not more than 30%. This is because
if the robot is moving too fast, the inertia become higher caused the
robot movement become slightly not smooth or slightly vibrates, caused
the calibration become inaccurate.

40
- After seen the above screen, move the cursor to the “Recorded”, then
Press “F5 – Run”.

- After done, then move the cursor to the Program Generation, then Press
“F5 – Run”, to generate the Calibration Program.

41
-

- After the program generated, follow the below steps to run the Calibration
Program:

42
ix) After finish run the Calibration Program, check the Calibration Data by
follow the below steps:

43
Remark:

i) The Focal Distance is calculated automatically.

ii) Make sure the Mean Error Value and Maximum Error Value both are
less than “1”. If the error is more than “1”, follow the below step:

iii) However, redo the calibration is the better solution.

44
Robot Mounted Camera

Method 1

Automatic Grid Frame Set

45
a) Perform the setup by follow the below steps:

I) Setting in Vision Setup (Web Server)

46
- Set the Application Frame. If the camera frame is parallel to the World
Coordinate, then you may set “0”. Or, is better for you to choose the UF
number same as “Cal. Grid Frame.

- Select the Camera. Then set the exposure time and enter the Grid Spacing
value according to the Calibration Grid Plate that you used.

- Change the number of plane to “2”.

- Since the robot did not hold the Calibration Grid Plate, select “No” to
“Robot-Held Cal. Grid”.

- Select the User Frame number that you want to use for Cal. Grid Frame.

- At the Fixture Position Status, Press “Set”.

ii) Setting in Teach Pendant

47
48
49
50
Remark:

- When choose the User Frame / User Tool number, if select the same
number of the gripper User Tool or same number of the pickup table User
Frame, after the Camera Calibration, the Original User Frame and User Tool
will be overwritten.

- When setting the Start Position, make sure the position is not TOO CLOSE
to the camera. Because during the Automatic Grid Frame Set, the robot will
move up and down, follow the setting of “Z Move Dist. Limit”.

- When setting the P angle, double check the J5 swing angle / movement.
Prevent the J5 crash to the J4 arm.

iii) Run the Measurement

51
52
Remark:

- Do not set the Override Speed too fast. It will affect the accuracy because
the robot is in high inertia and cause the vibration.

- If accidently stop the measurement, you may choose to resume the


measurement, but restart is the better solution.

- After done the measurement, check the User Tool / User Frame data in the
Teach Pendant.

53
iv) Set the 1st plane and 2nd plane

- Press the “Snap”, and then press the “Find” for the 1st plane.

- Crop the unnecessary area in the image. Then press “OK”

- Move up/down the robot within the range of 100mm to 150mm from the
1st plane.

- Then press the “Snap” and then press the “Find” for the 2nd plane.

- Crop the unnecessary area in the image. Then press “ok”.

- Make sure the 1st and 2nd plane both shown “Found”.

54
- Check the Calibration Data by press the “DATA” tab. Make sure the Focal
Distance is close to the actual spec. For example, camera with 8mm focal
distance, after the Automatic Grid Frame Set, the focal distance will be
calculated automatically and the value should be 8._ _ _ mm. The focal
distance can be calculated up to 3 decimal points. Thus, the Automatic Grid
Frame Set actually able to give a better vision accuracy, compare to the
Manual Setup User Frame (Touch Up) method with single plane calibration.
For Manual Touch Up method, user must set the “Projection” to
“Perspective” and set the Focal Distance manually by key in the value,
follow the camera specification printed on the camera.

- Make sure the Mean Error Value and the Maximum Error Value are both
less than 1. If more than “1”, press the “Point” tab, delete the point that
carry the large value of error.

- However, the best solution is recheck the Camera Calibration Tool Setting,
make sure all the setting are correct, then change the Exposure Time
accordingly and recalibrate again.

- Recalibrate again means run the Automatic Grid Frame Set and set the 1st
Plane and 2nd Plane again. If you are absolutely confirmed the Camera
Calibration Plate does not moved, means still exactly same position as the
position when perform the User Frame setting (Automatic Grid Frame Set),
you may just perform the setting of 1st and 2nd plane only.

55
Troubleshooting of Automatic Grid Frame Set

56
Step 4: 2D Single View Vision Process Tool

57
58
Steps of Setup 2D Single View Vision Process

Sequence of Setting Vision Process Tool: 1st set “A”. Then, proceed to “C”. Last,
set the “B”.

a)
i) Place the work piece under the Field of View. The best position is the
center of the Field of View. Place the work piece as straight as you can.

A C
D
B

59
Refer to the diagram above, A, B, C, and D are placed at the corner of the Field of
View. E is placed at the center of the Field of View. The scale of E is slightly
different compare to the A, B, C, and D, which it is more close to the reality.
Moreover, unless you are able to provide the perfect and well balance lighting
over the Field of View, otherwise the image could be slightly distorted at the
position A, B, C, and D because of the lighting concentration. Thus, choose the
position E as the teaching reference because it gives clearer image. If we choose
the D as the reference, the image different between B and D is bigger compare to
B and E, thus will cause the vision result score become lower.

b)

i) Choose the Camera Calibration accordingly.

ii) Set the exposure mode to “Fixed”.

iii) Adjust the exposure time. Exposure Time referred to the Shutter Speed.
Low Exposure Time lead to faster shutter speed, this will cause the
lesser amount of surrounding lighting being absorbed by the camera
lens. Thus, image becomes darker.

iv) Select “1” to the “Multi Exposure”. Maximum value can be set is “6”.
Multi Exposure referred to the number of capture per single Run_Find
command. If choose “6”, the camera will snap 6 times per single
Run_Find command, with different Exposure Time value. This will
increase the chances of captured the parts, but end up the cycle time
will become longer.

v) Set the “Number to Find” to “1”.

60
vi) If the work piece is place on the table, and the robot is offset to pick up
the work piece, choose “Fixed Frame Offset”. If the robot holds the work
piece then scan by the camera, you may choose “Tool Offset”.
c)

i) Proceed to GPM Locator Tool”.

ii) Press “Snap” and click the “Teach”.

iii) Crop the unnecessary area, left only the work piece image, then click
“OK”.

iv) Make sure the Training Stability is “G” (Good) for Location, angle and
scale. If you get “P” (poor), reteach the pattern. Teach the camera to
recognize more features.

v) Click the “Training Mask” and mask the features that you do not want
the camera to recognize. Any feature that distorted or unnecessary
noise must be masked to prevent the Vision Score become low.

61
vi) If necessary, set the part origin.

vii) If necessary, use the Emphasis area to emphasize the important areas
that you want the camera to take special concern. If the emphasis area
score is low, but other features still able to be detected clearly, the
robot will not pick up the part also. This can enhance the accuracy.

62
viii) Temporary maintain the Score Threshold, EA Score Threshold to 70%
and Contrast Threshold to 50%.

ix) Temporary maintain the Overlap Area to 75%.

x) Temporary maintain the Elasticity to 1.5.

63
xi) Tick the “Orientation” and “Scale” and set the range. Check the robot
motion before set the range for the Orientation, avoid the robot wrist
over twist when pick up the part. Normally, if the configuration is Fixed
Frame Camera, the Scale is not that important, because the camera
height and the Part Z-Height always maintained. However, still
recommend to set some range for the Scale. Otherwise, if the image
slightly distorted and scale become slightly different, then the camera
cannot recognize the work piece.

xii) Press “Snap + Find”, observe the Vision Result. If couldn’t find the part,
Use the “Show Almost Found” to check the vision result one by one. The
result will be shown, but it is in “Red” color highlighted. Observe which
score result is below the Threshold Value. For example, if the Result EA
score is lower than the EA Score Threshold percentage, you may
consider lower down the EA Threshold Value. If it is impossible for you
to lower down the threshold value because of the accuracy concern, you
may need to adjust the lighting, or exposure time, or reteach the
Pattern / Training Mask / Emphasis Area.

xiii) After the Vision Recognition is good, double check by using the
“Continuous Snap and Find”. Observe the result to make sure the Vision
is able to capture the work pieces constantly and the position (Column &
Row) is consistent.

Remark:

i) In order to enhance the probability of the camera captured the part, you
can adjust the Score threshold, Contrast Threshold, EA Threshold (if
you’ve teach the Emphasis Area), and Elasticity.

ii) For example, if the part is very difficult to be capture by the camera and
caused the part failed to be pick up by the robot, you may consider
decreasing the Score Threshold. However, decreasing the score
64
threshold will cause the accuracy dropped, as the compensation, you
may need to consider increasing the EA Score Threshold or decreasing
the Elasticity slightly.

d)

i) After confirm the Vision is able to capture the part constantly, proceed
to the 2D Single View Vision Process again.

ii) If you are used the Automatic Grid Frame Set and Manual Touch Up
method for the User Frame setting, you are required to measure the
height of the work piece surface [(calculate from the work piece
features that recognized by the camera, to the User Frame (offset
frame)]. Enter the measurement into the Part Z-Height.

If you are using the Robot Generated Grid Tool, you are required to
move the TCP to slightly touch the work piece surface (the surface of the
features that recognize by the camera), then at the teach pendant,
observe the WORLD coordinate “Z” value shown in the “Position” screen.
Enter the value into the Part Z-Height. The reason of observe the Z-
height from the WORLD coordinate is because we are using the UF = 0
during perform the Robot Generated Grid Tool.

iii) After that, press the “Snap + Find”, then clicks the “Set Reference”.

iv) After set the reference, the work pieces position cannot be change
anymore, until the completion of the program.

65
Step 5: Vision Program

 Assume the camera is installed flat and parallel to the World Coordinate.

Description:

Line 1: Define the User Frame (Offset Frame) number. This user frame should be
following the User frame number that made before the camera calibration. If you
used Robot Generated Grid Calibration Tool during the camera calibartion, define
the User Frame as “0” (World Coordinate).

User Frame is important for the robot to offset in X-Y plane and calculate the R-
rotation angle.

Line 2: Define the User Tool number. User Tool is important for the robot TCP to
offset in R rotation when pick up the workpiece. However, the TCP also affect the
offset in X-Y plane if you used the Manual Touch Up method when doing the User
Frame setting.

66
Line 3: This is depending on customer requirement. If this command this used,
user can check the Register, R [1] to check the robot pickup status is success or
fail.

Line 4: If you are using Fixed Frame camera, this position is the Home Position or
Standby Pick Up position. If you are using Robot Mounted Camera, then this is the
Snap position.

Line 6: This is the Vision Command. This command triggers the camera to start
Running and Find the parts, by refer to the Vision Process Tool “A”.

Line 7: This is the Vision Command. This command is to request the camera
calculate the offset data, by refer to the Vision Process Tool “A”. The Offset Data
will be stored in the Vision Register, VR [1]. If the vision is failed to calculate the
offset data, due to the camera cannot find the part, the program will JMP LBL to
LBL [100].

Line 10: Approach Position. The program will retrieve the Offset Data from the
Vision Register, VR [1] and then offset the P [2]. Because the Coordinate of the
Approach Point, Pick up Point and Retreat Point are same, thus, Tool offset is
used here for offset the Approach Position so that it always higher than the
Pickup point, in the Z-direction.

Line 11: Pick up position. The program retrieved the Offset Data stored in the VR
[1] and offset the P [2].

67
Line 12: Command the Gripper to clamp the part.

Line 13: Retreat Position. The program will retrieve the Offset Data from the
Vision Register, VR [1] and then offset the P [2]. Because the Coordinate of the
Approach Point, Pick up Point and Retreat Point are same, thus, Tool offset is
used here for offset the Retreat Position so that it always higher than the Pickup
point, in the Z-direction.

Line 15: After Pick Up the part, program JMP LBL [900]. For example, to the Place
program.

Line 17: If camera failed to calculate the Offset Data, program Jump Label to LBL
[100].

68
How to Touch Up 2D iRVision Pick Up Point

Caution: After reset the Reference Position in The Vision Process Tool, before
Touch Up the Pick Up position in the program, the Pick Up point could be very
much different than the actual Pick Up points because of the VOFFSET, VR
command. If the robot is in high speed, it may cause serious accident.

1) Make sure slow down the robot speed.

2) Place the work piece under the Field of View as center as you can.

3) Press Snap + Find.

4) Press Set Reference. Save the vision setting.

5) DO NOT move the work piece.

6) In the program, run the program from the beginning (at least the program
must read through the Run_Find and Get_Offset commands).

7) Then move the robot manually by using WORLD coordinate to the Pick Up
point.

8) Touch up the Pick Up point. Answer “No” to “Set New ID” and “Yes” to
“Subtract from the VR () Result”

9) Make sure the Approach Point and Retreat Point are exactly above the Pick
Up (means X and Y coordinate are same as the Pick Up point, but Z value is
higher than Pick Up point)

69
How to check the Pick Up accuracy
1) After finish the program and test run, observe the pickup accuracy.
2) Normally we check the accuracy of X-Y plane offset by place the work
piece with the below positions.

F D G

B A C

H E I

Check the stability of the LOC. in the Vision Process Tool. If it is “Good”, touch
If accuracy is poor at Position A up the Pick Up point again. If it is ok, check if the focal distance is set wrongly. If
yes, correct the focal distance and redo the User frame and Camera Calibration.

If accuracy is poor at Position B


and C

Check the stability of the LOC. Check the Part Z-Height setting. Check the Focal
Distance. Check the table is well leveled or not. Check the Camera Calibration
result, especially the calibration points. Probably because of the points error is
If accuracy is poor at Position D high at the edges. Check the User Frame and Camera Calibration. Probably
and E because of after the setting of the User Frame and before the 1st and 2nd plane
calibration, the Calibration Grid Plate accidently moved. Redo the User frame
and Camera Calibration.

If accuracy is poor at Position F,


G, H, I.

70
3) Next check the accuracy of R-Rotation by place the work piece with the
below positions.

Caution: Be aware when you test the angle, the angle tested is
depending on the EOAT design. Some EOAT design, when it attached
to J6, it is not suitable for the wrist to offset more than (+/-) 90 deg.

- Refer to the diagram below, place the work piece at the position from (a) to
(i), rotate the work piece in clockwise with various angles. Observe the
pickup accuracy.

- Refer to the diagram below, placing the work piece at the position from (a)
to (i), Rotate the work piece in counter clockwise with various angles.
Observe the pickup accuracy.

F d g

b a c

h e i

i) If the robot offset inaccurately in R Rotation, probably the Pattern


teaching or Training Mask are done improper during the Vision Process
Tool teaching, caused the Angle become “Poor” in Stability. Also, if using
pointer to perform the manual touch up User Frame method, probably
because of TCP is inaccurate caused the Offset Frame and Camera
Calibration issues.

ii) If the robot offset is accurate in R Rotation but inaccurately in X-Y,


probably is TCP problem or Offset Frame problem.

71
How to use the ADJ_OFS (Adjust Offset)
i) ADJ_OFS is a KAREL Command to adjust the vision accuracy.

ii) When we test the pickup accuracy by moving the part on X-Y
direction only, if the pickup accuracy is poor, ADJ_OFS cannot be
used for the adjustment. When we test the pickup accuracy by rotate
the work piece in R angle, without change in X-Y direction, if the
pickup accuracy is poor in R rotation, ADJ_OFS also cannot be used as
the adjustment method. When we test the pickup accuracy by rotate
the work piece in R angle, If the pickup accuracy is poor in X-Y offset,
then only ADJ_OFS can be used.

iii) Before use this command, make sure you already tested the pickup
accuracy of the work piece without change in R Rotation and
confirmed the X-Y offset is already good.

iv) When test the pickup accuracy with R angle, if the R angle remained
same degree, but the pickup accuracy error is inconsistent when the
part is located in different region of the table, then ADJ_OFS is very
difficult to apply. Refer to the explanation below:

A B C D E

72
Remark:

i) The work piece is being tested at the position / region A, B, C, D, E.


ii) If Position A give the error offset to the left side but Position E give the
error offset to right side, the ADJ_OFS is very difficult to apply.

A E

Robot offset error Robot offset error


to this direction. to this direction.

 Error is in opposite direction, ADJ_OFS difficult to apply. Redo the User


Frame and Camera Calibration is the best solution.
B
A

Robot offset error


Robot offset error
to this direction.
to this direction.

 If the offset error is in the same direction and distance, ADJ_OFS can be
applied. However, if the offset error is too large (for example: error more
than 10mm), still redo the User Frame and Camera Calibration is the best
solution.

73
Procedures:

1) Place the work piece under the camera with position (1) :

(Position 1)

2) Run the program and observe the error. Jog the robot manually to the
pickup position and observe how much offset error in mm, from the actual
pickup position.

3) Put in ADJ_OFS (a, b, c, d) command after/below the GET_OFFSET


command in the program.

 If you are using Vision Register, VR for store the vision offset data, choose
“1” for “a”. If you are using Position Register, PR, choose “2”.
 Key in the VR or PR number used, to the “b”.
 Key in the PR number that used for adjust the offset data.
 Key in the VR or PR number used for store the new offset data (after
adjustment). This VR or PR number will be used for the final offset of the
pickup position in the program.

4) For example, ADJ_OFS (1, 1, 100, 1) is used. This means, the first vision
offset data will be stored in Vision Register, VR (1). Then use the Position
Register, PR (100) to adjust the offset data. The final offset data will be
adjusted and stored back to the VR (1).

5) For PR (100), only X-axis and Y-axis are allowed to key in the value. Z, W, P,
R must be always “0”. If the pickup error is 1mm offset from the actual
pickup position in x-direction, key in 0.5mm in X-axis for PR (100). Because
it is follow User Frame direction, which is categorize as “Cartesian
Coordinate” movement, thus, Y-axis might need to key in a value as well,

74
and the value should be less than 2mm. This is because the error is caused
by the X-axis. The Y-axis is only coordinating for linear motion.

6) Next, rotate the work piece to Position 2 and repeat the above methods.

(Position 2)

7) After that, reconfirmed again the pickup accuracy of the Position 1. Repeat
the procedure until you obtain an optimum result.

75

Das könnte Ihnen auch gefallen