Escolar Documentos
Profissional Documentos
Cultura Documentos
R103
Programação
IRC5 Programming Basic
Avançada
IRC5 Programação Avançada
Conteúdo
Objetivos do Curso
Objetivos do Curso
Após completar o curso, o participantes estará apto a:
Right Click on
Controllers
© ABB Inc. -4
IRC5 Programação Avançada
Add Controller
Add a controller to
communicate with.
© ABB Inc. -5
IRC5 Programação Avançada
Event Viewer
Display current
and past events in
the system.
© ABB Inc. -6
IRC5 Programação Avançada
Using R.S.O.
Using R.S.O.
RSO Configuration
I/O Configuration
© ABB Inc. -13
IRC5 Programação Avançada
Motion Configuration
© ABB Inc. -15
IRC5 Programação Avançada
1. Tap the ABB menu.
2. Tap Control Panel.
3. Tap ProgKeys.
4. Select key to program, Key 1-4 in the upper selection list.
5. Tap the Type menu to select type of action:
None
Input
Output
System
6. If Type Input is selected.
Tap to select one of the digital inputs from the list.
Tap the Allow in auto menu to select if the function is also
allowed in automatic operating mode.
© ABB Inc. -16
IRC5 Programação Avançada
Exercise 2
Tool coordinates
Y
Tool0
X Z
Benefits using Tool:
Jogging
Re-orientation
Z
Easy to change
Y
Base coordinates
© ABB Inc. -19
X
IRC5 Programação Avançada
Coordinate System
Different examples of tools and TCPs.
TCP
TCP TCP
TOOL0
TCP
Z - Elongator
Fixed point
© ABB Inc. -21
IRC5 Programação Avançada
+Z
© ABB Inc. -22
IRC5 Programação Avançada
Z
© ABB Inc. -23
IRC5 Programação Avançada
Stationary TCP
WobjPart
tGripper
© ABB Inc. -24
IRC5 Programação Avançada
Exercise 3
1. Create a TCP for your assigned robot Gripper using the TCP
Z ,X Method. Test.
Modules
1. Program Modules
2. System Module
System Memory
System Parameters
Operating Application User Memory
System Software
VXWorks RAPID
© ABB Inc. -28
User Memory
Data Data
Data Data
More… More…
© ABB Inc. -29
IRC5 Programação Avançada
Module Types
Program (.mod)
System (.sys)
Routines
Data
MainModule
Main rPickUp rDropOff
Data
© ABB Inc. -30
IRC5 Programação Avançada
Module Attributes
SYSMODULE
MODULE
NoStepIn module1(SYSMODULE,VIEWONLY)
!Data declarations
ViewOnly
!Routines
ReadOnly !Instructions
ENDMODULE
NoView
(Except SYSMODULE)
IRC5 Programação Avançada
PROC Routine2()
MoveL;
ENDPROC
ENDMODULE
© ABB Inc. -32
IRC5 Programação Avançada
Saving Modules
A Backup will Save everything.
1. Tap the ABB menu.
2. Tap Program Editor.
3. Select Robot Task.
4. Tap Modules.
5. Tap Module to save.
6. Tap File and Save Module As.
7. Using the input panel to select storage location and type the
desired name.
8. Tap OK.
ModuleA.mod
MODULE ModuleA
PROC RoutineA1()
MoveL;
MoveL;
ENDPROC
ENDMODULE
© ABB Inc. -33
IRC5 Programação Avançada
Routines
rStyle1
Main Routine
MoveL p20 . . .
MoveJ p10 . . . rStyle2
.
IF . . . . MoveL p210 . . .
rStyle1 . .
ELSEIF . . . Return .
rStyle2 .
. Return
.
.
Return
P10
DATA: P20
P210
Routines
Routine types:
1. PROCEDURE = for motion and process.
2. FUNCTION = for mathematical calculations.
3. TRAP = for interrupt instruction handling.
© ABB Inc. -35
IRC5 Programação Avançada
Data
Variable
Constant
Persistant
© ABB Inc. -36
IRC5 Programação Avançada
Data Scope
Data Arrays
nOffsets
Data Arrays
Exercise 4
1. Create a new System Module.
2. Put the tools created in the last exercise in the new Module.
3. Create ONE of the programs described below:
A. Create a program that simulates dispensing. The program should use
either a held or a stationary TCP. Create the following routines: Main, rPickUp,
rDropOff, rDispenseOn, rDispenseOff, rStyle1, rStyle2. Program the Main routine
to execute rPickUp, rStyle1, and rDropOff when input di1_Style1 is on. Program the
Main routine to execute rPickUp, rStyle2, and rDropOff when input di2_Style2 is on.
In the style routines move to the paper, turn on flow, and draw your initials. Put
rPickUp and rDropOff in the new system Module.
(Optional) 4. Add the use of Arrays to your program: (one dimensional arrays with no
more than 8 components.)
B. For the program that simulates Material Handling. Create two single
dimensional arrays representing pallet configuration offsets. Replace the conveyor
with a pallet that uses the array values for the offsets to fill the pallet.
Interrupts and Traps IRC5 Programação
Avançada
IRC5 Programação Avançada
What is an Interrupt?
Definition of an Interrupt
Interrupt Instructions
INSTRUCTION DESCRIPTION
Interrupt Instructions
INSTRUCTION DESCRIPTION
Trap Routine
Interrupt Example
© ABB Inc. -46
IRC5 Programação Avançada
Interrupt Overview
Connect
Interrupt Overview
ATTACHES AN
INPUT WITH A
DIGITAL INTERRUPT
DIGITAL SIGNAL NAME
SIGNAL
Di6_Flowing, 0, intFlowFault
VALUE OF SIGNAL
FOR INTERRUPT TO
TRIGGER TRAP ROUTINE
fine
© ABB Inc. -49
IRC5 Programação Avançada
Event Routines
11a
There are several system events that can be used in the
RAPID program language. They are:
COMMAND DESCRIPTION
POWER ON The robot is turned on.
START When the robot is started from the beginning.
RESTART When the robot is started from the position it was stopped.
STOP When program stopped (not cycle stop).
QSTOP When the program is quick stopped (emergency stopped).
RESET When the old program is erased.
event.
IRC5 Programação Avançada
Setting up an Event
© ABB Inc. -51
IRC5 Programação Avançada
Exercise 5
A. For the program that simulates dispensing. Add to the routines for
turning flow on and off. Monitor the flow after turning it on. If the flow stops while
drawing have the robot stop and move to a service position and wait for the
operator to press continue. After continue have the robot continue with where it
stopped.
B. For the program that simulates Material Handling. Add to the routines
for gripping and un-gripping. Monitor a part present switch (imaginary, pick an
input). If the part is dropped while running have the robot go to a service routine
and wait for the operator to press continue. After continue have the robot continue
with where it stopped.
Search Instructions
Example:
© ABB Inc. -55
IRC5 Programação Avançada
Search Instruction
Search Characteristics
OVERSHOOT
Position where Travel beyond the End point
search signal was point of signal for “SearchL”
triggered. (robtarget detection. destination.
data type=variable)
Error Handling
Error Identification
Errnum Data
Name Cause of error Name Cause of error
ERR_ACC_TOO_LOW Too low acceleration/deceleration specified in ERR_DIVZERO Division by zero
instruction "2or 2 ERR_EXCRTYMAX Maximum number of retries exceeded.
ERR_ALRDYCNT The interrupt variable is already connected to a TRAP ERR_EXECPHR An attempt was made to execute an instruction using a
routine place holder
ERR_ALRDY_MOVING The robot is already moving when executing a , ERR_FILEACC A file is accessed incorrectly
!+,!+instruction ERR_FILEEXIST A file already exists
ERR_AO_LIM ,2 analog signal value outside limit in 0& ERR_FILEOPEN A file cannot be opened
0/K or0, ERR_FILNOTFND File not found
ERR_ARGDUPCND More than one present conditional argument for the ERR_FNCNORET No return value
same parameter ERR_FRAME Unable to calculate new frame
ERR_ARGNAME Argument is expression, not present or of type switch ERR_ILLDIM Incorrect array dimension
when executing ArgName ERR_ILLQUAT Attempt to use illegal orientation (quaternion) valve
ERR_ARGNOTPER Argument is not a persistent reference ERR_ILLRAISE Error number in RAISE out of range
ERR_ARGNOTVAR Argument is not a variable reference ERR_INOMAX No more interrupt numbers available
ERR_AXIS_ACT Axis is not active ERR_IODISABLE Timeout when executing IODisable
ERR_AXIS_IND Axis is not independent ERR_IODN_TIMEOUT Timeout when executing IODNGetAttr or IODNSetAttr
ERR_AXIS_MOVING Axis is moving ERR_IOENABLE Timeout when executing IOEnable
ERR_AXIS_PAR Parameter axis in instruction TestSign and SetCurrRef ERR_IOERROR I/O Error from instruction Save
is wrong. ERR_LOADED The program module is already loaded
ERR_BWDLIMIT Limit StepBwdPath ERR_LOADID_FATAL Only internal use in LoadId
ERR_CALLIO_INTER If an IOEnable or IODisable request is interrupted byERR_LOADID_RETRY Only internal use in LoadId
another request to the same unit ERR_LOADNO_INUSE The load session is in use in StartLoad
ERR_CALLPROC Procedure call error (not procedure) at runtime (late ERR_LOADNO_NOUSE The load session is not in use in CancelLoad
binding) ERR_MAXINTVAL The integer value is too large
ERR_CFG_INTERNAL Not allowed to read internal parameter- # ERR_MODULE Incorrect module name in instruction ,+ and /-
ERR_MSG_PENDING The unit is busy
ERR_CFG_ILLTYPE Type mismatch - #, # ERR_NAME_INVALID If the unit name does not exist or if the unit is not allowed
ERR_CFG_LIMIT Data limit - # to be disabled
ERR_CFG_NOTFND Not found - #, # ERR_NEGARG Negative argument is not allowed
ERR_CNTNOTVAR CONNECT target is not a variable reference ERR_NORUNUNIT If there is no contact with the unit
ERR_CNV_NOT_ACT The conveyor is not activated. ERR_NOTARR Data is not an array
ERR_CNV_CONNECT The ? instruction is already active. ERR_NOTEQDIM The array dimension used when calling the routine does
ERR_CNV_DROPPED The object that the instruction ? was waiting not coincide with its parameters
for has been dropped. ERR_NOTINTVAL Not an integer value
ERR_DEV_MAXTIME Timeout when executing a ReadBin, ReadNum or a ERR_NOTPRES A parameter is used, despite the fact that the corresponding
ReadStr instruction argument was not used at the routine call
© ABB Inc. -60
time
ERR_STRTOOLNG The string is too long
ERR_SYM_ACCESS Symbol read/write access error
ERR_SYNCMOVEOFF Timeout from SyncMoveOff
ERR_SYNCMOVEON Timeout from SyncMoveOn
IRC5 Programação Avançada
rSearchPart rSearchPart
SearchL …
ERROR
ERROR
If ERRNO=ERRWHLSEARCH Then
…
Retry
TryNext
© ABB Inc. -64
Return
Raise
IRC5 Programação Avançada
Exercise 6
2. If the input is not found the robot should retry the search. After
2 retries the program should stop, reset the counter, and
prompt the operator to fix the problem. When the operator has
corrected the problem the operator should press “continue” for
the program to search again.
© ABB Inc. -65
Program Displacement IRC5 Programação
Avançada
IRC5 Programação Avançada
PdispOn Instruction
COLD START-UP
NEW PROGRAM LOAD
EXECUTION OF FIRST INSTRUCTION
IN THE PROGRAM
© ABB Inc. -70
IRC5 Programação Avançada
PdispSet Instruction
PdispSet pose1;
The amount of displacement is the values in pose1.
PERS pose pose1 := [[0,0,0],[1,0,0,0]];
[[X,Y,Z],[Q1,Q2,Q3,Q4]]
Exercise 7
A. For the program that simulates dispensing. Add to your search routine.
Have the robot move down from the position where the input comes on and draw a
square on the paper.
B. For the program that simulates Material Handling. Add to your search
routine. Have the robot search for a part on the table. When the part is found have
the robot move down and pick up the part.
© ABB Inc. -72
World Zones IRC5 Programação
Avançada
IRC5 Programação Avançada
World Zones
DEFINITION –
A defined area in the robots work range that is to be monitored.
The following are two examples of how world zones could be used:
To prevent the robot from entering an area in the robot work range.
To set an “AtHome” output when the robot is close to the home position.
When using \Stat and WZDOSet the output must be defined as “Internal" access.
Exercise 8
1. Add a cycle counter to the program. Count the number of cycles that
the robot runs. After every 4 cycles have the robot go to a service
position. The robot will wait for the operator to flip the di4_Continue
switch to continue.
3. Create a World Zone that will not allow the robot to move unless the
TCP is over the table.
© ABB Inc. -77
Advanced Instructions IRC5 Programação
Avançada
IRC5 Programação Avançada
Performance Instructions
% ACCELERATION LIMIT
% ACCELERATION RAMP
AccSet -AccSet 100,50;
AccSet is used when handling fragile loads. It allows slower acceleration
and deceleration, which results in smoother robot movements. This
instruction can only be used in the Main task or, if in a MultiMove System, in
Motion tasks.
% SET SPEED
VelSet -VelSet 100,5000; MAX mm/sec.
NAME
GripLoad -GripLoad IoPart1;
GripLoad is used to define the payload (Loaddata) which the robot
holds in its gripper. This instruction can only be used in the Main task
or, if in a MultiMove System, in Motion tasks.
© ABB Inc. -79
IRC5 Programação Avançada
Performance Instructions
AXIS
SOFTNESS %
SoftAct -Softact 3,30;
SoftAct is used to activate the so called “soft” servo on any axis
of the robot or external mechanical unit. This instruction can only be used
in the Main task or, if in a MultiMove System, in Motion tasks.
SoftDeact -SoftDeact;
SoftDeact is used to deactivate the so called “soft” servo on all
robot and external axes. This instruction can only be used in the Main
task or, if in a MultiMove System, in Motion tasks.
© ABB Inc. -80
IRC5 Programação Avançada
TriggInt -Trigg2,5,IntWeld;
TriggInt is used to define conditions and actions for running an interrupt
routine at a position on the robot’s movement path. The data defined is
used for implementation in one or more subsequent TriggL, TriggJ, or
© ABB Inc. -81
TriggC instructions.
IRC5 Programação Avançada
TriggIO trigg1,10\Dop:=doGun,1;
…
…
TriggJ p1,v500,trigg1,fine,tPen;
Configuration Instructions
Conf J [\on] | [\off]
ConfJ (Configuration Joint) is used to specify whether or not the robot’s
configuration is to be controlled during joint movement. If it is not controlled, the
robot can sometimes use a different configuration than that which was
programmed.
Exercise 9