Professional Documents
Culture Documents
FANUC's Standard Robot To PLC Programming (Version 4.0)
FANUC's Standard Robot To PLC Programming (Version 4.0)
PAN Projects
Robot to PLC Programming Standard
for
FANUC’s R30iB Controller
Robot To PLC Standard
Programming
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 2
Robot To PLC Standard
Programming
Contents
1. Introduction ................................................................................................................................. 5
2. Safety ......................................................................................................................................... 5
3. Robot Configuration .................................................................................................................... 6
4. IO Interface ................................................................................................................................. 7
5. Program Selection ...................................................................................................................... 8
5.1 Service Programs .................................................................................................................. 8
5.2 Service Positions................................................................................................................... 9
6. Command Programs................................................................................................................. 10
6.1 Work Areas In and Out ........................................................................................................ 10
6.1.1 Area In Request ............................................................................................................ 10
6.1.2 Area Out Release ......................................................................................................... 10
6.2 Collision Zones.................................................................................................................... 11
6.2.1 Collision Zone Request ................................................................................................. 11
6.2.2 Collision Zone Release ................................................................................................. 11
6.3 Job Done............................................................................................................................. 12
6.4 Tool Request ....................................................................................................................... 12
6.5 Set Tool Number ................................................................................................................. 12
6.6 Type Information Request ................................................................................................... 13
7. Initialisation Programs............................................................................................................... 14
7.1 Initialise Home..................................................................................................................... 14
7.2 Initialise Robot Sequence .................................................................................................... 14
7.3 Cycle Start........................................................................................................................... 15
7.4 Cycle End............................................................................................................................ 15
8. Integrator/End User Programs .................................................................................................. 16
8.1 User Initialisation ................................................................................................................. 16
8.2 User Reset .......................................................................................................................... 16
9. Collision Guard Levels .............................................................................................................. 17
10. Naming Conventions............................................................................................................... 18
10.1 Manufacturing Zones......................................................................................................... 18
10.2 Manufacturing Process Types ........................................................................................... 19
10.3 Manufacturing Tool Types ................................................................................................. 19
10.4 Product Model ................................................................................................................... 19
10.5 User Tool Naming (UTOOL) .............................................................................................. 20
10.5.1 Tools Supplied with Manufactures Identification.......................................................... 20
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 3
Robot To PLC Standard
Programming
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 4
Robot To PLC Standard
Programming
1. Introduction
This document only specifies the “Robot to PLC Programming Standard” within FANUC’s R30iB
Robot Controller with “EtherNetIP” bus communication.
It is only relevant for JLR PAN Project installations and should be used in conjunction with “JLR
BIW RobCAD Standard” documentation
The document should be read and fully understood by the end user before any commissioning and
or programming is started.
IF IN DOUBT ASK
2. Safety
The safety of people is always of primary importance in any situation. When applying safety
measures to your robotic system, consider the following:
• External devices
• Robot(s)
• Tooling
• Workpiece
• FANUC Corporation SYSTEM R-30iB and R-30iB Mate HandlingTool and LR HandlingTool
Setup and Operations Manual MAROBHT8203131E REV C
The Robot E-Stop out is wired into some Allen Bradley Safe Point I/O which is then monitored by
the Line PLC. The safety of the robot is all run over Ethernet I/P safe and utilises the Robots Safe
I/O connect feature. This can make logical decisions on Safe Inputs on whether to issue a robot E-
Stop or fence output.
All safety systems must be fully functional without any manual overrides to ensure the end
user is fully protected from all hazards.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 5
Robot To PLC Standard
Programming
3. Robot Configuration
There will be a standard package that will be loaded into all JLR Fanuc Robots as a standard, this
will include Standard Teach Pendant Programs, Macros, Condition Handlers, Karel Programs and
PMC
Standard Teach Pendant (TP) Programs:- These are stored in the TPP memory allocation
on the SRAM (non-volatile) memory of the Robot. TP programs are the routines the Robot
runs when in automatic to complete a task. These programs can also be setup with a Sub-
Type Macro or Condition Handler. The main TP program that is ran when the Robot is first
started is RSR0001 (Robot Service Request). This contains the “SELECT” statement which
selects the correct program to run depending on the program number supplied to the robot
via the PLC. Program numbers 1 to 99 are for product/style variants and can be added to
the “SELECT” statement by the integrator/end user as necessary, 100 to 127 are for
service programs. Service programs 100 to 116 are pre-defined and should not be changed
by the integrator/end user, 117 to 127 are free to use by the integrator/end user and can be
added to the “SELECT” Statement if required.
Karel Programs are loaded in to the Robot to conduct certain tasks that are unable to be
done in TP language. The code for these programs isn’t visible and the Integrator/End User
are unable to edit these without the source code. Karel programs can be called to run from
TP programs just in the same way as any other programs.
PMC (Programmable Machine Controller) is ladder logic that runs in the background of the
robot and is used to communicate with the PLC, TP Programs and third party equipment
around the cell. Fundamentally PMC is a PLC built into the robot controller as standard.
This has been written and proven by FANUC UK Ltd and MUST not be changed by the
Integrator/End User.
All Robots are configured with FANUC’s standard software package “SpotTool+”. “SpotTool+” was
developed with flexible production lines in mind, where it might be required for the same robot to
conduct different process’, such as:-
Spot Welding
Dispensing
Handling
By making “SpotTool+” the bases of all the JLR robots it allows the Integrator/End User make one
Robot capable of carryout 3 different process’. Then when a TP program is created the software
will ask for this particular TP program what kind of application will the robot be carrying out and it
sets itself up respectively.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 6
Robot To PLC Standard
Programming
4. IO Interface
The fieldbus communication is EtherNetIP and the robot is a slave to the PLC.
The integrator/end user MUST set the “Bus – EtherNet/IP Address” in accordance with the JLR
Standard and Controls Department allocation sheet. The “Bus - EtherNet/IP Subnet Mask”
(255.255.248.0) should NOT be changed by the integrator/end user and the “Bus - EtherNet/IP
Gateway” should be left blank (no values).
The interface is 512 bits in length and the first 384 bits (Digital Outputs/Inputs 1384) are
reserved for the JLR Standard and any pre-defined IO signals in the robot system MUST NOT be
changed by the integrator/end user. The last 128 bits (Digital Outputs/Inputs 385512) are free to
use by the integrator/end user but JLR Standards and Controls must be informed if and when
used.
Terminology:-
DO[..] – Digital Output
DI[..] – Digital Input
We also use Group Inputs (GI[..]) and Group Outputs (GO[..]) to communicate integers values
between the Robot and PLC. These are made up of a sequence of digital I/O signals. These are
interpreted as a binary integer.
If shared devices are to be used on a robot the IO from Digital Output/Inputs 384 to 511 (Free for
integrator/end user) will be used before any hardware needs to be added.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 7
Robot To PLC Standard
Programming
5. Program Selection
ALL program selection is done via a group input (GI[1:PROG NUMBER]) sent from the PLC, this
then calls the necessary program P01, P02 …P127 from the “RSR0001” TP (Teach Pendant),
using the SELECT statement in the main RSR0001 routine.
Terminology:-
RSR – Robot Service Request – Main Robot program that can be start via a remote device such
as the PLC
Valid product model programs are from P01 to P99 and should ALWAYS start with the robot at its
home position and ALWAYS end with the robot at its home position.
Valid service programs are from P100 to P127 and follow the same principle as above. The robot
will stop at the service position until the return to home is sent from the PLC.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 8
Robot To PLC Standard
Programming
All of these reference positions names can be changed by the Integrator/End User to match the
actual tool name that is being used. However when this is done the name must be altered where
ever else it is used within the robot, e.g. The Position Register (PR[..]) comment for the PR[..]
related to that tool or the I/O comment relating to the Digital Output (DO[..]) that is on when the
robot is at the reference position.
If the Reference Position needs to be changed/altered the Integrator/End User should Record the
new position in the relevant Position Register and also record the new position in the Reference
Position Data.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 9
Robot To PLC Standard
Programming
6. Command Programs
The command routines are used by the integrator/end user to sequence with the PLC, all the
command programs are contained within the FANUC R30iB controller. These programs should
not be altered by the integrator/end user. Appendix 1 shows an example RSR0001 which is
the main routine. Appendix 2 shows a standard program that is called from the RSR001.
The same Area Request program is used independent of which area is required. To do this an
argument, of integer type, is passed into the program and the value of this argument dictates which
Area will be requested. The second argument is used to indicate if it is possible for the robot to
return directly to home from the position at which it calls the Area. A 1 indicates that it is possible to
return home a 0 means it is unable to return home. Both these arguments should be filled in
whenever the program is sed. The integrator/end user can use this program wherever they deem
necessary and specify the number for the area they require. The Area In Request program will
error handle the value passed into it, therefore if the user enters an Area number which is out of
range an error will occur.
Example Program:-
! Area 1 Request
CALL AREA_IN_REQ(1,1)
CALL P01_ A_RSW01_010
The same Area Out Release program is used independent of which area is required to be
released. To do this it works in the same way to the Area In Request program, by using an
argument passed into the program to decide which area to release.
Example Program:-
! Area 1 Release
CALL AREA_OUT_REL(1)
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 10
Robot To PLC Standard
Programming
The same Collision Zone Request program is used independent of which Collision Zone is
required. To do this a argument, of integer type, is passed into the program and the value of this
argument dictates which Area will be requested. This argument value is then passed into the
Group Output (GO[]) so the PLC has this information. The integrator/end user can use this
program wherever they deem necessary and specify the number for the Zone they require. The
Collision Zone Request program will error handle the value passed into it, therefore if the user
enters an Area number which is out of range an error will occur.
Example Program:-
! Zone 1 Request
CALL COLL_ZONE_REQ(1)
The same Collision Zone Release program is used independent of which Zone is required to be
released. To do this it works in the same way to the Collision Zone Request program, by using an
argument passed into the program to decide which Zone to release.
Example Program:-
! Zone 1 Release
CALL COLL_ZONE_REL(1)
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 11
Robot To PLC Standard
Programming
The same Job Done program is used independent of which Job or Task has been completed. To
do this a argument, of integer type, is passed into the program and the value of this argument
dictates which Job or Task has been completed. The integrator/end user can use this program
wherever they deem necessary and specify the number for the Job or Task they require. The Job
Done program will error handle the value passed into it, therefore if the user enters an Job number
which is out of range an error will occur.
Example Program:-
! Job 1 Done
CALL JOB_DONE(1)
The same Tool Request program is used independent of which Tool movement is required. To do
this a argument, of integer type, is passed into the program and the value of this argument dictates
which Tool movement is requested. The integrator/end user can use this program wherever they
deem necessary and specify the number for the Tool Movement they require. The Tool Request
program will error handle the value passed into it, therefore if the user enters an Tool number
which is out of range an error will occur.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 12
Robot To PLC Standard
Programming
The type information request command is a Group Input (GI[3]) which will return a numeric
value which can range from 1 to 255 and is used to sequence decisions within the robot
process from the PLC. Within the Type Info Request program the value of GI[3] is written into
R[161]. This is because a GI cannot be used in a SELECT Statement but a Register can.
Example
CALL TYPE_INFO_REQ
SELECT R[161:Type Info] = 1,
CALL PROGA
= 2, CALL PROGB
= 3, CALL PROGC
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 13
Robot To PLC Standard
Programming
7. Initialisation Programs
The initialisation programs preform specific logic within the robot sequence and are TP programs
stored on the SRAM, which MUST NOT be changed by the integrator/end user.
“INITHOME” checks the robot is at its home position, initialises all the following IO commands
to their start state using the INITIO program, and clears all the collision zones for the robot.
The Integrator/End User can use the “INITHOME” program within their programs where required,
but should edit the “INITHOME” program itself.
“INITRS” sets the end of cycle to the PLC, once the PLC has sent the end of cycle the robot resets
all the job done commands to zero.
The integrator/end user should ensure that the initialise robot sequence is at the end of all
programs they add (Prog 1-99).
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 14
Robot To PLC Standard
Programming
“CYCLESTART” is used in the RSR0001 before the program select statement and is used to
request the next program number from the PLC. It then uses “PROGNUMCHK” to make sure that
the program number is within range.
Only used at start RSR0001 program and should NOT be used by integrator/end user.
Used at the end of the RSR0001 before going back to the top of the program and requesting a new
program number from the PLC. This program should not be used by the integrator\end user.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 15
Robot To PLC Standard
Programming
User reset is normally used at the end of the Programs 1 to 99 to reset any user specific IO signals
but it can also be used within other integrator/end user created programs if required.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 16
Robot To PLC Standard
Programming
The default settings for JLR are 100%, which is the standard settings for the robot.
The sensitivity values can be changed with the TP programs if required for certain operations such
as Tool change where the sensitivity may need to be lower. Then after the operation is complete
the sensitivity should be set back to default.
Example TP
The collision guard can also be turned completely off if required either via a TP command or via
the Collision Guard Setup page.
Example TP
COL DETECT ON
When the robot is started in Automatic mode it automatically switches collision guard back on to
protect the robot.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 17
Robot To PLC Standard
Programming
Some zones could be broken into smaller sub zones and other could have a Left/Right hand
derivatives.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 18
Robot To PLC Standard
Programming
For the material handling process the terminology to be used is “Pick” and “Drop”.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 19
Robot To PLC Standard
Programming
t_rrt_xxxxx
Manufactures Supplied Identification
Taken from Section 10.3 Manufacturing Tool Types (robot rivet)
Tool prefix
t_pnz_01
Equipment Number (starting at 01, second nozzle 02….for each tool type)
Taken from Section 10.3 Manufacturing Tool Types (pedestal nozzle)
Tool prefix
uf_fx18010_01
Fixture No. in Station (starting at 1, second fixture in station 2, etc)
Fixture (fx), Zone 18, Station 010
User Frame Prefix
uf_fx18010_01_01
Turn Table Position Number
Fixture Number in Station (starting at 1, second fixture in station 2 etc)
Fixture (fx), Zone 18, Station 010
User Frame Prefix
uf_rgr_01
Equipment Number (starting at 01, second gripper 02….for each tool type)
Taken from Section 10.3 Manufacturing Tool Types (robot gripper)
User Frame Prefix
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 20
Robot To PLC Standard
Programming
For naming format excluding Dispensing and Material Handling see “Appendix 1”, for Material
Handling see “Appendix 2” and for Dispensing see “Appendix 3”.
For dispensing the naming convention has been shorten but the full name should always be
commented above the “on” start position of each bead path.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 21
Robot To PLC Standard
Programming
Example: P01_a_DockOn_rsw01;
P01_b_rsw1_010_x260com;
P01_c_DockOff_rsw01;
P01_d_DockOn_rsw02;
P01_e_rsw2_020_x260lhd;
P01_f_rsw2_020_x260rhd;
P01_g_DockOff_rsw02;
Model Variant (com, lhd, rhd, fix, sun, lwb, swb, 3dr, 5dr)
Model
Station Number in which the operation is performed
Tool Number
Path Sequence Number
Program Selection Number within robot system
Examples: P01_a_rsw1_010_x260com;
P01_b_rsw1_020_x260lhd;
Model Variant (com, lhd, rhd, fix, sun, lwb, swb, 3dr, 5dr)
Model
Turn Table Position Number
Station Number in which the operation is performed
Tool Number
Path Sequence Number
Program Selection Number within robot system
Examples: P01_a_rsw1_010_01_x260com;
P01_b_rsw1_020_02_x260lhd;
Model Variant (com, lhd, rhd, fix, sun, lwb, swb, 3dr, 5dr)
Model
Tool Number
Path Sequence Number
Program Selection Number within robot system
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 22
Robot To PLC Standard
Programming
Examples: P01_a_psw01_x260com;
P01_b_psw02_x260lhd;
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 23
Robot To PLC Standard
Programming
The tools load can also be taken from “RobCAD” but MUST be verified with the robot internal
program “LoadIdentify”. If the tool load and the centre of gravity of the tool load are not correct the
robot will not move at its peak performance. It’s the integrators/end user’s responsibility to ensure
that the robot is not running over loaded.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 24
Robot To PLC Standard
Programming
SPR Guns
Dispensing Nozzle
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 25
Robot To PLC Standard
Programming
For grippers that are tools then the TCP should be on a location pin on the gripper, if there is
no location pin then a suitable alternative point on the gripper should be used.
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 26
Robot To PLC Standard
Programming
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 27
Robot To PLC Standard
Programming
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 28
Robot To PLC Standard
Programming
Unique Fixing
swd_fk72_4003com_2ul_01 Number within joint
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 29
Robot To PLC Standard
Programming
pick_010_01
adh_fk72_B4003com_ul_c2k
Variant Joint Type
Com = Common Tl = Twin Left
Lhd = Left Hand Drive Tr = Twin Right
Rhd = Right Hand Drive Ul = Unique Left
Fix = Fixed Roof Ur = Unique Right
Sun = Sun Roof Xc = Cross Car
Lwb = Long Wheel Base
Swb = Short Wheel Base
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 30
Robot To PLC Standard
Programming
adh_B4003com_on
Dispense Shortened (Intermediate) Position Naming
adh_B4003com_005_s1
Segment Number
(0-255)
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 31
Robot To PLC Standard
Programming
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 32
Robot To PLC Standard
Programming
Jaguar Land Rover : Robot to PLC Programming Standard for FANUC’s R30iB Controller 33