ABB Malaysia - 1 Jun 16, 2015
S4CPlus Robot
Basic Programming
Training
Syllabus
ABB Basic Programming Training - 2 Jun 16, 2015
1.1 System Overview
General
Manipulator
Controller
Teach Pendant
Safety
Syllabus (cont 1)
ABB Basic Programming Training - 3 Jun 16, 2015
1.2 Basic Operation
Starting the System
Working with Windows
Jogging the Robot Using Joystick
Working on Program
Automatic Mode
Error
I/O Signal
Syllabus (cont 2)
ABB Basic Programming Training - 4 Jun 16, 2015
2.1 Robot Coordinate System
Tool Coordinate System
Work Object Coordinate System
Creating TCP
Calibration and Counter Update
Backup & Restore
Syllabus (cont 3)
ABB Basic Programming Training - 5 Jun 16, 2015
2.2 Program Structure and Overview
Program
Program Memory
Module
System Module
Routine
Data
Path Programming
Instruction
Expression
Procedure and Functions
Syllabus (cont 4)
3.1 Programming
Basic Instruction
MoveL
MoveJ
ABB Basic Programming Training - 6 Jun 16, 2015
3.2 Intermidiate Instruction
MoveC
ProcCall
Move with Offset
WaitTime
Syllabus (cont 5)
3.3 I/O Signal Instruction
Set
Reset
Pulse
ABB Basic Programming Training - 7 Jun 16, 2015
3.4 Advance Instruction
Compact IF
IF-THEN
IF-THEN-ELSE
IF-THEN-ELSEIF-THEN-ELSE
WaitDI
WaitUntill
Syllabus (cont 6)
ABB Basic Programming Training - 8 Jun 16, 2015
3.4 Advance Instruction
WHILE-DO
FOR
TEST
GOTO
STOP AND EXIT
BREAK
Mathematic Instruction
TP Instruction
Comment
ABB Basic Programming Training - 9 Jun 16, 2015
ABB Basic Programming Training - 10 Jun 16, 2015
ABB Basic Programming Training - 11 Jun 16, 2015
General
Controller
Manipulator
A robot is a combination of two principal
parts: Controller and Manipulator
ABB Basic Programming Training - 12 Jun 16, 2015
The Manipulator
Manipulator,
IRB2400
Please observe each axes movement
direction of the manipulator.
The Manipulator
Definition of Robot Axes:
Joints
Degrees of Freedom
ABB Basic Programming Training - 13 Jun 16, 2015
Robot Axes:
Axis 1:
Axis 2:
Axis 3:
Base rotates 180
Axis 4:
Axis 5:
Axis 6:
Roll 300
Lower Arm 70
Upper Arm +105 -28
Pitch 120
Roll 300
ABB Basic Programming Training - 14 Jun 16, 2015
Teach Pendant and Operator Panel
Teach Pendant
Operator Panel
The teach pendant and operator panel are
used to communicate with the robot.
ABB Basic Programming Training - 15 Jun 16, 2015
The Controller
S4C Control System
The controller is consist of 4 principal
parts.
The Controller
KEY SWITCH
Control Description
AUTO (Production Mode)
MANUAL (Teach Mode)
ABB Basic Programming Training - 16 Jun 16, 2015
MANUAL 100% (Teach Full Speed)
Control Panel
S4C Controller
Operators Panel
AUTOMATIC MODE (Production Mode)
Used to run for Production.
Jogging robot is not-allow in this mode.
ABB Basic Programming Training - 17 Jun 16, 2015
MANUAL REDUCED SPEED MODE (Programming
mode)
Used to do programming, move to robot manually, and
parameter setting
Need to press the enabling device to activate the robots
motors.
Operators Panel
MANUAL FULL SPEED MODE
(Testing mode, Optional)
ABB Basic Programming Training - 18 Jun 16, 2015
Used to test run the robot program at full programmed
speed.
Need to press the enabling device and Hold-To-Run to
activate the robots motors.
Control Description
ABB Basic Programming Training - 19 Jun 16, 2015
MOTORS ON (an illuminated push-button) is used to start the
motors in AUTO mode. When lit, it indicates that the robot
motors are ON. When the button is flashing the motors are off.
This button is also used to reset Emergency Stop conditions.
Control Panel
S4C Controller
The Controller
Control Description
EMERGENCY STOP
ABB Basic Programming Training - 20 Jun 16, 2015
(push-button) immediately
stops robot operation regardless of previous states
and operational mode. No voltage is transmitted
to the motors in the Emergency Stop condition.
Control Panel
S4C Controller
The Controller
Control Description
ABB Basic Programming Training - 21 Jun 16, 2015
The HOUR METER is used to keep track of
operational hours that the robot has ran. This
meter is used for maintenance scheduling.
Control Panel
S4C Controller
Teach Pendant
Joystick
Hold-to-Run
ABB Basic Programming Training - 22 Jun 16, 2015
LCD Display
Enabling device
Emergency Stop
Teach Pendant
Emergency stop
The robot stops regardless of which state or
mode the system is in immediately the
emergency stop button is pressed.
Enabling device (for safe operation)
ABB Basic Programming Training - 23 Jun 16, 2015
Enabling device is a press switch with three positions
The switch must be in the middle in order to activated the
motors in manual mode
All robot movement will immediately stop if the switch is
released or pressed to the bottom
Teach Pendant (cont 2)
Joystick
The joystick is used to jog (move) the robot manually; e.g.
when programming the robot.
ABB Basic Programming Training - 24 Jun 16, 2015
Display
Display all information during programming, to change
programs.
Can accommodate 16 lines.
Each line can accommodate 40 characters..
ABB Basic Programming Training - 25 Jun 16, 2015
Teach Pendant (cont 3)
Teach Pendant Keys Overview
Teach Pendant (cont 4)
Windows Keys (to select a window to work with)
Jogging
Used to jog the robot.
Program
Used to program and test.
ABB Basic Programming Training - 26 Jun 16, 2015
Inputs/Outputs
Used to manually operate the input and output signals
connected to the robot.
Misc
Miscellaneous; other windows, i.e. the System Parameters,
Service, Production and File Manager windows.
Teach Pendant (cont 5)
Navigation Keys (to move the cursor)
List
Press to move the cursor from one part of window
to another.
Previous/Next Page
ABB Basic Programming Training - 27 Jun 16, 2015
Press to see the next/previous page.
Up and Down arrows
Press to move the cursor up or down.
Left and Right arrows
Press to move the cursor to the left or right.
Teach Pendant (cont 6)
Navigation Keys (to move the cursor)
Motion Unit
Press to jog the robot or other mechanical units
Motion Type
ABB Basic Programming Training - 28 Jun 16, 2015
Press to select how the robot should be jogged, reorientation
or linear.
Motion Type
Axis by axis movement. 1=axis1-3, 2=axis4-6
Incremental
Incremental Jogging on/off
Teach Pendant (cont 7)
Other Keys
Stop
Stops program execution.
Contrast
Adjusts the contrasts of the display.
Menu Keys
Press to display menus containing various commands.
ABB Basic Programming Training - 29 Jun 16, 2015
Function Keys
Press to select the various commands directly.
Delete
Deletes the data selected on the display.
Enter
Press to input data
Teach Pendant (cont 8)
Programmable Keys
ABB Basic Programming Training - 30 Jun 16, 2015
Functions to be defined by the user.
Safety
ABB Basic Programming Training - 31 Jun 16, 2015
Safety Functions
Emergency Stop.
Enabling Device
Safety Stop
Reduced Speed
Interlock
Hold-to-run-control
ABB Basic Programming Training - 33 Jun 16, 2015
Starting the System
Before switch the system on, make sure
that no one inside the safeguarded
space around the robot.
Switch the mains switch on. The robot is
then automatically checked.
After the system has been checked and
no errors are located, the welcome
message appears on the display.
ABB Basic Programming Training - 34 Jun 16, 2015
Mains Switch
Welcome Screen
Working with Windows
Accessing the Inputs/Outputs Window:
ABB Basic Programming Training - 35 Jun 16, 2015
1.
Press the Inputs/Outputs window key.
ABB Basic Programming Training - 36 Jun 16, 2015
Working with Windows
Windows for manual I/O handling
2.
The window for manual I/O is shown on the
display. When a digital output is selected, its
status can be changed using the function keys.
Working with Windows
ABB Basic Programming Training - 37 Jun 16, 2015
3.
You can move around the windows by pressing keys below:
Movement
Select
One line up
Arrow Up
One line down
Arrow Down
To the first line in the list
Goto top from the Edit menu
To the last line in the list
Goto bottom from the Edit menu
Next Page
Next page
Previous Page
Previous page
Select a specific line in the list Goto from the Edit menu; enter
the desired line number and
press OK
ABB Basic Programming Training - 38 Jun 16, 2015
Working with Windows
A window with two parts.
4.
Windows are sometimes divided to 2 by a double line.
5.
Select an output, two function keys will be displayed.
6.
Turn On/Off the output by pressing the 0 / 1.
7.
Move to different windows by pressing Window Keys
ABB Basic Programming Training - 39 Jun 16, 2015
Working with Windows
The four window keys
8.
There are four window keys on the teach pendant.
9.
When you press a window key, the active window will be
hidden under the new window.
Jogging the Robot Using Joystick
Linear Jogging
ABB Basic Programming Training - 40 Jun 16, 2015
Robot
1.
Turn the operating mode selector to the
<250mm/s position.
2.
Check that the Robot motion Unit
and Linear motion Unit are selected.
With the Motion unit key, you can choose
between operating the robot or other
external unit connected to controller.
With Motion type key, you can choose
robot to move in:
Linear
a.
Linear movement
b.
Reorientation of particular end effector
c.
Axis-by-axis movement
Jogging the Robot Using Joystick
ABB Basic Programming Training - 41 Jun 16, 2015
Linear Jogging
The Robot Coordinate System
When linear type motion is selected, the robot will move as
shown in figure above.
Jogging the Robot Using Joystick
Linear Jogging
ABB Basic Programming Training - 42 Jun 16, 2015
The centre of the face plate: TCP 0
The Tool Center Point (TCP) 0, is the point that move
linearly, along the axes of the coordinate system.
The TCP0 is located at the front of the upper arm, in the
centre of the robots face plate.
Jogging the Robot Using Joystick
Linear Jogging
ABB Basic Programming Training - 43 Jun 16, 2015
Robot movements with different joystick deflections
3.
Push the enabling device halfway to switch the MOTORS ON.
4.
Jog the robot using the joystick. Standing in front of the robot,
the TCP0 will, depending on how the joystick is moved, move
linearly along the X-, Y- and Z-axes.
The robot can be moved in several directions
simultaneously.
The larger the joystick deflection, the faster robot moves.
Jogging The Robot
Motion Types
ABB Basic Programming Training - 44 Jun 16, 2015
Robot
Major Axes 1,2,3
Minor Axes 4,5,6
Linear / Reorientation
Base
World
Tool
Workobject
Can Jog the Robot in Incremental steps.
ABB Basic Programming Training - 45 Jun 16, 2015
Joystick Control
Linear Robot Motion
ABB Basic Programming Training - 46 Jun 16, 2015
Joystick Control
Reorienting the Tool
ABB Basic Programming Training - 47 Jun 16, 2015
Joystick Control
Axis by Axis Robot Motion
ABB Basic Programming Training - 48 Jun 16, 2015
Joystick Control
ABB Basic Programming Training - 49 Jun 16, 2015
Creating a New Program
Press the program key to open the program window
Choose File: New
If there already is an unsaved program, answer the
displayed dialog and press File: New again
Specify the new name for the program
Choose OK to confirm
A program with only one empty main routine is
created
ABB Basic Programming Training - 50 Jun 16, 2015
Loading an existing program
Press the program key to open the program window
Choose File: Open
Press Unit until the right mass memory unit is
displayed
Mark the desired program or directory with the cursor
and press Enter to select
Choose OK to confirm
The program will be loaded
ModPos
ModPos - Modifying the position in a positioning instruction
e.g. MoveL.
Move
robot to desired position
Select
the instruction to be changed
ABB Basic Programming Training - 51 Jun 16, 2015
press
the function key ModPos
Cutting
Cutting - Selecting one or more instructions, deleting them
and placing them in memory.
Move
cursor to instruction or use Mark to Select a
group of instructions
Choose
ABB Basic Programming Training - 52 Jun 16, 2015
Can
EDIT : Cut
then be pasted anywhere
Copying
Copying - Selecting one or more instructions, copying
them and placing them in memory.
Move
cursor to instruction or use Mark to Select a
group of instructions
Choose
ABB Basic Programming Training - 53 Jun 16, 2015
Can
EDIT : Copy
then be pasted anywhere
Pasting
Pasting - placing what ever instructions have been stored
in memory into the program.
Move
cursor to instruction where you wish to
place the instruction/s
Choose
EDIT : Paste
ABB Basic Programming Training - 54 Jun 16, 2015
Sometimes
asked if you want to paste before or
after an instruction, default is after
Marking
Marking - Selecting one or more instructions.
Move
cursor to top/bottom of the list of instructions
Choose
EDIT : Mark
Move
cursor up/down until all lines that are wanted
are selected
ABB Basic Programming Training - 55 Jun 16, 2015
Can
now Cut, Copy or Delete selection
Automatic Mode
ABB Basic Programming Training - 56 Jun 16, 2015
Automatic mode is used to execute ready made programs
Figure 33 Dialog box used to confirm a change from manual to automatic mode.
Automatic Mode
Press OK. You have now changed to automatic mode and
ABB Basic Programming Training - 57 Jun 16, 2015
the Production window appears on the display (see Figure
34).
Automatic Mode
Press the Motors On button on the operators panel.
Start the program with the Start function key.
Stop the program with the STOP button on the teach
pendant unit.
ABB Basic Programming Training - 58 Jun 16, 2015
Switch back to manual mode
Error Message
ABB Basic Programming Training - 59 Jun 16, 2015
If an error occurs, an error message will be displayed in plain
language on the teach pendant . If several errors occur
simultaneously, the error that occurred first will be selected.
An error message is displayed in plain language as soon as an error occurs
Languages & Messages
ABB Basic Programming Training - 60 Jun 16, 2015
ERROR MESSAGES
Press _______
Log
to return to previous page.
Languages & Messages
ERROR MESSAGES
There are 8 categories of errors:
Category
Error #
Description
Operational
1X,XXX Status Information
System 2X,XXX Safety Circuits
Hardware
3X,XXX Circuit Board Failure
Program
4X,XXX Program Execution Problem
ABB Basic Programming Training - 61 Jun 16, 2015
Motion 5X,XXX Movement Problems
Operator
6X,XXX Programming Unit Handling
I/O Comm.
7X,XXX Comm. Error to I/O Board
Internal
N/A
System Software Error
Languages & Messages
ERROR MESSAGES
A ________
of error messages is kept so you can look
LOG
at the last errors that the system has had.
The path that will take you to the ERROR LOGS is:
ABB Basic Programming Training - 62 Jun 16, 2015
MISC. : SERVICE : VIEW : LOG
To Save Error Log:
Misc: Service: View: Log:
File: Save all Logs as:
Languages & Messages
ERROR MESSAGES
You can also erase one or more of the logs. While the cursor
is highlighting one of the error categories in the log screen,
press;
SPECIAL: ERASE LOG OR ERASE ALL
ABB Basic Programming Training - 63 Jun 16, 2015
LOGS
To set system Date and Time:
Misc: Service: View:
2-Date and Time:
ABB Basic Programming Training - 64 Jun 16, 2015
ABB Basic Programming Training - 65 Jun 16, 2015
Coordinate Systems
z
Wrist Frame
y
Tool Frame
y
z
z
x
x
Base Frame
ABB Basic Programming Training - 66 Jun 16, 2015
Programmed
position
y
World Frame
OBJE
CT
x
Work Object
USER
Coordinate systems
Z
Y
TOOL COORDINATES
Y
X
ABB Basic Programming Training - 67 Jun 16, 2015
BASE COORDINATES
OBJECT COORDINATES
Y
Y
USER COORDINATES
Y
WORLD COORDINATES
X
Coordinate Systems Benefits
ABB Basic Programming Training - 68 Jun 16, 2015
Tool Coordinate System
Defines the TCP and orientation of a tool
Necessary to run the robot (the TCP) in linear movements
The tooldata may be changed, reflecting a worn tool
Makes it possible to change tool, without changing the
program
Makes tool relative movements possible
Work Object Coordinate System
Defines the work place for the robot
Makes it possible to move the whole workplace (a fixture)
without changing the program
Makes it easy to use a program, made on one robot, in
another robot with different workplace. Change the
workobject, not the program.
A program for an object may be displaced with search
function, to find the current location
Tool Centre Point
Tool Mounting
Flange
ABB Basic Programming Training - 69 Jun 16, 2015
+Y
+X
Relative Directions X, Y & Z.
+Z
ABB Basic Programming Training - 70 Jun 16, 2015
Tool Centre Point
Position & movement of robot always related to TCP.
Defined as being somewhere at the end of the tool.
Many can be defined but only one active at any one time.
Can be programmed manually but only if accurate data.
Normally use robot to define TCP.
If tool is damaged or replaced, dont change program just redefine the
tool.
Tool Centre Point
ABB Basic Programming Training - 71 Jun 16, 2015
3 Methods of tool Definition
4 point TCP with 4 approach points.
5 point TCP & Z with 4 approach points and 1 elongator
point to define Z direction of tool.
6 point TCP& ZX with 4 approach points & 1 elongator for Z
direction & 1 for X direction .
ABB Basic Programming Training - 72 Jun 16, 2015
4 Point TCP
No rotation about X, Y or Z
ABB Basic Programming Training - 73 Jun 16, 2015
5 Point TCP
Z direction defined
ABB Basic Programming Training - 74 Jun 16, 2015
5 Point TCP Spray gun
Z direction defined
ABB Basic Programming Training - 75 Jun 16, 2015
6 Point TCP Welding gun
Both X and Z defined
ABB Basic Programming Training - 76 Jun 16, 2015
6 Point TCP - Water jet Application
TCP
.
Water jet
ABB Basic Programming Training - 77 Jun 16, 2015
TCP Definition - Simple
3
4
1
1
2
4
3
2
Plan view
TCP Definition - Complex
5
3
6
ABB Basic Programming Training - 78 Jun 16, 2015
X Elongator
Z Elongator
X
2
Y
Base
coordinate
direction
Tool Centre Point Definition Method
In The Program Window
Menu : View : Datatypes
Cursor to tooldata and press Enter ().
Press the Function Key New.
Press Enter () to name your tool and then press OK.
Press Decl, List Key (
Twice.
Menu : Special : Define Coordinates
Press Enter () to choose TCP method 4, 5 or 6 then OK.
List Key (
) down, you can now enter your positions by moving the robot and
pressing ModPos.
ABB Basic Programming Training - 79 Jun 16, 2015
) and move your cursor down to input mass in kg, then OK
Press OK and note the Mean and Max error, below 1 for each is preferable. Press OK.
In The Jogging Window.
Cursor to Tool, press Enter (), select your TCP and then
press OK to activate your TCP.
Defining TCP By Using The Robot
ABB Basic Programming Training - 80 Jun 16, 2015
Jog the robot to the fixed tip with four different
orientations and in different directions (not in same
plane as in fig):
ABB Basic Programming Training - 81 Jun 16, 2015
Defining TCP By Using The Robot
Open window by using View: Data Types
Select the type tooldata and press Enter
Choose Special: Define Coord
Modified
-
= Position defined
If error is acceptable press OK
= No Position defined
If error is too large, press Cancel
and redefine.
Work Object Coordinate System
All program positions are attached to a work object
Wobj0 is the default coordinate system
It is advisable to use custom work objects
z
p10
ABB Basic Programming Training - 82 Jun 16, 2015
y
Base
Wobj0
(0,0,0)
(900, 60, 500)
Work Objects
Custom Work Object
X1
Object
frame
ABB Basic Programming Training - 83 Jun 16, 2015
User
frame
World
Work Objects contain both User and Object Frames
Work Object Frames
p10
(200, 0, 450)
(400, 0, 50)
ABB Basic Programming Training - 84 Jun 16, 2015
World
User
(300, 60, 0)
Object
Work Objects and External Axis
Workobject disconnected from robot world
and attached to mechanical unit
Object frame may be transposed
ABB Basic Programming Training - 85 Jun 16, 2015
from its User frame
ABB Basic Programming Training - 86 Jun 16, 2015
Defining a Work Object frames
World
World
User and Object Coordinate Systems are usually both defined
at the same position.
1
bj
X
O
W
ABB Basic Programming Training - 87 Jun 16, 2015
Work Objects
O
W
Y
X
2
j
b
ABB Basic Programming Training - 88 Jun 16, 2015
Work Objects
WObjData is used to describe the area that the robot
welds, processes, moves within etc.
If position Data is entered manually, the values can be
taken from a drawing.
Programs can be reused quickly following changes in
the robot installation e.g. if a fixture is moved, just
redefine user coordinate system.
Variations in how the Work Object is attached can be
compensated for (using search and a sensor).
Robot can be jogged along the axes of the work object.
Work Object Definition Method
In The Program Window
View : Datatypes
Cursor to Wobjdata and press Return.
Press the Function Key New.
Press Return to name your work object and then press OK Twice.
Special : Define Coordinates
Move cursor up and down and press Return to choose 3 point method for User
and NoChange Object.
List Key down, you can now enter your positions by moving the robot and
pressing ModPos.
ABB Basic Programming Training - 89 Jun 16, 2015
Press OK.
In The Jogging Window.
Cursor to Wobj, press Return, select your work object and then press OK to
activate it.
ABB Basic Programming Training - 90 Jun 16, 2015
Robot Calibration
Robots delivered with all axis motor calibrated.
Motor resolver value is store in Manipulator system
parameter (Manipulator -> Motor Calibration)
It is recorded on Resolver value sticker on
manipulator
Two type of calibration procedure to robot which is
Fine Calibration and Revolution Counter Update
Calibration
ABB Basic Programming Training - 91 Jun 16, 2015
Fine Calibration
Calibrate when resolver value change by
Change/dismentle motor
Change gearbox/gear
Revolution Counter Update
Counter update when resolver value change by
Battery discharged
Resolver error
Resolver signal interrupt
Robot axis moved with control system
disconnected
ABB Basic Programming Training - 92 Jun 16, 2015
Calibration I-Mark
Revolution Counter Update
ABB Basic Programming Training - 93 Jun 16, 2015
Press the Misc. Window key
Select Service in the dialog box shown on the display
Press Enter, and then choose View: Calibration
The robot will be in Unsychronized status if one of the
axis resolver counter is not updated
Choose Calib: Rev. Counter Update
Press function key All or Incl. to select not updated axis
Jog robot to calibration I-mark position (attached)
Confirming by pressing OK and press OK again to start
the update process
Check the calibration by using instruction MoveAbsJ
MoveAbsJ
ABB Basic Programming Training - 94 Jun 16, 2015
Create routine rCalib
Find the instruction in IPL2, Motion Adv
Insert instruction,
MoveAbsJ *, v1000, z50, tool0
Move the cursor to block the * and choose Edit: Value
Change all the joint axes data to Zero (0)
Press OK to confirm the changes
Switch to Test mode and move the PP to the above
instruction
Execute the instruction by press FWD
After robot go to it calibration position, check robot IMark
ABB Basic Programming Training - 95 Jun 16, 2015
ABB Basic Programming Training - 96 Jun 16, 2015
What is a Program?
ABB Basic Programming Training - 97 Jun 16, 2015
A program consists of instructions
and data, programmed in the RAPID
programming language, which control
the robot and peripheral equipment in a
specified way.
The program is usually made up of three
different parts:
a main routine
several subroutines
program data.
In addition to this, the program
memory contains system modules.
Creating a new program
ABB Basic Programming Training - 98 Jun 16, 2015
Press Here!
Choose File: New.
If the robot is already loaded with
a program which has not been
saved, a dialog box appears and
you will be asked whether you
want to save it or not.
Specify the new name of the
program in the dialog box that
appears.
Choose OK to confirm.
A program with only one empty
main routine is created.
Loading an existing program
ABB Basic Programming Training - 99 Jun 16, 2015
Here!
Here!
Choose File: Open.
If necessary, change the mass
memory unit by pressing Unit
until the correct unit is displayed.
Select the desired program.
Move up or down in the directory
by using either .. (up), or the
desired directory (down) and
press Enter .
Choose OK to confirm.
Tip: If there is an error in the
program, this error will be
displayed if you choose File:
Check Program
What is a Module?
Program Memory
Program Module(s)
ABB Basic Programming Training - 100 Jun 16, 2015
Program Data
Main
Routine
Routines
System Module(s)
Program Data
Routines
What is a Module?
Program Memory
Program Module(s)
ABB Basic Programming Training - 101 Jun 16, 2015
Program Data
Main
Routine
Routines
Program Data
Routines
System Module(s)
Program Data
Routines
The Internal Structure of Modules
%%%
VERSION:1
LANGUAGE:ENGLISH
%%%
MODULE EX1
CONST robtarget p3:=[[1266.11,-44.68,379.91],[0.567059,0.054467,0.821577,0.022118],[0,0,CONST robtarget p2:=[[1270.77,-93.78,386.13],[0.567071,0.054457,0.82157,0.02211],[-1,0,CONST robtarget p1:=[[1312.4,-132.16,381.39],[0.567077,0.054431,0.821568,0.02209],[-1,0,-
ABB Basic Programming Training - 102 Jun 16, 2015
PROC main()
MoveL p1,v1000,fine,tool0;
MoveL p2,v1000,fine,tool0;
MoveL p3,v1000,fine,tool0;
ENDPROC
ENDMODULE
ABB Basic Programming Training - 103 Jun 16, 2015
Modules
A module is a group of routines and data.
A program module that contains a main routine is the main
program module, otherwise just a sub program module.
System modules are always present in memory and can be
used to save your default data and routines.
Filename extensions are:
[Link]
= Program Module
[Link]
= Program Module (no MAIN)
[Link]
= System Module
Saving programs that use modules
ABB Basic Programming Training - 104 Jun 16, 2015
When a program is saved using FILE : Save Program, all program
modules in memory are saved with the main program module into
one amalgamated file.
(.PRG)
ABB
Program Module
(.MOD)
DrawSQ
Program Module
(.MOD)
DrawTri
Program Module
[Link]
Opening programs that use modules
When a program is opened using FILE : Open, any modules that have
originally been saved with the program are loaded in and separated out.
They can still be saved separately.
(.PRG) ABB
Program Module
(.MOD) DrawSQ
Program Module
ABB Basic Programming Training - 105 Jun 16, 2015
(.MOD) DrawTri Program Module
[Link]
Saving Modules
When a module is saved using FILE : Save Module, the selected module in
memory is saved as a single .MOD or .SYS module file.
(.PRG) ABB
Program Module
(.MOD) DrawSQ
Program Module
(.MOD) DrawTri Program Module
ABB Basic Programming Training - 106 Jun 16, 2015
(.SYS) User
System Module
[Link]
Programming
Adding in New Instructions
ABB Basic Programming Training - 107 Jun 16, 2015
If a new instruction is added, it is placed after the instruction that is
selected.
Select the place where
you want the new
instruction to be added.
Call up one of the
instruction pick lists by
choosing the appropriate
pick list from the IPL1 or
IPL2 menu.
If want to call up the
instruction pick list that
was used most recently,
choose Edit: Show IPL.
Programming (1)
ABB Basic Programming Training - 108 Jun 16, 2015
Moving and Copying Instructions
Select the instruction you wish to move or copy. To select
several instruction, choose Edit: Mark.
Choose Edit: Cut (move) or Edit: Copy.
Indicate where you wish to add the new instruction.
Choose Edit: Paste.
In the Program Instruction window, copy and paste can also
be selected using a function key.
Programming (2)
Procedures and Functions
ABB Basic Programming Training - 109 Jun 16, 2015
A procedure is a number of instructions, put together in a box
with a specific name
This box may be called from the main routine (or any), and the
content of instructions will be executed
The call of the procedure is like an instruction:
MoveL p100, v100, z10, tool1;
FetchPart;
MoveL p110, v100, z10, tool1;
A function is another box of instructions, used to calculate a
value:
reg1 := Dist (p110, p100);
Routine is the common term for both procedures and functions
Programming (3)
More readable program
Better structured program
The code can be reused in several different parts of the
program
ABB Basic Programming Training - 110 Jun 16, 2015
Program creation is easier, the different routines may be
created and tested separately
The robot may be customized by creating application
specific routines
Programming (4)
Program Structure
Procedure main
...
fetch_part
leave_in_machine
process_part
fetch_fr_machine
leave_part
...
procedure fetch_part
MoveJ *,vmax,z50,tool1;
MoveL *, v1000,z30,tool1;
MoveL *,v200,fine,tool1;
grip;
MoveL *,v200,z30,tool1;
grip
ABB Basic Programming Training - 111 Jun 16, 2015
Set gripper;
WaitTime 0.3;
release
Reset gripper;
WaitTime 0.3;
Programming (5)
A rapid routine can be:
ABB Basic Programming Training - 112 Jun 16, 2015
Procedure, ex:
fetch_part;
SpotL p100,vmax,spot10,gun7,tool7;
Function, ex:
reg1:=circ_rad(p1,p2,p3);
reg2:=max(a,b,c);
Programming (6)
Names - identifiers
Variables names must have:
- max. 16 characters
- first character must be a letter!
- only letters, digits and underscores
ABB Basic Programming Training - 113 Jun 16, 2015
RAPID keywords cannot be used as variable names.
It is absolutely desirable to use meaninful names suggestive of
the entity they represent.
Note! Not case sensitive, i.e foobar is equal to FoObAr
ABB Basic Programming Training - 114 Jun 16, 2015
What is a Routines?
There are three types of routines
(subprograms): Procedures, Functions and
Trap:
ABB Basic Programming Training - 115 Jun 16, 2015
- Procedures do not return a value and
are used in the context of instructions.
- Functions return a value of a specific
type and are used in the context of
expressions.
- Trap routines provide a means of dealing
with interrupts.
ABB Basic Programming Training - 116 Jun 16, 2015
What is a Routines? [1]
A routine can contain routine declarations (including parameters),
data, a body, a backward handler (only procedures) and an error
handler.
Routine declarations cannot be nested, i.e. it is not possible to
declare a routine within a routine.
What is a Routines? [2]
Procedure main
ABB Basic Programming Training - 117 Jun 16, 2015
...
fetch_part
leave_in_machine
process_part
fetch_fr_machine
leave_part
...
procedure fetch_part
MoveJ
*,vmax,z50,tool1;
procedure
leave_in_machine
MoveL *, v1000,z30,tool1;
MoveL *,v200,fine,tool1;
procedure process_part
grip;
procedure fetch_fr_machine
MoveL *,v200,z30,tool1;
procedure leave_part
MoveJ *,vmax,z50,tool1;
MoveL *, v1000,z30,tool1;
MoveL *,v200,fine,tool1;
release;
MoveL *,v200,z30,tool1;
grip
Set gripper;
WaitTime 0.3;
release
Reset gripper;
WaitTime 0.3;
Routines
Before you start to program, you should think out the structure first.
Repetitive instruction sequences that occur frequently in the program,
such as gripper handling, should form their own routines.
ABB Basic Programming Training - 118 Jun 16, 2015
Routines separate the program into smaller more easily understood
parts that can then be called anywhere in the program.
You have Max 16 characters allowed for naming a routine so you
should give them meaningful names such as DrawCircle, CutSquare
and PickPart
The Program Routines Window
Choose View: Routines to
open the window.
The window displays all the
routines in your system and, if
there is a function present, also
the type of data returned for that
function.
ABB Basic Programming Training - 119 Jun 16, 2015
Here!
Creating New Routine
ABB Basic Programming Training - 120 Jun 16, 2015
Here!
Here!
Here!
Choose View: Routines to
open the window.
Press function key New.
Change the name by pressing
Enter and specify a new name
If you want a normal subroutine
(procedure) without any
parameters, you should finish
here by pressing OK. In cases,
the characteristics of the routine
must be defined.
ABB Basic Programming Training - 121 Jun 16, 2015
Creating New Routine (1)
Here!
In cases, the characteristics of
the routine must be defined.
Press the function key Decl_.
Change the characteristics of the
routine by selecting the
appropriate filed.
Routines
Main
ABB Basic Programming Training - 122 Jun 16, 2015
MoveJ *,v5,z1,tcp;
Square;
MoveJ *,v5,z1,tcp;
MoveL *,v5,z1,tcp;
MoveJ *,v5,z1,tcp;
MoveJ *,v5,z1,tcp;
Square;
Main routine
Square
Circle
MoveJ *,v5,z1,tcp;
MoveL *,v5,fine,tcp;
MoveL *,v5,z1,tcp;
MoveL *,v5,z1,tcp;
MoveL *,v5,z1,tcp;
Circle;
MoveL *,v5,z1,tcp;
MoveJ *,v5,z1,tcp;
MoveJ *,v100,z1,tcp;
MoveL *,v5,fine,tcp;
MoveC *,*,v5,z1,tcp;
MoveC *,*,v5,fine,tcp;
MoveL *,v5,z1,tcp;
MoveJ *,v100,z1,tcp;
Sub routines
Duplicating a routines
Here!
Choose View: Routines.
Select the routine to be
duplicated.
Press the function key Dupl.
Change the name by pressing
Enter and specify a new
name
ABB Basic Programming Training - 123 Jun 16, 2015
Here!
Choose OK to be confirm the
duplication.
Path Following Exercise
Start / Finish
Start / Finish
ABB Basic Programming Training - 124 Jun 16, 2015
Path Following Exercise
Start / Finish
Direction
Path Following Exercise
ABB Basic Programming Training - 125 Jun 16, 2015
Main Routine
MoveJ pHome;
Home Position
MoveJ pSafe;
Safe position
Outside;
Routine to seal outside edge
Oval;
Routine to seal oval shape
Circle;
Routine to seal circle shape
MoveJ pSafe;
Safe position
MoveJ pHome;
Home Position
Data
Data
ABB Basic Programming Training - 126 Jun 16, 2015
There are three kinds of data:
Variables
Constants
Persistents
Data
Variables - VAR
A variable is an entity used by the program to store values in
the computation.
A variable can be assigned a new value during program
execution.
ABB Basic Programming Training - 127 Jun 16, 2015
Example:
VAR num mint;
VAR num cherry := 100;
Data
Constants - CONST
A constant is an entity whose value does not change during
program execution.
All constant declarations must have an initial value.
Example:
ABB Basic Programming Training - 128 Jun 16, 2015
CONST string str:=ABB Robotics;
Data
Persistent - PERS
A persistent can be described as a persistent variable.
ABB Basic Programming Training - 129 Jun 16, 2015
An update of the value of a persistent automatically cause
the
initialisation value of the persistent declaration to be
updated.
When the program is saved the initialisation value of any
persistent
declaration reflects the current value of the persistent.
All persistent declarations must have an initial value.
Example:
PERS bool dirty:=FALSE;
Note! A persistent may only be declared as module data.
Data
Changing of data
System
Event ->
ABB Basic Programming Training - 130 Jun 16, 2015
Data
V
Constant
Warmstart
Open
Start
program Program
(MoveP
P
to Rout)
Unchang Initiated Initiated
ed
Start
Program
(After
Cycle)
Start
Program
(After
Stop)
Start
ModPos
Program
(MoveP
Pto
cursr)
Unchang Unchang Unchang Changed
ed
ed
ed
Assign- Change
ment in in Data
program Window
Changed Changed
(not Init (also Init
value)
value
can be
changed)
-
Not
Changed
possible
to
change
Unchang Unchang Unchang Unchang Changed Changed Changed
ed
ed
ed
ed
Persistent
Unchang Initiated
ed
Variable
Unchang Initiated
ed
Initiated
Unchang Unchang Unchang Not
ed
ed
ed
possible
to
change
Interrupt
definition
Unchang deleted
ed
deleted
Unchang Unchang Unchang ed
ed
ed
Data
Speed Data
Speed data is used to specify the velocity at which
both the robot and the external axes move.
It defines the velocity:
ABB Basic Programming Training - 131 Jun 16, 2015
At which the tool centre point moves.
Of the reorientation of the tool.
At which linear or rotating external move.
Example :
V100 = 100 mm/s
Data
ABB Basic Programming Training - 132 Jun 16, 2015
Zone Data
Zone data is used to specify how a position is to be
terminated, i.e. How close to the programmed
position the axes must be before moving towards
the next position.
A position can be terminated either in the form of
a stop point or a fly-by-point.
Path Programing
STOP POINT
ABB Basic Programming Training - 133 Jun 16, 2015
Means that the robot and external axes must reach
the specified position (stand still) before program
execution continues with the next instruction.
FLY-BY- POINT
Means that the programmed position is never attained.
The direction of the motion is charged before the position
is reached
ABB Basic Programming Training - 134 Jun 16, 2015
Path Programing
What is an instruction?
ABB Basic Programming Training - 135 Jun 16, 2015
An instruction defines a specific task that is to be carried out
when instruction is executed, for example
Moving the robot
Setting an output
Changing data
Jumping within the program
Instructions comprise an instruction name and a number of arguments.
The name specifies the principal task of the instruction and the
arguments specify the characteristics.
Example:
MoveL p1,v500,fine,tool1
Moves the TCP linearly to the position p1. The arguments, v500, fine and tool1,
specify the current speed, position accuracy and tool.
What is an instruction? (1)
Getting more information about an instruction
ABB Basic Programming Training - 136 Jun 16, 2015
Selecting the desired instruction and press Enter
MoveJ - Moves the robot by joint movement
ABB Basic Programming Training - 137 Jun 16, 2015
MoveJ is used to move the robot quickly from one
point to another when that movement does not
have to be in a straight line.
MoveJ - Moves the robot by joint movement
Type of path
- J = Joint
Speed specified in speed data
v100=100mm/s
Tool (TCP)
ABB Basic Programming Training - 138 Jun 16, 2015
MoveJ p10, v100, z10, tool1
Destination position
- *
= stored in instruction
- P10 = stored in position data p10
Zone size specified in zone data z10 = 10mm
ABB Basic Programming Training - 139 Jun 16, 2015
MoveC - Moves the robot circularly
MoveC is used to move the tool centre point
(TCP) circularly to a given destination.
During the movement, the orientation normally
remains unchanged relative to the circle.
MoveC - Moves the robot circularly
Type of path
C = circular
Circle position
- *
= stored in instruction
- P20 = stored in position data p20
ABB Basic Programming Training - 140 Jun 16, 2015
MoveC p20, p30, v100, z10, tool1
Destination position
- *
= stored in instruction
- P30 = stored in position data p30
ABB Basic Programming Training - 141 Jun 16, 2015
MoveAbsJ - Moves the robot to an absolute joint
position
MoveAbsJ (Move Absolute Joint) is used to move the robot
to an absolute position, defined in axes positions.
The final position of the robot, during a movement with
MoveAbsJ, is neither affected by the given tool and work
object, nor by active program displacement.
However, the robot uses these data to calculating the load,
TCP velocity, and the corner path.
The robot and external axes move to the destination
position along a non-linear path.
All axes reach the destination position at the same time.
MoveAbsJ - Moves the robot to an absolute joint
position
Type of path
- J = Joint
Speed specified in speed data
v1000=1000mm/s
Tool (TCP)
ABB Basic Programming Training - 142 Jun 16, 2015
MoveAbsJ p10, v1000, z10, tool1
Destination position
- *
= stored in instruction
- P10 = stored in position data p10
Zone size specified in zone data z10 = 10mm
ABB Basic Programming Training - 143 Jun 16, 2015
ProcCall - Calls a new procedure
A procedure call is used to transfer program execution to
another procedure.
When the procedure has been fully executed, program
execution continues with the instruction following the
procedure call.
ProcCall - Calls a new procedure [1]
Procedure main
...
fetch_part
leave_in_machine
process_part
fetch_fr_machine
leave_part
...
procedure fetch_part
MoveJ *,vmax,z50,tool1;
MoveL *, v1000,z30,tool1;
MoveL *,v200,fine,tool1;
grip;
MoveL *,v200,z30,tool1;
grip
ABB Basic Programming Training - 144 Jun 16, 2015
Set gripper;
WaitTime 0.3;
release
Reset gripper;
WaitTime 0.3;
Comment
ABB Basic Programming Training - 145 Jun 16, 2015
Comments are used to make the program easier
to understand
Comments have no influence on the program
execution
! This is a comment
ABB Basic Programming Training - 146 Jun 16, 2015
ABB Basic Programming Training - 147 Jun 16, 2015
ABB Basic Programming Training - 148 Jun 16, 2015
Exercise 1
Start up the robot system under consideration of the safety procedures
Choose the JOG window on the teach pendant
Choose the following settings
Coordinate System
Base
Tool
tool0
Work object
workobj0
Move each joint of the robot in joint mode
Move one axis all the way to the limit of the working limit. Confirm the error
message and move in the opposite direction
Move the robot in linear motion mode
Change the speed of the movement by selecting incremental
Move the robot by selecting reorientation mode
Exercise 2
1. Select the Program Editor, choose Task and Program.
2. Select File and choose New Program. (Refer to page 151)
3. Write the name of the program on the numerical keyboard, EX2 and press
OK
4. Press the menu key Add Instruction.
ABB Basic Programming Training - 149 Jun 16, 2015
5. Choose Move instruction according to the program example (next page)
6. The positions p10 - p50 shall be programmed so that when executing the
program, the pencil moves linearly on the table except from p50 to p10.
7. Select QuickSet Menu and set the speed adjustment (-%) to 10%. Run the
program in Manual mode (<250 mm/s), first step-by-step forwards (FWD)
and then continuously (Start)
PROC main()
MoveJ p10, v500, fine, tool0
MoveL p20, v500, fine, tool0
MoveL p30, v500, fine, tool0
MoveL p40, v500, fine, tool0
MoveL p50, v500, fine, tool0
p40
p50
ENDPROC
ABB Basic Programming Training - 150 Jun 16, 2015
p10
p30
p20
Exercise 3
1. Continue from the EX2
2. Create and define a tool called tool1 - using 4 point definition (Refer to page 128
134)
3. Exchange all tool0 arguments in the program to tool1 and run the program
What happened and why?
...
ABB Basic Programming Training - 151 Jun 16, 2015
4. Reprogram all the positions to the right place by using the key Modify Position and
test run the program again
5. Increase the speed (+%) by steps to 50% while running the program in continuous
mode. To reach a higher speed the Operating Mode Selector has to changed to 100%
Observe the robot behavior (the speed) at the positions programmed
.
.
Exercise 3 [1]
6. Change the zone argument from fine to z30 for positions p20, p30 and p40.
Set the speed correction (-%) to 10% and run the program, first step-bystep (FWD) and then in continuous mode (Start)
Observe the difference in movement at the z30 positions
..
7. Change the speed for position p30 to v300 and for p40 to v1000
ABB Basic Programming Training - 152 Jun 16, 2015
Run the program with different speed correction settings and check the path
performance at the fly-by positions.
Is there a difference?
.
8. Insert a time of waiting for 5 seconds (WaitTime) after the instruction for p40.
Run the program and notice the robot position when the waiting is executed
Exercise 3 [2]
9. Remove the instructions for the waiting and p50 from the program.
Run the program again and notice the new behavior.
10. Change the instructions for p20 and p30 from MoveL to MoveJ
Observe the movement change when executing the program
ABB Basic Programming Training - 153 Jun 16, 2015
.
11. Insert the position p50 again and put an obstacle between p30 and p40,
which the robot has to pass in a proper way, by programming four new
instructions (MoveL) with suitable speed and zone size. (p60, p70, p80,
p90)
Run the program and notice the robot position when the activation of the
output starts.
Exercise 3 [3]
12. Change the zone argument for p30 to fine
Run the program again and watch the difference compared to item 12
.
13. Perform a backward execution of the program (BWD), watching the
movements and what is happening at the logical instruction.
..
ABB Basic Programming Training - 154 Jun 16, 2015
14. Save the program with the new name of EX3
Exercise 4
1. Which group of coordinate systems are available in the robot system?
A)
B)
C)
D)
E) ...
2. Re-open program EX2
ABB Basic Programming Training - 155 Jun 16, 2015
3. Create and define a workobject called wobj2 (in PERS datatype)
(User coordsys = Base coordsys)
4. Modify the program so that it is uses the workobject wobj2 in the Move
instruction (re-teach the point)
5. Create another workobject wobj3 (with location show in next page)
ABB Basic Programming Training - 156 Jun 16, 2015
Exercise 4 [1]
wobj3
wobj2
+x
+x
+y
+y
Exercise 4 [2]
6. Change the Workobject in Move instruction from wobj2 to wobj3
Observe the movement change when executing the program
.
ABB Basic Programming Training - 157 Jun 16, 2015
7. Save the program with the new name of EX4
Exercise 5
1. Create a routine according to the flowchart below and call EX5
2. Add an instruction to the routine.
3. Complete the program by putting in another routine.
ABB Basic Programming Training - 158 Jun 16, 2015
4. Add a position (phome) at the beginning of the program.
Triangle
Routine
Square
Routine
Circle
Routine
Exercise 5 [1]
PROC Square()
MoveJ pHome, v500, z20, tool0;
MoveJ pHome, v500,z20,tool0;
MoveL sq1, v150, fine, tool0;
MoveL c1, v500, z20, tool0;
MoveL sq2, v150, fine, tool0;
MoveC c2,c3, v200, fine, tool0;
MoveL sq3, v150, fine, tool0;
MoveL sq4, v150, fine, tool0;
MoveL sq1, v150, fine, tool0;
MoveJ pHome, v500, z20, tool0;
ENDPROC
PROC Triangle()
MoveJ pHome, v500,z20,tool0;
ABB Basic Programming Training - 159 Jun 16, 2015
PROC Cricle()
MoveJ tri1, v500, z20, tool0;
MoveL tri2, v200, fine, tool0;
MoveL tri3,v200,fine,tool0;
MoveL tri1, v200, z20, tool0;
MoveJ pHome, v500,z20,tool0;
ENDPROC
MoveC c4,c1,v200,fine,tool0;
MoveJ pHome, v500,z20,tool0;
ENDPROC
Exercise 6
1. Continue the EX5.
2. Using the procall method to link all the routine.
Main
procedure
ABB Basic Programming Training - 160 Jun 16, 2015
Triangle
procedure
Square
procedure
Circle
procedure
Exercise 6 [1]
PROC main()
Circle;
Square;
Triangle;
ABB Basic Programming Training - 161 Jun 16, 2015
ENDPROC
ABB Basic Programming Training - 162 Jun 16, 2015
Q&A