Fanuc Robot Training Lab
Fanuc Robot Training Lab
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.
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.
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.
RO[1:Vacuum] = ON
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.
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.
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.
RO[1:Vacuum] = OFF
PR[17:Stack_Heigh
Keeps track of pepperoni stack height.
t]
PR[17:Stack_Height] = PR[17:Stack_Height] -
PR[17:Stack_Height]
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:
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
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
PR[18,2: Pizza] = 0
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.
END