FANUC's Standard Spot Welding Programming (Version 2.0)
FANUC's Standard Spot Welding Programming (Version 2.0)
PAN Projects
Spot Welding Standard
for
FANUC’s R30iB Controller
Robot To Spot Welding
Programming
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 2
Robot To Spot Welding
Programming
Contents
1. Introduction ....................................................................................................................... 4
2. Safety................................................................................................................................ 4
3. Robot Configuration .......................................................................................................... 5
4. IO Interface ....................................................................................................................... 6
5. SpotTool Instructions ........................................................................................................ 8
5.1 SPOT Instruction ......................................................................................................... 8
5.11Start Distance (SD) & End Distance (ED)................................................................ 8
5.12 Pressure Schedule (P) ........................................................................................... 9
5.13 SPOT ID (S)........................................................................................................... 9
5.14 Example SPOT Command ..................................................................................... 9
5.2 SET_WELD_DATA...................................................................................................... 9
5.3 Pressure Motion Command ....................................................................................... 10
5.4 Thickness Check ....................................................................................................... 10
5.5 Errors and Fault Recovery......................................................................................... 11
5.51 Thickness Check Error ......................................................................................... 11
5.52 General Weld Fault .............................................................................................. 11
5.53 Auto Error Recovery............................................................................................. 12
6. Tip Dressing.................................................................................................................... 13
6.1 TIPDRESS_CONTROL ............................................................................................. 13
6.2 TOOL(No.)_TIP_DRESS ........................................................................................... 14
7.Tip Wear Compensation .................................................................................................. 15
8. Gun Resistance Calibration............................................................................................. 16
9. Manual Pressure Check.................................................................................................. 19
9.Programming ................................................................................................................... 21
Appendix 1 – Example Spot Program ................................................................................. 22
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 3
Robot To Spot Welding
Programming
1. Introduction
This document only specifies the “Robot Spot Welding Programming Standard” within
FANUC’s R30iB Controller with “EtherNetIP” bus communication.
It is only relevant for JLR PAN Project installations and should be used in conjunction with
“JLR PAN Robot to PLC 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
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 decision’s on Safe Inputs
on whether to issue a robot E-Stop or fence output.
Correct PPE must be worn when running the welding software in manual mode (whilst inside
the guard line), due to possible sparks or flash off caused by the weld process.
All tip dressing operations must be done from outside the guard line (safety gates must be
closed).
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 Spot Welding Standard for FANUC’s R30iB Controller 4
Robot To Spot Welding
Programming
3. Robot Configuration
Along with the standard package loaded into every JLR robot, as discussed in the ‘Robot to
PLC Standard Programming’ manual, every Spot Welding Robot will have another package
loaded into it. This will contain the following:
Spot Welding 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. All the Spot Welding
TP programs will have SPOT selected as their Application Process within the
‘Detail’ of the program (Program Detail explained later in the manual).
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. For Spot Welding all the ‘DEBUG_TEXT’ and ‘DCP_FAULTS’ are dealt
with within Karel Programs.
PMC (Programmable Machine Controller) is ladder logic that runs in the
background of the robot and is used to the 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.
As all the robots are configured with FANUC’s standard software package “SpotTool+” they
are able to be configured to do:-
Spot Welding
Dispensing
Handling
Any robot that is going to be used as a Spot Welding Robot has already been configured in a
Controlled Start as a SPOT robot. If the robot has been configured to be a SPOT Robot and
a Handling Robot you can Toggle between the 2 Application Tools by:-
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 5
Robot To Spot Welding
Programming
4. IO Interface
The fieldbus communication is EthernetIP and the robot acts as the master for the Bosch
Weld Timer and Controller.
The integrator/end user must set the IP address of the Bosch Controller and weld timer with
the EtherNetIP settings within the robot. This should be done in accordance with the JLR
Standard and Controls Department allocation Sheet. Follow the procedure below to set the
IP address for the Controller/Timer unit within Fanuc’s EtherNetIP settings:-
The interface for the Weld Controller is made up of 18 Bytes of Input Data and 4 Bytes of
Output Data, all these signals are pre-defined and should not be altered by the
integrator/End User. The interface for the Weld Timer is made up of 8 Bytes of Input Data
and 8 Bytes of Output Data, all these signals are pre-defined and should not be altered by
the integrator/End User.
Within the SpotTool+ software there are also some pre-defined digital IO groupings:-
Cell Interface
Weld Interface
Spot Config
Dispense
Cell interface is used as the generic signals with the cell that aren’t specific to one particular
process. These will be setup by FANUC UK and will not need modifying by the
integrator/end user.
Weld Interface is used for Spot Welding robots, digital IO signals can be entered here and
then the SPOT commands with the TP programs will have control over the IO.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 6
Robot To Spot Welding
Programming
The interface also interacts with the PLC via the Robots PMC so that the process is
monitored and decisions can be made as and when necessary.
PLC Inputs
DI[97: Weld ON]
DI[98: Tip Dress In Cycle Ped 1]
DI[99: Tip Dress In Cycle Ped 2]
DI[100: Mid Cyl Tip Cmb]
DI[103: First Dress]
DI[104: Reset Tip Dress Cntrs]
DI[105: Rst Weld Tmr Tip Counts]
DI[109: Water Off 1]
DI[110: Run Mill Motor 1]
DI[112: Tip Dress 1 Swing Arm Bck]
DI[113: Tip Dress 1 Swing Arm Fwd]
DI[114: Tip Dress 1 Swing Arm Intd]
DI[118: Water Off 2]
DI[119: Run Mill Motor 2]
DI[121:Tip Dress 2 Swing Arm Bck]
DI[122:Tip Dress 2 Swing Arm Fwd]
DI[123:Tip Dress 2 Swing Arm Intd]
DI[124:First Dress]
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 7
Robot To Spot Welding
Programming
5. SpotTool Instructions
The following instructions are specific to Spot Welding and will be what the integrator/end
user will be using when programming the robots. Other Programming instructions that are
standard to the FANUC controller can be found in the SpotTool+ Manual.
The robot is configured with a servo controlled spot welding gun therefore the following
instruction will be valid.
SD = Start Distance
P = Pressure Schedule
S = SPOT ID
ED = End Distance
For Start/End Distance and Pressure there are inbuilt Schedules within the robot that are
used within the SPOT Command. These can be found in the Data Menu inside the Fanuc
iPendant. The numbers that are entered into the SPOT Command will point at which
schedule needs to be used.
The value in the Start Distance (SD) and End Distance (ED) relate to the Distance
Schedule that is to be used on that SPOT. Distance schedules hold values in millimetres of
how far the each tip of the Gun should be away from the Part. The notation used for each tip
is GUN and Robot, where GUN is the moving tip of the Gun (How far the Gun needs to
move away from the part) and Robot is the static tip of the gun (how far the robot needs to
move away from the part). This motion is co-ordinated so the gun and robot move together
to achieved the required distances.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 8
Robot To Spot Welding
Programming
5.2 SET_WELD_DATA
The SET_WELD_DATA program needs to be called before every SPOT command. This
program is used to retrieve the Thickness and Pressure expected for the following SPOT
command from the Bosch Weld Controller. It then writes the thickness and pressure into
Pressure Schedule that will be used on the following SPOT.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 9
Robot To Spot Welding
Programming
The third argument is optional, if a value is used in the third argument the thickness
tolerance in the thickness check is altered to this amount. If this argument isn’t
used/specified then the robot uses the global thickness tolerance that can be specified in
Register 19 (R[19:Global Thk Tol]).
Example
CALL SET_WELD_DATA(1-151234567,1,2)
L P[1] 500mm/sec FINE SPOT[SD=1, P=1,S=151234567, ED=2]
In the Example above you can see that the Pressure schedule used in the argument for
SET_WELD_DATA matches the Pressure Schedule used in the following SPOT. Also the
Spot ID matches as well. In this example the third argument has been used and set to 2, this
means that the thickness tolerance that will be used on this spot will be 2mm
Example
PRESS_MOTN[SD=**,P=**] (SD=Start Distance, P=Pressure)
When this command is ran the gun will close the tips together to the pressure specified in
the requested pressure schedule, using the Start Distance schedule as the position the gun
drives to before activating the pressure.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 10
Robot To Spot Welding
Programming
The recovery for this fault and other examples can be found in section 5.5 Errors and Fault
Recovery.
Ignore:-
In this instance if ignore is selected the robot will initiate the weld again but it will temporally
disable the thickness checking just on this weld and then re-enable it afterwards. Therefore
with the thickness check disable the robot will try and weld as normal.
Retry:- In this instance the robot will try to weld again and re-detect the thickness, if the
thickness falls into tolerance the robot will weld otherwise the same DCP fault will be
displayed again.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 11
Robot To Spot Welding
Programming
Retry:-
The robot will initiate the weld again and wait for the weld complete. If it times-out again the
same screen will appear.
Ignore:-
In this instance the weld will be skipped, no attempt to weld this spot will be made.
For the welding it is setup to monitor for the following system alarms on the Robot:-
Up to 10 Monitored alarm codes can be used and FANUC can add more in if required. This
is not to be modified by the Integrator/End User.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 12
Robot To Spot Welding
Programming
6. Tip Dressing
The Tip Dressing is controlled via the Bosch Weld Controller, this keeps track of how many
welds the Gun has done since the last tip dress. The amount of welds between each tip
dress is set internally via the Bosh Software which will be the responsibility of Bosch and
JLR to setup.
Once the tip dress interval has been reach DI-[778] Tip Dress Request is turned on to the
Robot. This signal will be checked at the end of every weld program and if the signal is high
program ‘TIPDRESSS_CONTROL’ will be executed.
6.1 TIPDRESS_CONTROL
Used to interrogate the Weld Controller to find out which gun/electrode requires a tip
dress.
Program Name:- TIPDRESS_CONTROL
TP usage/notation:- CALL TIPDRESS_CONTROL
Associated I/O:- DO[779], DI[778]
Other Programs used:- GETWELDDATA(1-1234567,1) Argument 1 = Spot
ID/.Program No. Argument 2 = Pressure schedule to be used. In this case always 1.
Argument 3 = Thickness Tolerance for this Spot
The TIPDRESS_CONTROL program is called when the Bosch Controller is issuing DI-778
(Tip Dress Request) to the robot. The program then interrogates the weld controller to
determine which gun/electrode needs to be dressed.
First the Karel Program ‘GETWELDDATA’ is used to select program 1 in the weld controller:-
GETWELDDATA(1-1,1,2) Type
Program 1 using Type 1 is actually selecting Electrode (Gun) 1 in the Bosch controller to be
queried. Then by turning DO-[779] On (Request Electrode Status) the Weld Controller will
either turn off DI-[778:Tip Dress Request] if this electrode isn’t the one requiring a tip dress
or leave it on if it does. If it is requiring a tip dress the TP Program will then call
TOOL1_TIP_DRESS. Otherwise it will do the same process but query electrode 2, electrode
3 and so on.
It will be down to the Integrator/End user to make sure that when the program has
determined what Electrode is to be dress that the right program is called, as it is possible
that Electrode 1 could be ‘Tool 2’
Example
LBL[1: Electrode 1]
DO[779: Bosch Req Elect Stat] = OFF
CALL TOOL_2_TIP_DRESS
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 13
Robot To Spot Welding
Programming
6.2 TOOL(No.)_TIP_DRESS
Program Name:- TOOL(No.)_TIP_DRESS
TP Usage/Notation:- CALL TOOL1_TIP_DRESS
Associated I/O:- DO[127,778,781], DI[110,778,825]
Other Programs used:- SET_WELD_DATA, GETWELDDATA, RESETSPOTMEM,
TIP_WEAR
There are tip dress programs for each Electrode/Tool that the robot uses, e.g. Dual Spot
Welding Gun. To complete a Tip Dress the robot must activate the correct program within
the Bosch Weld Controller. These programs are as follows:-
Electrode 1:
60 = Short circuit weld
61 = Tip Dress
62 = Tip Change/First dress
63 = Polish dress
64 = Fast open (only used for pneumatic guns)
65 = Resistance calibration
248 = Current check
249 = Force check
Electrode 2:
160 = Short circuit weld
161 = Tip Dress
162 = Tip Change/First dress
163 = Polish dress
164 = Fast open (only used for pneumatic guns)
165 = Resistance calibration
246 = Current check
247 = Force check
Electrode 3:
250 = Short circuit weld
251 = Tip Dress
252 = Tip Change/First dress
253 = Polish dress
254 = Fast open (only used for pneumatic guns)
255 = Resistance calibration
244 = Current check
245 = Force check
For a standard Tip Dress that will be executed within these programs
(TOOL(No.)_TIP_DRESS) the following sequence is used:-
Example Tool 1
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 14
Robot To Spot Welding
Programming
3. Call SET_WELD_DATA set Type to ‘1’, program No. to 61 (Tip Dress) and pressure
schedule to 98.
a. SET_WELD_DATA(‘1-61’,98)
i. Pressure Schedule 98 can be changed by the integrator/end user if
the Pressure for tip dressing needs to be altered.
4. A FOR LOOP is executed for a predefined number of loops (set in the Manual Fctns
Spot Setup Page) in which a PRESS_MOTN command is used to close the gun into
the tip dresser and pressurise to Pressure Schedule 98.
5. Call SET_WELD_DATA set Type to ‘1’, program No. to 63 (Polish Dress) and
pressure schedule to 96
a. SET_WELD_DATA(‘1-63’,96)
i. Pressure Schedule 96 can be changed by the integrator/end user if
the Pressure for Polish dressing needs to be altered.
6. A FOR LOOP is executed for a predefined number of loops (set in the Manual Fctns
Spot Setup Page) in which a PRESS_MOTN command is used to close the gun into
the tip dresser and pressurise to Pressure Schedule 96.
7. After the 2 dressing sequences the gun then performs a short Circuit weld
a. Using SET_WELD_DATA(‘1-60’,1) program 60 Short Circuit Weld for Tool 1
is selected within the Bosch Weld Controller.
b. Then a standard SPOT instruction is executed
i. L P[1] 500mm/sec FINE SPOT[SD= ,P= ,S= ,ED= ]
8. Finally the robot will acknowledge the completed tip dress sequence by setting the
Tool Number to the Weld Controller using:-
a. GETWELDDATA(‘1-1’,1)
b. DO-[778: Ack Tip Dress] = ON
c. WAIT DI-[778: Tip Dress Request] = OFF
d. DO-[778: Ack Tip Dress] = OFF
e. CALL RESETSPOTMEM
f. CALL TIP_WEAR
i. TIP_WEAR is the tip wear compensation program used to alter the
TCP position based on the amount of wear seen on the tips.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 15
Robot To Spot Welding
Programming
Figure 7.1
Tip wear will be executed at the end of each welding program and after any kind of Tip
Dressing. The wear ratio can be set via the Manual Functions screen for Spot Welding Setup
(see Figure 7.1)
There has been a teach pendant program written that can be used by the integrator/end user
called ‘TIP_WEAR’. This program can be used anywhere where there is nothing between
the tips of the Servo Gun, when this program running only Motion Group 2 (Servo Gun)
moves so the Robot (Motion Group 1) isn’t required to be in a set position.
Example
CALL TIP_WEAR(1,0)
Argument 1 = Gun Number
Argument 2 = Worn Tips (0), New Tips (1)
The purpose of the Resistance Calibration is to calibrate the Bosch Software and the gun
together. As Spot Welding relies heavily on knowing the resistance of the welding circuit as
resistance will affect the current through the material when welding.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 16
Robot To Spot Welding
Programming
When the program is executed a selection list is displayed on the screen and the operator
must select which gun the resistance calibration is to be carried out on.
Once the required gun has been selected the program steps on to run the resistance check
for that gun. The following messages will be displayed to the user.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 17
Robot To Spot Welding
Programming
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 18
Robot To Spot Welding
Programming
Manual Pressure Check is a Teach Pendant program that is to be ran in T1/T2 by the
operator. It is used to check the that the pressure request by the Bosch is the pressure that
is being excreted by the robot. A pressure gauge is also placed between the tips so a real
time measurement can be observed alongside the Bosch value and the robot value. The
thickness of the gauge being used needs to be entered into the weld program on the Bosch:-
On Execution of this program the robot will drive to a convenient position for the operator to
place the pressure gauge between the tips for the gun before the gun closes and
pressurises. It will be down to the integrator/end user to touch-up the positions in the
program to make it suitable for each cell and each gun (Gun 1/2/3).
When the program is executed a selection list is displayed on the screen and the operator
must select which gun the pressure check is to be carried out on. This then calls the relevant
program (MAN_PRES_GUN1/2/3).
Once the selection has been made the robot will move to its Manual Pressure position and
open the gun tips. Then the operator will be given the following instructions.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 19
Robot To Spot Welding
Programming
When the pressure gauge has been placed between the Tips of the servo gun and the
operator press’ OK the robot will close the gun and pressurise to the pressure that the Bosch
Weld time asked for and the following screen is displayed.
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 20
Robot To Spot Welding
Programming
9.Programming
All the Spot position should be programmed with the fixed tip of the servo gun touching the
panel to be welded. The inbuilt schedules for Distance (Start/End) refer to the 2 distances in
each schedule, one being Gun and the other Robot. The Gun distance is how far the
movable tip (Gun) is away from the panel and the Robot distance is how far the static tip
(Robot) is away from the panel. See Figure 7.1 which shows the position when recording or
touching up a position, then the position when the Start distances are used, then the actual
welding position and finally the end distance. All 3 of these moves happen when the SPOT
position is activated, its best to think of the SPOT position as 3 positions in 1:-
1. Robot at weld position with the two tips at a distance away from the panel as stated
in the Start Distance Schedule.
2. Robot at the taught weld position with the Gun closed and at the pressure stated in
the pressure schedule.
3. Robot at weld position with the two tips at a distance away from the panel as stated
in the End Distance Schedule.
Figure 9.1
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 21
Robot To Spot Welding
Programming
COL DETECT ON ;
UFRAME_NUM=1 ;
! swd_gx63com_3089_3xc_056 ;
CALL SET_WELD_DATA('1-3089056',1,2) ;
L P[14:3089com_3xc_056] 2000mm/sec FINE
SPOT[SD=1,P=1,S=3089056,ED=1] ;
! swd_gx63com_8204_3tr_001 ;
CALL SET_WELD_DATA('1-8204001',1) ;
L P[24:8204com_3tr_001] 500mm/sec FINE
SPOT[SD=1,P=1,S=8204001,ED=1] ;
--eg:260R06 ;
CALL COLL_ZONE_REQ(5) ;
! swd_gx63com_4501_3tr_009 ;
CALL SET_WELD_DATA('1-4501009',1,2) ;
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 22
Robot To Spot Welding
Programming
! swd_gx63com_7880_2tr_002 ;
CALL SET_WELD_DATA('1-7880002',1) ;
L P[33:7880com_2tr_002] 2000mm/sec FINE
SPOT[SD=1,P=1,S=7880002,ED=1] ;
--eg:260R06 ;
CALL COLL_ZONE_REL(5) ;
! swd_gx63com_3053_3tr_015 ;
CALL SET_WELD_DATA('1-3053015',1) ;
! swd_gx63com_3089_3xc_046 ;
CALL SET_WELD_DATA('1-3089046',1,3) ;
! 260R06 ;
CALL COLL_ZONE_REQ(5) ;
! swd_gx63com_7548_3tr_007 ;
CALL SET_WELD_DATA('1-7548007',1) ;
L P[46:7548com_3tr_007] 2000mm/sec FINE
SPOT[SD=1,P=1,S=7548007,ED=1] ;
! -260R06 ;
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 23
Robot To Spot Welding
Programming
CALL COLL_ZONE_REL(5) ;
! swd_gx63com_4517_2xc_034 ;
CALL SET_WELD_DATA('1-4517034',1) ;
L P[56:4517com_2xc_034] 2000mm/sec FINE
SPOT[SD=1,P=1,S=4517034,ED=1] ;
! swd_gx63com_4517_2xc_042 ;
CALL SET_WELD_DATA('1-4517042',1) ;
L P[60:4517com_2xc_042] 2000mm/sec FINE
SPOT[SD=1,P=1,S=4517042,ED=1] ;
! 260R03 ;
CALL COLL_ZONE_REQ(6) ;
! swd_gx63com_4517_2xc_038 ;
CALL SET_WELD_DATA('1-4517038',1) ;
L P[65] 2000mm/sec FINE
SPOT[SD=1,P=1,S=4517038,ED=1] ;
! -260R03 ;
CALL COLL_ZONE_REL(6) ;
Jaguar Land Rover : Robot to Spot Welding Standard for FANUC’s R30iB Controller 24