Basic Programing S4
Basic Programing S4
S4CPlus Robot
Basic Programming
Training
Syllabus
General
Manipulator
Controller
Teach Pendant
Safety
Syllabus (cont 1)
Working on Program
Automatic Mode
Error
I/O Signal
Syllabus (cont 2)
Creating TCP
Syllabus (cont 3)
Program
Program Memory
Module
System Module
Routine
Data
Path Programming
Instruction
Expression
Syllabus (cont 4)
3.1 Programming
Basic Instruction
MoveL
MoveJ
MoveC
ProcCall
WaitTime
Syllabus (cont 5)
3.3 I/O Signal Instruction
Set
Reset
Pulse
Compact IF
IF-THEN
IF-THEN-ELSE
IF-THEN-ELSEIF-THEN-ELSE
WaitDI
WaitUntill
Syllabus (cont 6)
WHILE-DO
FOR
TEST
GOTO
BREAK
Mathematic Instruction
TP Instruction
Comment
General
Controller
Manipulator
The Manipulator
Manipulator,
IRB2400
The Manipulator
Definition of Robot Axes:
Joints
Degrees of Freedom
Robot Axes:
Axis 1:
Axis 2:
Axis 3:
Axis 4:
Axis 5:
Axis 6:
Roll 300
Lower Arm 70
Upper Arm +105 -28
Pitch 120
Roll 300
Teach Pendant
Operator Panel
The Controller
The Controller
KEY SWITCH
Control Description
Control Panel
S4C Controller
Operators Panel
AUTOMATIC MODE (Production Mode)
Used to run for Production.
Jogging robot is not-allow in this mode.
Operators Panel
MANUAL FULL SPEED MODE
(Testing mode, Optional)
Control Description
Control Panel
S4C Controller
The Controller
Control Description
EMERGENCY STOP
(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
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)
Display
Jogging
Program
Inputs/Outputs
Misc
Previous/Next Page
Motion Unit
Motion Type
Motion Type
Incremental
Stop
Contrast
Menu Keys
Function Keys
Delete
Enter
Safety
Safety Functions
Emergency Stop.
Enabling Device
Safety Stop
Reduced Speed
Interlock
Hold-to-run-control
Mains Switch
Welcome Screen
1.
3.
Select
One line up
Arrow Up
Arrow Down
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
5.
6.
7.
9.
Robot
1.
2.
Linear
a.
Linear movement
b.
c.
Axis-by-axis movement
Linear Jogging
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.
Robot
Linear / Reorientation
Base
World
Tool
Workobject
Joystick Control
Linear Robot Motion
Joystick Control
Reorienting the Tool
Joystick Control
Axis by Axis Robot Motion
Joystick Control
Choose OK to confirm
Choose OK to confirm
ModPos
ModPos - Modifying the position in a positioning instruction
e.g. MoveL.
Move
Select
press
Cutting
Cutting - Selecting one or more instructions, deleting them
and placing them in memory.
Move
Choose
Can
EDIT : Cut
Copying
Copying - Selecting one or more instructions, copying
them and placing them in memory.
Move
Choose
Can
EDIT : Copy
Pasting
Pasting - placing what ever instructions have been stored
in memory into the program.
Move
Choose
EDIT : Paste
Sometimes
Marking
Marking - Selecting one or more instructions.
Move
Choose
EDIT : Mark
Move
Can
Automatic Mode
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
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.
Error Message
ERROR MESSAGES
Press _______
Log
to return to previous page.
Program
I/O Comm.
Internal
N/A
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:
LOGS
To set system Date and Time:
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
BASE COORDINATES
OBJECT COORDINATES
Y
Y
USER COORDINATES
Y
WORLD COORDINATES
X
+Y
+X
Relative Directions X, Y & Z.
+Z
Many can be defined but only one active at any one time.
4 Point TCP
No rotation about X, Y or Z
5 Point TCP
Z direction defined
Z direction defined
TCP
.
Water jet
3
4
1
1
2
4
3
2
Plan view
3
6
ABB Basic Programming Training - 78 Jun 16, 2015
X Elongator
Z Elongator
X
2
Y
Base
coordinate
direction
List Key (
) down, you can now enter your positions by moving the robot and
pressing ModPos.
Press OK and note the Mean and Max error, below 1 for each is preferable. Press OK.
Cursor to Tool, press Enter (), select your TCP and then
press OK to activate your TCP.
Modified
-
= Position defined
= No Position defined
z
p10
y
Base
Wobj0
(0,0,0)
Work Objects
X1
Object
frame
User
frame
World
p10
(200, 0, 450)
(400, 0, 50)
World
User
(300, 60, 0)
Object
World
World
1
bj
X
O
W
Work Objects
O
W
Y
X
2
j
b
Work Objects
Press Return to name your work object and then press OK Twice.
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.
Press OK.
Cursor to Wobj, press Return, select your work object and then press OK to
activate it.
Robot Calibration
Calibration
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
Calibration I-Mark
MoveAbsJ
What is a Program?
Press Here!
Choose OK to confirm.
Here!
Here!
Choose OK to confirm.
What is a Module?
Program Memory
Program Module(s)
Program Data
Main
Routine
Routines
System Module(s)
Program Data
Routines
What is a Module?
Program Memory
Program Module(s)
Program Data
Main
Routine
Routines
Program Data
Routines
System Module(s)
Program Data
Routines
PROC main()
MoveL p1,v1000,fine,tool0;
MoveL p2,v1000,fine,tool0;
MoveL p3,v1000,fine,tool0;
ENDPROC
ENDMODULE
Modules
= Program Module
XXXXX.MOD
XXXXX.SYS
= System Module
ABB
Program Module
(.MOD)
DrawSQ
Program Module
(.MOD)
DrawTri
Program Module
ABB.PRG
Program Module
(.MOD) DrawSQ
Program Module
ABB.PRG
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
(.SYS) User
System Module
DrawSQ.MOD
Programming
Adding in New Instructions
Programming (1)
Programming (2)
Procedures and Functions
Programming (3)
More readable program
Better structured program
The code can be reused in several different parts of the
program
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
Set gripper;
WaitTime 0.3;
release
Reset gripper;
WaitTime 0.3;
Programming (5)
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
What is a Routines?
There are three types of routines
(subprograms): Procedures, Functions and
Trap:
...
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.
Here!
Here!
Here!
Here!
Here!
Routines
Main
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!
Here!
Start / Finish
Main Routine
MoveJ pHome;
Home Position
MoveJ pSafe;
Safe position
Outside;
Oval;
Circle;
MoveJ pSafe;
Safe position
MoveJ pHome;
Home Position
Data
Data
Variables
Constants
Persistents
Data
Variables - VAR
Example:
VAR num mint;
VAR num cherry := 100;
Data
Constants - CONST
Example:
Data
Persistent - PERS
Example:
PERS bool dirty:=FALSE;
Note! A persistent may only be declared as module data.
Data
Changing of data
System
Event ->
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
Interrupt
definition
Unchang deleted
ed
deleted
Data
Speed Data
Example :
Data
Zone Data
Path Programing
STOP POINT
FLY-BY- POINT
Path Programing
What is an instruction?
Setting an output
Changing data
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.
Tool (TCP)
Circle position
- *
= stored in instruction
- P20 = stored in position data p20
Tool (TCP)
Destination position
- *
= stored in instruction
- P10 = stored in position data p10
procedure fetch_part
MoveJ *,vmax,z50,tool1;
MoveL *, v1000,z30,tool1;
MoveL *,v200,fine,tool1;
grip;
MoveL *,v200,z30,tool1;
grip
Set gripper;
WaitTime 0.3;
release
Reset gripper;
WaitTime 0.3;
Comment
! This is a comment
Exercise 1
Coordinate System
Base
Tool
tool0
Work object
workobj0
Move one axis all the way to the limit of the working limit. Confirm the error
message and move in the opposite direction
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.
PROC main()
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?
...
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
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
.
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.
..
Exercise 4
1. Which group of coordinate systems are available in the robot system?
A)
B)
C)
D)
E) ...
2. Re-open program EX2
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
.
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.
Triangle
Routine
Square
Routine
Circle
Routine
Exercise 5 [1]
PROC Square()
MoveJ pHome, v500, z20, tool0;
PROC Cricle()
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
Triangle
procedure
Square
procedure
Circle
procedure
Exercise 6 [1]
PROC main()
Circle;
Square;
Triangle;
ENDPROC
Q&A