0% found this document useful (0 votes)
548 views

Fanuc Robot Training Lab

The document provides instructions for programming an industrial robot to pick up pepperoni pieces from a stack and place them on a pizza. It includes: 1) Three motion programs - Pick_Pepperoni to pick up a piece, Place_Pepperoni to place a piece, and Pepperoni_Bot as the main program. 2) Details on setting up tool and user frames to define the robot coordinate system. 3) An overview of the position registers and variables needed to track the stack height, pizza placement locations, and number of pieces placed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
548 views

Fanuc Robot Training Lab

The document provides instructions for programming an industrial robot to pick up pepperoni pieces from a stack and place them on a pizza. It includes: 1) Three motion programs - Pick_Pepperoni to pick up a piece, Place_Pepperoni to place a piece, and Pepperoni_Bot as the main program. 2) Details on setting up tool and user frames to define the robot coordinate system. 3) An overview of the position registers and variables needed to track the stack height, pizza placement locations, and number of pieces placed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Planning Your Cell

Pepperoni Bot Motion Requirements Program Name


Novice Lab The robot will need to pick up a pepperoni piece
Pick_Pepperoni
from the pepperoni stack
Offsets, Loops, Calls
Industrial Robotics & The robot will need to place the pepperoni at
Place_Pepperoni
Automation the next available space on the pizza.
Written By Michael Eagan The robot will need to reconfigure the position
SUNY Erie Community College registers so the offsets reflect the reducing
Pepperoni_Bot
height of the pepperoni stack, as well as the
next location for placement on the pizza.

We have determined the main motion tasks required for the robot’s
function. This is picking up the pepperoni, and then placing the
pepperoni. These will be separate programs, to make our process
easier to manage and understand.

We have added a main program as well that will do all the math and set
up all the registers for us, before calling each of the motion programs.
Prerequisite Knowledge:
Frames:
 Safety
 Teach Pendant Navigation Frame
 Requirement
Jogging and Clearing Alarms Type Name
The robot
Creatingneed
will to know where the
Programs
center
 of the vacuum gripper tool is,
Motion Instructions Tool VacuumTool
relative to TCP.
 Tool and User Frame
The robot will need to know where the
 Non-Motion Instructions
pizza is placed to properly determine
User PizzaFrame
rows and columns for the intended
Required
pepperoni.Preliminary Setup:

 we
Since A will
stackbeof poker
using chipson
a tool representing
the robot, we will need to tell the robot
exactly pepperoni.
where the tool’s effective end is. Since we will be working

entirely Awithin
Box X, Y, and Z (no rotations needed) the tool frame 3-point
 Robot
method will suffice.
at HOMESetPosition
up your tool frame with the 3-point
method, name it VacuumTool, then change your selected frame to
the number of the frame you made.

*SHIFT+COORD, select Tool, type your tool frame number.

The pizza could be placed anywhere within the robot’s work envelope.
We need to create a user frame that is aligned with the first pizza we
will be teaching, so any new ones can simply be adjusted later. Again,
since we will just be working in X,Y,Z with no need of precision, you can
use the 3 point method for the user frame you create. Create your
user frame for the box. Use the name PizzaFrame. Make the Y axis
align with pepperoni rows and the X axis align with pepperoni columns.

Before you begin programming, change your coordinate system to


the user frame you created.

*SHIFT+COORD, select User, type your user frame number.

Just in case the robot was left in a state where it is locked by another
task, go ahead and hit FCTN and select Abort All.

This guide is intended to demonstrate and explain the use of position register offsets in the FANUC Robots Teach Pendant programs,
while reinforcing Loops, Counters, and Calls. All labs assume HandlingTool software.
Motion Program: Pick_Pepperoni

Point Description
A point above the stack, allowing for XY
P[1:Above_Stack] travel without interacting with the
stack.
P[2:At_Piece] A point touching the topmost piece.

Our first motion program will be Pick_Pepperoni. It includes the


instructions needed to go to the pepperoni stack and grab a piece.

While there only actually needs to be one point taught, as the


“Above_Stack” height could just be an offset of the “At_Piece” position,
it’s just simpler to use the two. We will have to organize our motion and
IO instructions to move above the stack, then move down to the current
height of the top pepperoni, turn the vacuum on, then move back
above the stack.

J P[1:Above_Stack] 100% FINE

L P[2:At_Piece] 100mm/s FINE Offset PR[17:Stack_Height]

RO[1:Vacuum] = ON

L P[1:Above_Stack] 100mm/s FINE

Note: The choice of motion types is important. The Joint motion to get
to the stack will ensure the robot can get from the stack to the pizza,
regardless of position. The linear moves down to/up from the stack
ensure the stack won’t be disturbed in the XY directions.

Motion Program: Place_Pepperoni

Point Description
This point is above, but not touching the pizza.
P[1:Above_Pizza] This allows XY motion without crashing into the
existing pepperoni pieces. Figure 15 mm above.

P[2:At_Pizza] This point is at the placement height.

Our other motion program is Place_Pepperoni. This will include all the
instructions required to deposit the pepperoni the robot is currently
holding (from the Pick_Pepperoni program) at the desired position on
the pizza.

We will be using the position register PR[18:Pizza] to offset our


destination positions. The contents of PR[18:Pizza] will be written ahead
of time in the Pepperoni_Bot program.

J P[1:Above_Pizza] 100% FINE OFFSET PR[18:Pizza]

L P[2:At_Pizza] 100mm/s FINE OFFSET PR[18:Pizza]

RO[1:Vacuum] = OFF

L P[1:Above_Pizza] 100mm/s FINE OFFSET PR[18:Pizza]


Main Program: Pepperoni_Bot - Setup

PR[17:Stack_Heigh
Keeps track of pepperoni stack height.
t]

Keeps track of where to place the next


PR[18:Pizza]
pepperoni piece on the pizza.

Keeps track of how many pieces have been


R[70:Row_Pieces]
placed in our current row.

Keeps track of how many rows we have


R[71:Row_Select]
placed on the pizza so far.

The beginning of your Pepperoni_Bot program should set registers and


IO you use to known values. Typically, this means setting them to zero,
but you can start at any number that makes sense to your program. In
this program, we will set everything up as zero and OFF.

PR[17:Stack_Height] = PR[17:Stack_Height] -
PR[17:Stack_Height]

PR[18:Pizza] = PR[18:Pizza] - PR[18:Pizza]

RO[1:Vacuum] = OFF

Note: You may not know all the registers and position registers you will
use in programs you create before you start writing them. This is fine,
as you can always add more to your setup section later. Keep track of
them on paper as you use new ones.

Additionally: The robot could be in any position when the program first
starts. Many of these positions could cause issue if care is not taken
before running. To ensure the trajectory of the first motion is always
consistent, we add an instruction to go home at the start:

J PR[1:Home] 100% FINE

The above instructions so far won’t be part of our main loop, so it will
only run through them once, when the program is first started.
Everything we want as part of the main loop will have to be below the
label chosen to mark the main loop’s beginning:

LBL [1:Loop]

The rest of this program will exist within the loop, except for our
program END and an instruction to go HOME.
Main Program: Pepperoni_Bot – Loop
Requirement Action
Pick Up a Pepperoni Call Pick_Pepperoni
Consider the stack is now
Reduce Z in PR[17:Stack_Height] by 3.3mm
lower
Place a Pepperoni Call Place_Pepperoni
Consider the next row
Add 45mm to the Y element of PR[18:Pizza]
position.
IF conditional to see if the Y element of
Check to see if the row is done
PR[18:Pizza] is now outside our pizza
Check to see if the pizza is IF conditional to see if the X element of
done (repeat if not) PR[18:Pizza] is now outside our pizza

This program exists to run the other programs and configure the offsets
for each loop. Since we taught the points for Pick_Pepperoni at the first
location, it will first run it with zero in the offset register:

CALL Pick_Pepperoni

Every time this is called, we need to reconfigure the offset register to


reflect that the stack is a bit lower now. We’ve chosen 3.3mm as the
height of the pepperoni because that’s the height of our poker chips, so
the stack is reduced in height by 3.3mm each time:

PR[17,3: Stack_Height] = PR[17,3: Stack_Height] – 3.3

Now it is time to place the pepperoni. Since nothing has yet been
written to PR[18:Pizza], nothing will be added to the placement position
and it will place it at our originally taught first position.

Call Place_Pepperoni

Every time this is called, we need to reconfigure the offset register to


reflect the next desired placement position. This is +45mm in the Y
axis.

PR[18,2: Pizza] = PR[18,2: Pizza] + 45

After it has placed 5 pepperonis, we don’t want it to place another in


that row or it will be outside the pizza crust, so we’ll add a conditional
to check the position and alternatively start a new row entirely. This
means starting from the original 0mm Y position but 45mm further in
the X axis

IF PR[18,2: Pizza] < 181 JMP LBL [2: SKIP]

PR[18,2: Pizza] = 0

PR[18,1: Pizza] = PR[18,1: Pizza] + 45

LBL [2: SKIP]

Now we have it making new rows every time one is finished, but there’s
nothing yet stopping it after it makes all 5 rows. We add another
conditional to check this and keep looping if it isn’t outside the limit we
set. Once it is outside this limit, it will go home and END.

IF PR[18,1: Pizza] < 181 JMP LBL [1:Loop]

J PR[1:HOME] 100% FINE

END

You might also like