Download as pdf or txt
Download as pdf or txt
You are on page 1of 111

3D Fanuc iRVision

Training
for Material Handling

Rev: 1A Fanuc IR Vision Training Copyright 2010. General Motors Corporation. All Rights Reserved
3D Fanuc iRVision Training for Laser Welded Roof
PTM Page Course Outline

 Module #1: System Overview


 What is a Vision Systems
 Major Components
 Interconnects
 3DL Sensor
 Resolution and Accuracy

 Module #2: 3DL Setup


 Setup Procedure
 Teaching 3DL tool frame
 Teaching Grid Plate user frame
 Calibrating 3DL Sensor
 Programming Vision Process
 Process flow
 Programming TP programs
 Module #3: Maintenance
 Standard Maintenance
 Replacing Camera

2
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Functionality of System

 Fanuc iRVision calculates an offset from features found


in a grayscale image.
 The offset is applied to the robot’s path and then the
robot is able to move to the correct location of the
object.
 2D will calculate a X , Y and R offset.
 3D will calculate a X,Y,Z,W,P,R offset.
Found Position
+ (X,Y,Z,W,P,R)

Camera
Sensor

3
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Types of Vision Systems

2 Dimensions 3 Dimensions
(Three Degrees of Freedom) (Six Degrees of Freedom)

X
Z
R
R
Y X
Y
P W 4
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Identifying Major Components

PC required for setup


PC setup over using MS Internet
iPendant – can standard Ethernet Explorer
display runtime connection
images to R-J3iC CPU

Camera Cables

Camera Multiplexer
or or or or
And Laser Safety Unit

Up to four 2D cameras or 3DL sensors

5
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Identifying Major Components

3D Multiplexer 2D Camera Enclosure


Robot Controller

3DL Sensor with Ring Light

6
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Interconnects of Cameras and Lighting

Light #1 Light #3

Light #2 Light #4 Cameras will be housed in


Fanuc Robot Cabinet enclosure. Cable will
Main CPU
3D,4 Camera
connect to enclosure.
Multiplexer
JRL6 LASER #1
Pintail inside enclosure
Cam 1 LASER #2
will connect to camera.
Cam 2 LASER #3
JRL6 Cam 3 LASER #4
Cam 4
Output #1 Output #3
Output #2 Node Output #4
41
Aux Power DP1
Devicenet DS1
Camera #1 Camera #2
EOAT MOUNTED

Output #1 Output #3
Output #2 Node Output #4
42
Aux Power
Devicenet

Light #5
Note: Camera #2 is reserved for 2nd robot mounted 3DL sensor
7
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page 3DL Sensor Description

2 - Class 3a Laser Line


Generators

Grey Scale Camera


(Sony XC 56)

Image #1 Image #2 Image #3


Grey Scale Features Grey Scale Laser Line 1 Grey Scale Laser Line 2

Used to calculate Used to Calculate Used to Calculate


X, Y, RZ Z, RX, RY Z, RX, RY 8
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page 3DL Sensor Description

Combined Image
Grey Scale, Laser #1, Laser #2

9
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page 3DL Sensor Description

Fanuc 3DL Sensor


Calibrated cube of space
in front of 3DL sensor

Approximate
standoff distance to center of
calibrated cube = 400 mm

Area that features


Note : Height and width of cube dependent of
focal length of lens. Standard lens sizes: should be taught
8mm and 12 mm.

10
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Basic Theory of Gray Scale Cameras

 Fanuc vision uses a Sony XC-56 grayscale camera


 The XC-56 has a CCD with the pixel resolution of 512pi x
480pi.
 Calibration establishes a pixel to millimeter ratio.
 Each pixel is assigned a luminescence value from 0 (dark) to
255 (bright).
 Detects features from the change in contrast between pixels.
512 pixels horizontal

480 pixels vertical

11
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page System Accuracy

 System accuracy depends not only on camera resolution, but


also on field of view.
 Basic rule of thumb:
 ½ Pixel Imaging capability.
 Large Field of View: “BAD ACCURACY” (Large # mm / pixel).
 Small Field of View: “GOOD ACCURACY” (Small # mm/pixel).
 These factors are related by the following formula:

12
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page System Accuracy vs. Field of View

X =1220 mm
512 pixels
Y = 915 mm
480 pixels

Resolution Ration = X Size of FOV / X Pixel Count System Accuracy = Resolution Ration * 0.5 pixel
1220 mm / 512 pixels 2.38 mm/pixel * 0.5 pixel
2.38 mm/pixel 1.19 mm

13
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page System Accuracy vs. Field of View

X =189 mm
512 pixels
Y = 178 mm
480 pixels

Resolution Ration = X Size of FOV / X Pixel Count System Accuracy = Resolution Ration * 0.5 pixel
189 mm / 512 pixels 0.369 mm/pixel * 0.5 pixel
0.369 mm/pixel 0.1845 mm

14
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Basic Theory of Gray Scale Cameras

Sony XC-56 Response Curve

15
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Lighting

 Goals of system lighting are:


 Contrast enhancement of desired features.
 Suppress undesirable noise (shadows, ambient light,
etc..)

 Maintain constant levels of light throughout system life span.


 Intensity.
 Lighting must be engineered into system.

 Two main light strategies:


 Diffused Directional Front Illumination
 Diffuse Backlighting

16
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Lighting

Diffused Directional
Diffused Backlighting
Front Illumination

Advantages •Disadvantages
Advantages •Disadvantages
•Consistent contrast •More difficult to
•Easy to implement •May create unwanted with different colors. implement due to
•Soft, fairly non shadows. •Vary high contrast material handling.
directional light. •Edges of features may image. •Can not use surface
•Covers a large area. be fuzzy. •Lower cost. features.
•Light intensity may be
low. 17
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Lighting

Diffused Directional Diffused Backlighting


Front Illumination

Line Light
Advance Illumination : PN EL174-625-24-436

Diffused Backlight
Advance Illumination : PN BL41192-625-24
Ring Light
Banner: PN LEDRR70X70-78587

Red LED Red LED


625 nm 625 nm
18
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Filtering

 Goals of system light filtering is:


 Maintain a consistent lighting of feature.
 Suppress undesirable ambient lighting influences.
 Light Characteristics
 Light is measured in wavelengths
 The light you see from an object is the wavelength at is
reflected and all other colors are absorbed.
 CCD’s are:
 Sensitive to the entire span of the visible spectrum.
 Most sensitive to red/IR wavelengths (625 to 735 nm).

Visible Light Spectrum

19
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Filtering

Work Object

700 nm 400 nm

Reflected
Light from
Work Object

Filter

Lens

625 nm

CCD LED Line


LED Line Light
Light
Camera (625 nm)
(625 nm)
20
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Filtering

Transmission Chart for


Midwest LP590 Filter
120

100
Percentage of Light Transmission

80

60

40

20

0
210 250 290 330 370 410 450 490 530 570 610 650 690 730 770 810 850 890 930 970 101010501090
Light Wavelength

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #1: System Overview
PTM Page Lighting and Filtering

No Lighting with Filter

40 ms Exposure

Front Diffused Lighting with Filter

1 ms Exposure

22
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Setup Overview

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup.
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Establish communication

 Hardware Setup
 The Ethernet connect must be obtained so that the Robot’s Web
Server can be accessed.
 There are two Ethernet ports in the robot controller.
 Port one is connected to the Hurchmen cell hub and can be used to
communicate via the cell workstation.
 Port two is open and can be used to communicate via a laptop.
 Each port will have a unique IP address.

Port #1

Port #2

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Establish communication

 Robot IP Address

Must cycle power to take effect !!! 25


Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Establish communication

 Computer IP Address

26
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Establish communication

 The vision software is accessed by browsing the robot’s


IP address with Internet Explorer.
 The IP address of the robot must be entered into the address bar
of the browser.
 If there is a firewall or anti-virus software on the PC, it may be
difficult to achieve connection.

IP Address

Vision Setup Link

27
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Establish communication

 Hardware Setup
 Multiplexer must be installed in robot cabinet and cable
connected to appropriate connections.
 Cable must be connected between multiplexer and 3DL Sensor
(both camera and laser cable).
Multiplexer in Robot Cabinet
Camera Port #1 Laser Port #1
Camera Port #2 Laser Port #2
Camera Port #3 Laser Port #3
Camera Port #4 Laser Port #4

Dip Switch Settings

Video Cable

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Establish communication

 Once you click on Vision setup you should see a


screen that looks like the following.
 Is will indication that you have established
communication and you are ready to program.

29
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

 The programming of the Fanuc IR vision system is also


similar to block wall, one block is set on top of the
other to complete the system programming.
Block #3: Vision Software and Robot TP program
1. Camera Calibration is assigned to Vision Process.
2. Geometric Pattern Match is taught.
3. Laser search area is taught.
4. Reference of part is taught.

Vision Process Tools Block #2: Vision Software and Robot TP program
Block #3 1. Camera Setup is assigned to Calibration Tool.
2. Teach standard calibration program.
3. Run robot to three calibration positions. Snap image at each
Camera Calibration Tools position.
Block #2 4. Software calculates a relationship between robot coordinate
system and 3DL field of view.

Camera Setup Tools


Block #1: Vision Software
Block #1
1. The Port number is assigned to the Camera.
2. Camera is defined as robot mounted or fixture mounted.
3. Default exposure value can be set.

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

 In the IR vision main setup screen all three of the setup


blocks (Main Setup Tools) can be see on the top left
hand corner.
 When any one to the Main Setup Tools (Blocks 1-3) are clicked on,
the right side of the screen will display the setup tools associated
with that at particular Main Setup Tool.

Block #2

31
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

 In the top menu bar of each of the setup tool screen


there are five buttons used to edit the tools in that Main
Setup Tool.
 The five buttons are Create New Tool, Open Tool, Copy Tool,
Delete Tool and Rename Tool.

32
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block # 2: Calibration Setup

1. Click Create New Camera Tool

33
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block # 2: Calibration Setup

2. Name Camera Tool

CAMERA1

34
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block # 2: Calibration Setup

3. Set Camera Parameters

35
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

1. Click Create New Calibration Tool

36
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

2. Name Calibration Tool

Sensor1

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

3. Set Calibration Parameters

Camera1

38
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Camera Setup

 In each of the tool setup screens there is a menu bar


that is common. The menu bar is used to manipulate
the image.
 From left to right these buttons are Continues Snap, Snap, Laser
On, Open Image, Save Image, Pointer, Pan, Zoom In, Zoom Out,
Zoom Box, Full Zoom, and Blue Cross Hairs

39
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Vision System Programming

 The programming of the Fanuc IR vision system is also


similar to block wall, one block is set on top of the
other to complete the system programming.
Block #3: Vision Software and Robot TP program
1. Camera Calibration is assigned to Vision Process.
2. Geometric Pattern Match is taught.
3. Laser search area is taught.
4. Reference of part is taught.

Vision Process Tools Block #2: Vision Software and Robot TP program
Block #3 1. Camera Setup is assigned to Calibration Tool.
2. Teach standard calibration program.
3. Run robot to three calibration positions. Snap image at each
Camera Calibration Tools position.
Block #2 4. Software calculates a relationship between robot coordinate
system and 3DL field of view.

Camera Setup Tools


Block #1: Vision Software
Block #1
1. The Port number is assigned to the Camera.
2. Camera is defined as robot mounted or fixture mounted.
3. Default exposure value can be set.

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #1: Functional Vision System

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup.
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Tool Frame for 3DL Senor

 Standard Uframe and Utool Setup


Fanuc IR User Frames
Frame Number Name Descriptions
1 Null Frame Default base of robot
2 Application Frame 1 Work Object #1
3 Application Frame 2 Work Object #2
4 Application Frame 3 Work Object #3
5 Application Frame 4 Work Object #4
6 Application Frame 5 Work Object #5
7 Application Frame 6 Work Object #6
8 Cal Plate 3DL calibration plate
9 Spare Spare

Fanuc IR User Tools


Tool Number Name Descriptions
1 Null Tool Default faceplate of robot
2 EOAT #1 Standard GM tool #1
3 EOAT #2 Standard GM tool #2
4 EOAT #3 Standard GM tool #3
5 EOAT #4 Standard GM tool #4
6 Spare Spare
7 3DL #1 3DL Sensor #1
8 3DL #2 3DL Sensor #2
9 Spare Spare
10 Pointer EOAT pointer
42
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Tool Frame for 3DL Senor

Tool Frame for 3DL Sensor #1


Utool [7]

43
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Tool Frame for 3DL Senor

 Jog the Robot to the Calibration Plate and


align the 3DL sensor to grid plate

-90˚

400 mm

X Vector Y Vector
44
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Tool Frame for 3DL Senor

1. In the calibration menu, turn on continues snap, laser on, and the blue cross hairs.
2. Jog the robot towards or away from the grid plate to align the intersection of the
laser lines with the blue vertical cross hair.
3. Jog the robot side to side and up and down to center the laser intersection on the
center circle.
4. Zoom in to fine tune the two above movements.
5. This position will be the Approach Point #1 and the Orient Origin Point for Utool
#7.
SETUP Frames
Tool Frame Setup/ Six Point
Frame Number: 7
X: 0.0 Y: 0.0 Z:
0.0
W: 0.0 P: 0.0 R:
0.0
Comment: 3DL Sensor #1
Approach point 1: UNINIT
Approach point 2: UNINIT
Approach point 3: UNINIT
Orient Origan Point: UNINIT
X Direction Point: UNINIT
Z Direction Point: UNINIT
Active TOOL $MNUTOOLNUM[1]=1

45
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Tool Frame for 3DL Senor

1. In the calibration menu, turn on continues snap, laser on, and the blue cross hairs.
2. Jog the robot and rotate the End of Arm Tool (EOAT) about Y at least 30 degrees and about
X at least 20 degrees.
3. Jog the robot towards or away from the grid plate to align the intersection of the laser lines
with the blue vertical cross hair.
4. Jog the robot side to side and up and down to center the laser intersection on the center
circle.
5. Zoom in to fine tune the two above movements.
6. Record this position will be the Approach Point #2.
7. Jog the robot and rotate the End of Arm Tool (EOAT) about Y at least -80 degrees, about X
at least -20 degrees, and 20 degrees about Z.
8. Repeat steps 3 to 5.
9. Record this position as Approach Point #3
SETUP Frames
Tool Frame Setup/ Six Point
Frame Number: 7
X: 0.0 Y: 0.0 Z:
0.0
W: 0.0 P: 0.0 R:
0.0
Comment: 3DL Sensor #1
Approach point 1: UNINIT
Approach point 2: UNINIT
Approach point 3: UNINIT
Orient Origan Point: UNINIT
X Direction Point: UNINIT
Z Direction Point: UNINIT
Active TOOL $MNUTOOLNUM[1]=1

46
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Tool Frame for 3DL Senor

1. Move to Orient Origin Point.


2. From the Vector directions on the calibration grid determine what directions the
robot must be moved in to teach X Direction Point and Z direction Point. If possible
always use world coordinates to jog robot.
3. Jog in the direction of X and record the X Direction point.
4. Move back to Orient Origin Point.
5. Jog in the direction of Z and record the Z direction point.
Y

Use the right hand rule, +Z is perpendicular from grid plate surface. 47
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #2: Functional Vision System

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup.
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: User Frame for Calibration Plate

 There are three User Frames used in a


basic 3D vision system.
 World Frame: Null frame of robot.
 Application Frame: Work piece frame that the robot uses when
caring out a task (Loading Rack).
 Calibration Grid Frame: Frame set to the calibration grid

Y
Y
X
X

World Frame Application Frame Calibration Frame


49
Rev: 1A 49
Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: User Frame for Calibration Plate

 In the following Photo the yellow dot indicates were the Orient
Origin Point is to be located. The green dot indicates where the X
direction point is to be located. The blue dot is where the Y
direction is to be located. Finally, the red dot indicates where the
System Origin point is to be located.
 Utool #7 will be used to locate this positions on the grid plate.
 Before exiting Utool #7 setup, move to the Orient Origin Point.
 Then activate Utool #7.

50
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Active UFRAME/RTCP $MNUFRAMNUM[1]=1

Module #2 : 3D Vision Setup


PTM Page Block #3: User Frame for Calibration Plate

 With the robot position at the System Orient Origin Point (red dot) of the
3DL TCP, the image from the 3DL sensor should look similar to the
following. The laser cross hairs will be centered on the center circle of the
grid plate.
 Activate Utool #7.
 Record this position as the System Origin for Uframe # 8.

SETUP Frames
User/RTCP Setup/ Four Point
Frame Number: 2
X: 0.0 Y: 0.0 Z:
0.0
W: 0.0 P: 0.0 R:
0.0
Comment: GMX 350 Body Frame
Orient Origin Point: UNINIT
X Direction Point: UNINIT
Y Direction Point: UNINIT
System Origin: UNINIT

51
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: User Frame for Calibration Plate

1. With Utool #7 active, jog the robot in tool coordinates to align the laser
cross hairs with the Orient Origin Point (Yellow Dot).
2. Jog the robot towards or away from the grid plate to align the intersection
of the laser lines with the blue vertical cross hair.
3. Jog the robot side to side and up and down to center the laser intersection
on the circle.
4. Zoom in to fine tune the two above movements.
5. Record this position will be the Orient Origin Point.

SETUP Frames
User/RTCP Setup/ Four Point
Frame Number: 2
X: 0.0 Y: 0.0 Z:
0.0
W: 0.0 P: 0.0 R:
0.0
Comment: GMX 350 Body Frame
Orient Origin Point: UNINIT
X Direction Point: UNINIT
Y Direction Point: UNINIT
System Origin: UNINIT

52
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: User Frame for Calibration Plate

1. With Utool #7 active, jog the robot in tool coordinates to align the laser
cross hairs with the X Direction Point (Green Dot).
2. Jog the robot towards or away from the grid plate to align the intersection
of the laser lines with the blue vertical cross hair.
3. Jog the robot side to side and up and down to center the laser intersection
on the circle.
4. Zoom in to fine tune the two above movements.
5. Record this position will be the X direction.

SETUP Frames
User/RTCP Setup/ Four Point
Frame Number: 2
X: 0.0 Y: 0.0 Z:
0.0
W: 0.0 P: 0.0 R:
0.0
Comment: GMX 350 Body Frame
Orient Origin Point: UNINIT
X Direction Point: UNINIT
Y Direction Point: UNINIT
System Origin: UNINIT

53
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: User Frame for Calibration Plate

1. With Utool #7 active, jog the robot in tool coordinates to align the laser
cross hairs with the Y Direction Point (Blue Dot).
2. Jog the robot towards or away from the grid plate to align the intersection
of the laser lines with the blue vertical cross hair.
3. Jog the robot side to side and up and down to center the laser intersection
on the circle.
4. Zoom in to fine tune the two above movements.
5. Record this position will be the Y Direction.

SETUP Frames
User/RTCP Setup/ Four Point
Frame Number: 2
X: 0.0 Y: 0.0 Z:
0.0
W: 0.0 P: 0.0 R:
0.0
Comment: GMX 350 Body Frame
Orient Origin Point: UNINIT
X Direction Point: UNINIT
Y Direction Point: UNINIT
System Origin: UNINIT

54
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: Functional Vision System

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup.
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: Functional Vision System

Robot Work

56
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 Standard 3DL calibration TP program


Program CAL_3DL_SEN1
1: UFRAME_NUM=8 ;
Using Uframe #8 (Calibration Grid) and Utool #7 (3DL Sensor #1)
2: UTOOL_NUM=7 ;
3: ;
4:J P[1] 25% CNT100 ;
5:J P[2] 25% CNT90 ;
6: ;
7: Release Part ; Open Shutter
8: ;
Sensor #1 fixture position PR[13]. This is the position that locates
9:L PR[13:SENSOR1 FIX POS] 500mm/sec FINE ;
the center of the calibrated cube. With Uframe #8 and Utool #7
10: PAUSE ; the positional data for this will be all zeros.( X=0, Y=0, Z=0, W=0,
11: ; P=0, R=0)
12:L P[3] 500mm/sec FINE INC ; Incremental position for plane #1. This position moves a specific amount for the
13: PAUSE ; current position. P[3} will move -50 mm in the Z direction from the fixture
14: ; position.

15:L P[4] 500mm/sec FINE INC ;


Incremental position for plane #2. This position moves a specific amount for the
16: PAUSE ; current position. P[3} will move +100 mm in the Z direction from the fixture
17: ; position.
18: Grip Part(1) ; Close Shutter
19:J P[5] 25% CNT100 ;
20:J P[6] 25% CNT100 ;
21: MOV_HOME ;

57
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 Execute Cal_3DL_CAM1 until the first pause instruction. This will position
the robot in front of the grid plate at the Fixture of Status Position.
 Snap a image with laser on and the image should have the laser cross
hairs centered on the center circle and intersecting the vertical blue line. If
this is not the case there is an error in the Uframe or Utool.

STATUS OF FIXTURE POSITION


 Standoff of 3DL sensor is such that the laser intersect is aligned with the
vertical blue cross hair (Z vector in calibration plate coordinate system).
The laser intersect is aligned with the center if the center circle on the grid
plate (X and Y vectors in calibration plate coordinate system). 58
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 Complete the parameter settings in the


calibration for Sensor1.

59
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 Execute Cal_3DL_CAM1 until the second pause instruction. This will


position the robot in front of the grid plate at the 1st Plane Position (-
50mm from fixture position).
 Click Snap and Find
 Box in as may of the circles possible and click ok.

60
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 Execute Cal_3DL_CAM1 until the third pause instruction. This will position
the robot in front of the grid plate at the 2st Plane Position (+50mm from
fixture position).
 Click Snap and Find
 Box in as may of the circles possible and click ok.
 Once complete click Save and then Close.

61
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 The programming of the Fanuc IR vision system is also


similar to block wall, one block is set on top of the
other to complete the system programming.
Block #3: Vision Software and Robot TP program
1. Camera Calibration is assigned to Vision Process.
2. Geometric Pattern Match is taught.
3. Laser search area is taught.
4. Reference of part is taught.

Vision Process Tools Block #2: Vision Software and Robot TP program
Block #3 1. Camera Setup is assigned to Calibration Tool.
2. Teach standard calibration program.
3. Run robot to three calibration positions. Snap image at each
Camera Calibration Tools position.
Block #2 4. Software calculates a relationship between robot coordinate
system and 3DL field of view.

Camera Setup Tools


Block #1: Vision Software
Block #1
1. The Port number is assigned to the Camera.
2. Camera is defined as robot mounted or fixture mounted.
3. Default exposure value can be set.

62
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #4: Calibrate 3DL Sensor

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup. 63
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Vision Process

 There are two types of 3D vision processes. The type


of processes is dictated by the size of the work piece
and by the accuracy required.
1. 3D Single View
 If the work piece is small and the features to be used can be viewed from one
image.
 Single image is used to calculate offset.

2. 3D Multi View
 If the work piece is to large and the features to be used can not be viewed
from one image.
 Required accuracy is small (under 1mm) and the work piece is large.
 May be two cameras with one view or one camera with multiple views.
 Multiple images are used to calculate offset.

3D Single View 3D Multi View 64


Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Vision Process

 There are two type of offsets that can be applied to the robot.
 User Frame Offset: This offset is applied to the application frame in
a TP program. The application frame is the frame that is active
when the robot is executing a task. This offset is used to correct a
complete robot path of a work object.
 Tool Frame Offset: This offset is applied to the tool frame in a TP
program. This offset is used to correct the position of a part in the
robot tooling.

Utool [2]: Tool offset is


applied here.
Uframe [2]: Frame offset is
applied here.
Y

X
X
Z

Y
Z

65
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process
Program CHK_CAL_SEN1
1: UFRAME_NUM=8 ;
2: UTOOL_NUM=7 ;
Using Uframe #8 (Calibration Grid) and Utool #7 (3DL Sensor #1)
3: ;
4: Release Part (1);
Open Shutter
5: ; These three instructions are the standard vision instructions. “RUN FIND”
6:L PR[13:FIX POS SENSER 1] 500mm/sec FINE ; executes the vision process and loads the data into internal memory.
7: ; “GET OFFSET” transfers the data for the vision process from the internal
8: LBL[2] ;
memory into the Vision Register (VR[#]). IF there is no data in the internal
9: WAIT 2.00(sec) ;
10: VISION RUN_FIND 'CHK_SEN1' ;
memory the instruction will jump to the label that is indicated in the
11: VISION GET_OFFSET 'CHK_SEN1' VR[1] JMP LBL[15] ; instruction. This jump label is the method of executing fault recovery. If
12: PR[10]=VR[1].OFFSET ; the vision process was successful the offset data is transferred from the
13: ; Vision Register to a Position Register.
14: CALL CHKOFFST(10,.25,.25,.25,.1) ;
15: IF R[142:OFFSET PASSED]<>1,JMP LBL[15] ;
16: ;
CHKOFFST is a program that will test the offset data to make sure that it
17: Prompt Box Msg('3DL CAL OK') ; falls within the set limits. There are five arguments that are passed onto
18: ; the program CHKOFFST. These arguments are tied to the call instruction
19: Grip Part(1) ; and are allocated 1 through 5, left to right.
20: ;
21: MOV_HOME ;
1= 10: Position Register to be tested.
22: END ; 2= .25: The +/- mm limit of the X value.
23: ;
24: LBL[15] ;
3= .25: The +/- mm limit of the Y value.
25: Prompt Box Msg('3DL CAL NOT OK') ; 4= .25: The +/- mm limit of the Z value.
26: LBL[18] ;
27: List Menu('CAL TOUCHUP',144,1) ;
5= .10: The +/- degrees limit of the W,P, and R.
28: SELECT R[144:OP MENU]=1,JMP LBL[16] ;
29: =2,JMP LBL[17] ;
30: JMP LBL[15] ;
31: ;
32: LBL[16] ;
33: PAUSE ;
34: ;
35: !MANUALLY JOG ROBOT INTO ;
36: !STATUS OF FIXTURE POSITION ;
37: ;
38: ; 66
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Create Vision Process

67
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Name Vision Process

CHK_SEN1

68
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Set Vision Process Parameters

69
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Train Geometric Pattern Match Tool

70
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Set Parameters for GPM

3
1

71
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Set Laser Search Window and Parameters

72
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

Set Reference Position

4
2

73
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Calibration Validation Vision Process

• Execute CHK_CAL_SEN1 TP program


and test CHK_SEN1 vision process.
• If all correct the program will indicate
calibration is within tolerance. 74
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: Functional Vision System

Robot Work

75
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

 Jog the robot so that the camera is positioned over the feature of
the part.
 Center the feature in the field of view.
 If possible square the camera to the feature and position the
camera so that the top of the image is aligned with the top of the
feature. This makes it more intuitive for the operator.

76
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Create Production Vision Process

77
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Name Vision Process

1
2

78
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Enter Vision Process Program

79
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Set Parameters in Root Director

1
2

80
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Set Parameters in Root Director Continued

12

81
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Set Parameters in Root Director Continued

13

82
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Programming of GPM Locate Tool

83
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Programming of 3DL Plane Command Tool

84
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

Setting Reference Position

85
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

 The programming of the Fanuc IR vision system is also


similar to block wall, one block is set on top of the
other to complete the system programming.
Block #3: Vision Software and Robot TP program
1. Camera Calibration is assigned to Vision Process.
2. Geometric Pattern Match is taught.
3. Laser search area is taught.
4. Reference of part is taught.

Vision Process Tools Block #2: Vision Software and Robot TP program
Block #3 1. Camera Setup is assigned to Calibration Tool.
2. Teach standard calibration program.
3. Run robot to three calibration positions. Snap image at each
Camera Calibration Tools position.
Block #2 4. Software calculates a relationship between robot coordinate
system and 3DL field of view.

Camera Setup Tools


Block #1: Vision Software
Block #1
1. The Port number is assigned to the Camera.
2. Camera is defined as robot mounted or fixture mounted.
3. Default exposure value can be set.

86
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup. 87
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #3: Functional Vision System

Robot Work

88
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 Flow chart of 3D Vision Material Handling


Style01 Style01: Main Program that is initialized from the PLC

Pounce: Motion program, robot moves from home to


Call
Pounce pounce position

S01Pick: Robot moves to pose position and calls the TP


program VIS_3DL. In VIS_3DL the vision process is
Call
VIS_3DL
executed and a offsets is calculated. If a fault occurs, fault
S01PICK recovery code is executed. Once VIS_3DL is complete
there is a valid offset loaded into PR[10]. PR[10] is used in
S01Pick to offset the rest of path to pickup the part.

Call
S01PROC1: This program is where the welding is
S01DROP executed. The welding parameters are set and the path
with the vision offset is executed.

Move Home Move Home: The robot moves home and home I/O macro
is executed.
89
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 S01_PICK (Cassette Unload)


1: UFRAME_NUM=2 ; Active the user frame for the fixture of the part to be picked up.
2: UTOOL_NUM=7 ; Active the user tool for the 3DL sensor to be used.
3: ;
Move to pose position for the corresponding vision process.
4:J P[1] 100% FINE ;
5: ;
6: CALL VIS_3DLC(1) ; Call VIS_3DL TP program with the Vision Process ID number.
7: ;
8: UTOOL_NUM=2 ; Active the user tool for the ease of programming the pickup path of the part.
9: ;
10:L P[2] 1500mm/sec CNT10 Offset,PR[10:3D OFFSET] ; Move into pickup position with the help of the Offset that
11:L P[3] 500mm/sec FINE Offset,PR[10:3D OFFSET] ; is located in Position Register #10.
12:L P[4] 50mm/sec FINE Offset,PR[10:3D OFFSET] ;
13: GRIPPART(1) ; Close clamps and grip part.
14: ;
15:L P[5] 50mm/sec FINE Offset,PR[10:3D OFFSET] ; Move clear of tooling with part in EOAT, while using the
offset.
16:J P[6] 100% FINE ;
END

90
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

PLEASE NOTE: WHEN EVER


TOUCHING UP A POSITION WITH
AN OFFSET AGRUMENT, ALWAYS
ANSWER, YES, TO THE
QUESTION, “DO YOU WHAT TO
SUBTRACT THE OFFSET FROM
THE CURRENT POSITION”.

91
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL
1: !***************************** ;
2: ! Program to acquire the 3D offset ;
3: ! picking up a part ;
4: !***************************** ;
5: ;
6: !***************************** ;
7: ! Decide which 3D vision process ;
8: !***************************** ;
9: ;
The vision process ID is loaded into register #146.
10: R[146:3DL PROCESS]=AR[1] ;
11: ;
12: LBL[2] ;
13: R[136:RETRY COUNTER]=0 ; Retry counter is reset to zero for the start of the program.
14: LBL[1] ;
15: UTOOL_NUM=7 ; Active the user tool for the 3DL sensor to be used.
16: ;
17: ;
18: SELECT R[146:3DL PROCESS]=1,JMP LBL[21] ;
19: =2,JMP LBL[22] ; Register 146 is used to decide which 3DL vision process is
20: =3,JMP LBL[23] ; executed.

21: ELSE,JMP LBL[200] ;


22: ;

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL
23: LBL[21] ;
If process ID was equal to 1 then the program would
24: VISION RUN_FIND 'GMX350C' ;
jump to this code and execute the vision process
25: VISION GET_OFFSET 'GMX350C' VR[1] JMP LBL[90] ; GMX350C.
26: PR[10]=VR[1].OFFSET ;
27: JMP LBL[9] ;
28: ;
29: LBL[9] ;
30: ;
31: !******************************* ;
32: ! Check to see if 3D offset is out ;
33: !******************************* ;
CHKOFFST program is called to test offset against the
34: CALL CHKOFFST(10,75,75,75,15) ; limits in the arguments. If offset did not pass the program
35: IF R[142:OFFSET PASSED]<>1,JMP LBL[301] ; jumps to label 301 for fault recovery.
36: END ;
37: ;
38: !************* ; If the vision process was not successful the
program will jump to label 90 and start executing
39: !3DL FAULT RECOVERY ; this code. The robot will move in a square pad and
40: LBL[90] ; re-execute the vision process at each corner of the
41: R[136:RETRY COUNTER]=R[136:RETRY COUNTER]+1 ; square. If the vision process still is not successful
the program will fault out (label 97).
42: ;
43: IF R[136:RETRY COUNTER]>1,JMP LBL[92] ;
44:L P[1] 250mm/sec FINE INC ; Moves +25mm Y and +25mm Z, from current position.
First retry.
45: JMP LBL[91] ;
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL
46: ;
47: LBL[92] ;
48: IF R[136:RETRY COUNTER]>2,JMP LBL[93] ;
Moves -50mm Y and +0mm Z, from current position.
49:L P[2] 250mm/sec FINE INC ;
Second retry.
50: JMP LBL[91] ;
51: ;
52: LBL[93] ;
53: IF R[136:RETRY COUNTER]>3,JMP LBL[94] ; Moves 0mm Y and -50mm Z, from current position.
54:L P[3] 250mm/sec FINE INC ; Third retry.
55: JMP LBL[91] ;
56: ;
57: LBL[94] ;
58: IF R[136:RETRY COUNTER]>4,JMP LBL[95] ; Moves 50mm Y and 0mm Z, from current position.
Forth retry.
59:L P[4] 250mm/sec FINE INC ;
60: JMP LBL[91] ;
61: ;
62: LBL[95] ;
63: IF R[136:RETRY COUNTER]>5,JMP LBL[97] ; Moves -25mm Y and 25mm Z, from current position.
64:L P[5] 250mm/sec FINE INC ; Fifth retry.
65: JMP LBL[91] ;
66: ;
67: LBL[91] ;
68: JMP LBL[1] ;
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL
69: ;
70: LBL[97] ; Vision Process recovery code (LBL [97]).
71: R[136:RETRY COUNTER]=0 ;
User screen is cleared. Teach pendent screen is split
72: ;
in two. Image is displayed on right side and option
73: CALL USERCLR ; menu is displayed on left side. Operator chooses
74: CALL USERRTM ; option and program continues execution.
75: CALL IR_OPTN2(10,144) ;
There are three choices for the operator.
76: ;
77: SELECT R[144:OP MENU]=1,JMP LBL[2] ;
Re-try 3DL vision process
78: =2,JMP LBL[302] ;
Move Clear and Reset Fixture
79: =3,JMP LBL[303] ;
Return Home and abort
80: ELSE,JMP LBL[200] ;
81: ;
The operator enters in the number an the program
82: !************* ; jumps to label 2, 302, or 303 respectively.
83: LBL[301] ;
84: R[136:RETRY COUNTER]=0 ; Out of Tolerance recovery code (LBL [301]).
85: ;
86: CALL USERCLR ; User screen is cleared. Teach pendent screen is split
87: CALL USERRTM ; in two. Image is displayed on right side and option
88: CALL IR_OPTN3(3,10,144) ; menu is displayed on left side. Operator chooses
option and program continues execution.
89: ;

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL There are three choices for the operator.

Re-try 3DL vision process


90: SELECT R[144:OP MENU]=1,JMP LBL[2] ;
Move Clear and Reset Fixture
91: =2,JMP LBL[302] ;
Return Home and abort
92: =3,JMP LBL[303] ;
93: ELSE,JMP LBL[200] ;
The operator enters in the number an the program
94: ; jumps to label 2, 302, or 303 respectively.
95: !************* ;
96: LBL[302] ; Move Clear and Reset Fixture option (LBL [97]).
97: UFRAME_NUM=2 ;
98: UTOOL_NUM=2 ; Records current position.
99: PR[10:3D OFFSET]=LPOS ; Moves clear of tool or rack.
100:L P[7] 1500mm/sec FINE ;
Wait of continue from PLC
101: PAUSE ;
102:L PR[10:3D OFFSET] 1500mm/sec FINE ; Moves back to pose position.
103: JMP LBL[2] ;
104: ;
105: !************* ;
106: LBL[303] ; Move Home and Abort Execution option (LBL [303]).
107: UFRAME_NUM=2 ;
108: UTOOL_NUM=2 ; Moves clear of tool or rack.
109:J P[6] 80% FINE ;
Move Home
110: MOV_HOME ;
111: ABORT ; Abort Program execution.

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL
112: ;
113: !************* ;
114: !INVALID 3DL PROCESS ;
115: LBL[200] ; If the vision process ID is invalid the program will
execute this code.
116: Prompt Box Msg(21) ;
117: UALM[71] ;
END

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 VIS_3DL
112: ;
113: !************* ;
114: !INVALID 3DL PROCESS ;
115: LBL[200] ; If the vision process ID is invalid the program will
execute this code.
116: Prompt Box Msg(21) ;
117: UALM[71] ;
END

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 S01_PICK (Rack Unload)


1: UFRAME_NUM=3 ; Active the user frame for the rack of the part to be picked up.
2: UTOOL_NUM=7 ; Active the user tool for the 3DL sensor to be used.
3: ;
4: IF R[130:CHK RACK STATUS]=0,JMP LBL[1] ; If there is a new rack introduced in the system or the
5: PR[17:CURRENT POSITION]=PR[15:START POSITION] ; Check Rack Status Register is set the Current
6: R[130:CHK RACK STATUS]=0 ; Position is loaded with the Start Position.
7: LBL[1] ;
8: ;
9: ;
10: WAIT DI[266]=ON ; This instruction will check to make sure the course photo eye is functioning.
11: ;
Move to the Start Position. This position will be clear and
12:L PR[15:START POSITION] 800mm/sec CNT50 ;
outside the rack.
13: ;
14:L PR[17:CURRENT POSITION] 800mm/sec FINE ; Move to the current position. This will be the position of
the last part located.
15: ;
16: SKIP CONDITION DI[266]=OFF ; Setup the skip condition for the photo eye that will locate the
17: ; next part to be unloaded.

18:L PR[16:END POSITION] 50mm/sec FINE Skip,LBL[15] ; Move towards the back of the rack, while monitoring the
19: ; photo eye for the change in state. If the position is
reached the program will jump to label 15. When the
photo changes from On to the Off state, the execution of
the End Position is aborted.
99
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #6: Teach TP Program to Use Vision Process

 S01_PICK (Rack Unload)


Once the execution of the end of rack position is aborted, the current
20: PR[17:CURRENT POSITION]=LPOS ; position of the robot is recorded into Position Register #17. This position
is used for the next cycle.
21: ;
22: CALL VIS_3DLR(1) ; VIS_3DLR is called and the Vision Process ID is passed along.
23: ;
Move to the pose position with the 3D offset that was
24:L P[1] 250mm/sec FINE Offset,PR[10:3D OFFSET] ; calculate in Vis_3DLR.
25: ;
26: CALL VIS_3DLR(1) ; VIS_3DLR is called and the Vision Process ID is passed along.
27: ;
28: UTOOL_NUM=2 ; Active the user tool for the ease of programming the pickup path of the part.

29: ;
30:L P[2] 1500mm/sec CNT10 Offset,PR[10:3D OFFSET] ; Move into pickup position with the help of the Offset that
31:L P[3] 500mm/sec FINE Offset,PR[10:3D OFFSET] ; is located in Position Register #10.
32:L P[4] 50mm/sec FINE Offset,PR[10:3D OFFSET] ;
33: GRIP_PART(1) ; Close clamps and grip part.
34: ;
Move clear of tooling with part in EOAT, while using the
35:L P[5] 50mm/sec FINE Offset,PR[10:3D OFFSET] ; offset.
36:J P[6] 100% FINE ;
37: PR[17,1:CURRENT POSITION]=PR[17,1:CURRENT POSITION]+500 ; Increment the X value of Position Register
END for the next cycle.

100
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #2 : 3D Vision Setup
PTM Page Block #5: Teaching Production Vision Process

 The setup of the 3D vision system is like a block wall. One block supports
the one above to construct a complete wall.
Block #6: Teach Pendent
Block #6: Teach TP 1. Use vision TP instructions and program the execution of the
Program to use vision process and error recovery.
Vision Processes to
Block #5: PC computer and Teach Pendent
obtain an offset.
1. Choose the appropriate vision process and teach the vision
Functional Vision System

Block #5:Teach Vision process to achieve the position of the work piece.
Process using the
Calibration of the 3DL Block #4: PC computer and Teach Pendent
Sensor 1. Using the standard calibration TP program, teach the
calibration for the 3DL sensor .
Block #4: Calibrate 2. This will be taught in reference to the application user frame.
3DL Sensor using
Grid Plate User Block # 3: PC computer and Teach Pendent
Frame. 1. Use 3DL tool frame, with the four point method and teach a
user frame to the center circle on the calibration grid plate
Block #3: Teach User
Frame of Calibration Block # 2: PC computer and Teach Pendent
Grid Plate using 3DL 1. Use the six point method to teach the Tool Frame for the 3DL
Tool Frame. sensor. The origin of the frame will be at the intersection of
the laser cross hairs.
Block #2:Teach User
Tool Frame for 3DL 2. The calibration plate will be used for a reference position.
Senor. Block #1: PC computer and Teach Pendent
1. Establish Ethernet communication and down load vision
Block #1: Establish controllers if required.
communication and 2. Setup camera configuration and start a camera calibration
configure camera setup. 101
Rev: 1A setup Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3D Vision
PTM Page Maintenance: Fault Recovery
 Fault Recovery will use a Karel PC file to display options and an
image for the operate.
 There are two types of faults that call occur.
 Vision Process Fault: this will occur when the vision process cannot successful be executed. Some of
the reasons for this could be: object covering feature, feature falls out of field of view, and feature
is distorted and doesn’t resemble trained feature.
 Tolerance Fault: this will occur when the calculated offset is outside of the programmed limits.
Some of the reasons for this could be: limits are not large enough for process variation, object has
moved outside of process variation, and feature is distorted and calculated offset is large then
normal.
 This Karel code will split the screen into two with the options for the operator
on the left side and the failed image on the right side.
 There will be a maximum of three choices to choose from.
 The options are configurable in the Karel Variables.

102
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3D Vision
PTM Page Maintenance

 If there are no collisions between the robot and the


cameras there is virtually no maintenance with the
vision system.
 The only thing that will have to be done on a regular bases is to clean
the glass of the camera enclosure.
 This can be done by using the safety glass wipes that is available
in most cribs.
 IF vision system offset seems to be not accurate the
CHK_CAL_SEN# program can be used to verify correct
camera alignment and correct camera calibration.

103
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 If there is a collisions between the robot and the


cameras the following are the step that must be taken
to get the system back up and running:
1. Complete all mechanical installation requirements.
2. Double check to make sure the correct lens and filter is install on camera.
3. Set the aperture and focus to match the lens that was on the damaged camera.
4. Re-connect the Camera cable. Make sure the power to the robot is off. If this is done with the
power on there is a chance that the 3DL sensor is damaged.
5. Use the Fanuc Web Serve and bring up the Calibration Tool associated to the camera to be re-
calibrated.
6. From the teach pendent, execute CHK_CAL_SEN# in manual.
7. If calibration is within tolerance, the camera is correctly aimed and the complete weld process
should be verified in manual.
8. If the calibration is not within tolerance following instruction on teach pendent.
9. Uses the calibration screen and manually jog the robot into the Status of Fixture position. (Laser
intersection aligned with the vertical blue line and with the center of the laser intersection aligned
with the center of the center circle on the grid plate.)
10. Execute the Auto TCP portion of the CHK_CAL_SEN# program.
11. Select Auto calibration from menu.
12. Once calibration is complete and the calibration is within tolerance the robot will return home.
13. Verify system functionality by manually executing the complete weld process.

104
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 IF CHK_CAL SEN# is executed and the calibration is


with tolerance the following two screen will appear on
the teach pendent.

Indicating Calibration is within tolerance Execution Complete

Note: Position of Laser Lines. Centered in the screen and centered on


the center circle.
105
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 IF CHK_CAL SEN# is executed and the calibration is not


within tolerance the following screens will appear on the
teach pendent in sequential order.

Indicating Calibration is not within tolerance Chose Menu is Displayed for Operator

Note - 1: Automatically re-teaches TCP for 3DL Sensor#.


2: Automatically re-calibrates 3DL Sensor.
3: Aborts Calibration and returns home.
106
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 CHK_CAL SEN# continue

107
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 CHK_CAL SEN# continue

STATUS OF FIXTURE POSITION


 Standoff of 3DL sensor is such that the laser intersect is aligned with the
vertical blue cross hair (Z vector in calibration plate coordinate system).
The laser intersect is aligned with the center if the center circle on the grid
plate (X and Y vectors in calibration plate coordinate system).
108
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 CHK_CAL SEN# continue

Asks if the Robot is positioned in the Status Chose Menu is Displayed for Operator
of Fixture Position

109
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

 CHK_CAL SEN# continue

Re- Calibrates Sensor #1 and Verifies the


Calibration is Within Tolerance Execution Complete

NOTE:STATUS OF FIXTURE POSITION


 Laser intersect is aligned with the vertical blue cross
hair.
Laser intersect is aligned with the center if the center
circle on the grid plate.
110
Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved
Module #3 : 3DL Vision
PTM Page Maintenance: Replace and Calibrate Camera

Note:
 ONCE THE SENSOR IS RE-CALIBRATED,
VALIDATE THE PATH PROGRAM.
 VALIDATION IS ACHIEVED BY EXECUTED
THE STYLE PROGRAM, CALCULATING AND
OFFSET AND MANUALLY STEPPING THROUGH
THE PATH PROGRAM.

Rev: 1A Fanuc IR Vision Training Copyright 2007. General Motors Corporation. All Rights Reserved

You might also like