IRC5 Expert Programming

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 109

IRC5

Expert
Programming
IRC5 Programming Basic
IRC5 Expert Programming

Paper Work - Registration Form

Your Name
My Company

Plant or home address

My Boss

123 456-7890

Date here Date here

Number here Course Name


Name here Number here

Your Name here Date here


© ABB Inc. -2
IRC5 Expert Programming

Paper Work – Sign-In Sheet

Your Name Printed here S. S.# Job Title YN Your Name here
© ABB Inc. -3
IRC5 Expert Programming

Paper Work - Scantron


Name: Your Name here STUDENT CLASSIFICATION

One Mark Per Line O Millwright O Pipe fitter O Tool Maker


Use Dark Pencil/Pen To Indicate Answers O Machine Repair O Supervisor O Engineer
Example:         O Electrician O Weld Repair O Other

Start Date
ABB TRAINING COURSE
Month Day Year

Jan O         O US 302 O US 331 O US 376 O US 391 O US 421 O US 433


Feb O         O US 303 O US 332 O US 377 O US 393 O US 422 O US 434
Mar O         O US 304 O US 340 O US 378 O US 395 O US 423 O US 435
Apr O         O US 305 O US 342 O US 379 O US 396 O US 424 O US 436
May O        O US 312 O US 354 O US 379A O US 396A O US 425 O US 437
Jun O        O US 313 O US 356 O US 380 O US 408 O US 426 O US 438
Jul O        O US 314 O US 357 O US 381 O US 408B O US 427 O US 439
Aug O        O US 315 O US 358 O US 382 O US 411 O US 428 O US 440
Sep O        O US 316 O US 359 O US 384 O US 416 O US 429 O US 441
Oct O        O US 322 O US 361 O US 386 O US 417 O US 430 O US 442
Nov O     O US 323 O US 362 O US 387 O US 418 O US 431 O US 443
Dec O     O US 330 O US 369 O US 391 O US 420 O US 432 O US 444

Instructor Code Pre-Assessment Post-Assessment

             1.          1.        
             2.          2.        
             3.          3.        
             4.          4.        
             5.          5.        
             6.          6.        
             7.          7.        
© ABB Inc. -4

             8.          8.        
             9.          9.        
             10.          10.        
IRC5 Expert Programming

Course Objectives

Course Objectives
Upon completion of this course the student will be able to
successfully:

 Review Safety Precautions.

 Create Custom Instructions.

 Create Custom Functions.

 Setup and Use WorldZones.


© ABB Inc. -5
IRC5 Expert Programming

Course Objectives

Course Objectives
Upon completion of this course the student will be able to
successfully:
 Creating and Manipulate Data and Arrays.

 Setup and Use Collision Detection.

 Create and Use Background Tasks.

 Setup Network Drive for Automatic Uploading and Downloading


of program.

 Configure and Use Serial Communications for Data Transferring.


© ABB Inc. -6
IRC5 Expert Programming

Course Objectives

Course Objectives
Upon completion of this course the student will be able to
successfully:

 Use 3D Frame Displacement Methods.

 Advanced Rapid.

 Set Up and Using OPC Servers.

 Set Up User Authorization System.


© ABB Inc. -7
Safety IRC5 Programming Basic
IRC5 Expert Programming

Introduction

 Students participating in courses


arranged by ABB need to have
knowledge about safety
procedures from the Operator’s
Manual and Product Manual.
 In addition to instructor information,
students should study the
manuals. They must acknowledge
the understanding of safety
procedures and how to work with
robots on the training premises.
© ABB Inc. -9
IRC5 Expert Programming

Safety Review

 Avoid Pinch Points


 Lock Outs
 Emergency stop
 Operating mode
 Auto
 Manual < 250 mm/s
 Manual 100%
Enabling device
 Enabling device
(Dead mans grip)
Hold-to-run buttons
 Hold-to-run (for left or right hand)
 Safeguard stop
 (Auto and
Limiting the Manual)
workspace
© ABB Inc. -10
IRC5 Expert Programming

ABB Safety Procedures


© ABB Inc. -11
Custom Instructions IRC5 Expert Programming
IRC5 Expert Programming

Custom Instructions
ROUTINES appear to the user as if they were regular
You can make ______________
instructions.
The screen below shows how to add _______________
PARAMETERS to your
ROUTINES
_______________.
© ABB Inc. -13
IRC5 Expert Programming

Custom Instructions

This is an example of the parameters that may be used for


an instruction that cuts holes.
© ABB Inc. -14
IRC5 Expert Programming

Sample Instruction Routine


MODULE MainModule
CONST robtarget p10 := [[477.30,193.41,712.00],[0.694042,-0.135278,0.694051,0.135276],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
TASK PERS tooldata tNozzel := [TRUE,[[0,0,0],[1,0,0,0]],[-1,[0,0,0],[1,0,0,0],0,0,0]];
CONST robtarget p20 := [[477.30,193.41,712.00],[0.694042,-0.135278,0.694051,0.135276],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p30 := [[477.30,193.41,712.00],[0.694042,-0.135278,0.694051,0.135276],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget pHome := [[477.30,193.41,712.00],[0.694042,-0.135278,0.694051,0.135276],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PROC main()
MoveJ pHome, v1000, z50, tool0;
rStyle1;
ENDPROC

PROC Cut_Hole(robtarget StartPosition,num Radius,speeddata Speed,tooldata Tool,\wobjdata WorkObject)


rWaterON;
MoveJ RelTool(StartPosition,Radius,0,-50), Speed, z5, Tool;
MoveJ RelTool(StartPosition,Radius,0,0), Speed, fine, Tool;
MoveC RelTool(StartPosition,0,Radius,0), RelTool(StartPosition,0 - Radius,0,0), v100, z0, Tool;
MoveC RelTool(StartPosition,0,0 - Radius,0), RelTool(StartPosition,Radius,0,0), v100, fine, Tool;
MoveJ RelTool(StartPosition,Radius,0,-50), Speed, z5, Tool;
rWaterOFF;
ENDPROC

PROC rStyle1()
Cut_Hole p10, 15, v300, tNozzel;
Cut_Hole p20, 25, v200, tNozzel;
Cut_Hole p30, 10, v200, tNozzel;
ENDPROC

PROC rWaterON()
Set do5_FlowOn;
ENDPROC

PROC rWaterOFF()
Reset do5_FlowOn;
ENDPROC
© ABB Inc. -15

ENDMODULE
IRC5 Expert Programming

Modifying Most Common Pick Lists


To add routines to the Most Common IPL (Instruction Pick
Lists) press the following:

ABB : Control Panel : Configuration : Topics : Man-Machine


Communication : Select Pick List
© ABB Inc. -16
IRC5 Expert Programming

Exercise 1
1. Create a routine/instruction that could be used to cut holes in carpeting. The
instruction should look similar to a Move instruction with the addition of a radius
parameter. (Use the RelTool Function)

2. Add the new routine/instruction to the top of the Most Common 1 Pick List..

3. This exercise should simulate carpet cutting with a waterjet cutter. Create two 6
point TCP’s named “tGripper” and “tNozzel”. For tNozzel use the pen holder for our
purposes. Create the following new routines Main, rStyle1, rPickUp, rDropOff,
rWaterOn, and rWaterOff. When selected from the teach pendant, the robot should
pickup the pen and run rStyle1. rStyle1 routine will move to the table and draw three
different sized circles using the new instruction. When the robot gets to the part the
rWaterOn routine should be used to ensure that the water pressure is high enough
(wait for input di5_GoodPart). Turn on output do5_FlowOn to start the waterjet. Wait
for input di6_Flowing to check that the water is flowing. At the end of the cut the
robot should turn the waterjet off with the rWaterOff routine. At the end of the
program the robot should put the pen back.

Extra:
1. Add fault handling to your program. If the robot waits for more than 3 seconds
for input di5_GoodPart or di6_Flowing to come on the robot should go to a
service position and wait for the operator to press continue on the teach
© ABB Inc. -17

pendant.
Custom Functions IRC5 Expert Programming
IRC5 Expert Programming

Custom Functions
ROUTINES appear to the user as if they were regular
You can make ______________
Functions.
The screen below shows how to add _______________
PARAMETERS to your
ROUTINES
_______________.
© ABB Inc. -19
IRC5 Expert Programming

Function Routine Declaration


© ABB Inc. -20
IRC5 Expert Programming

Sample Function Routine

FUNC num Target_Distance(robtarget Target1,robtarget Tartget2)

X_Diff := target1.trans.x - target2.trans.x;


Y_Diff := target1.trans.y - target2.trans.y;
Z_Diff := target1.trans.z - target2.trans.z;
nDistance := Sqrt((X_Diff * X_Diff) + (Y_Diff * Y_Diff) + (Z_Diff * Z_Diff));
RETURN nDistance;

ENDFUNC
© ABB Inc. -21
IRC5 Expert Programming

Exercise 2

1. Create a function that returns the distance between two robtargets. This
function is similar to “Distance” function but your function uses robotarget
data instead of pos data.

2. Add to the existing program. Create a timed interrupt that checks the robot
position every 5 seconds. Use the new function to calculate the distance from
where the robot is currently and the Home position. (Definition of Home =
where the robot sits between cycles.) If the distance is greater than or equal to
10mm turn off the do8_AtHome output. If the distance is less than 10mm turn
the do8_AtHome output ON. This interrupt should be activated as soon as the
robot program is started. (Use the Start Event)

Extra:
1. Create a function that can be used in a decision making instruction to get a
number of the function key that has been pressed by the operator after a
prompt.
© ABB Inc. -22
World Zones IRC5 Expert Programming
IRC5 Expert Programming

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.

Maximum of 10 World Zones


can be used at the same time.
© ABB Inc. -24
IRC5 Expert Programming

World Zone Shape Instructions


Instructions used to define World Zones:
WZBoxDef [\Inside][\Outside], Shape, Low Point*, High Point*;
WZCylDef [\Inside][\Outside], Shape, Center Point*, Radius, Height;
WZSphDef [\Inside][\Outside], Shape, Center Point*, Radius;
WZHomeJointDef [\Inside][\Outside], Shape, MiddleJointVal, DeltaVal;
WZLimJointDef [\Temp][\Stat], Shape, LowJointVal, HighJointVal;

• \Inside & \Outside = a choice of definition area.


*Low, High, and Center Point are POS data types.
(Define as Constant or Persistent.)
• Joint Values use JointTarget data types.
© ABB Inc. -25
IRC5 Expert Programming

World Zone Action Instructions


Instructions used to setup World Zone actions:

WZLimSup [\Temp][\Stat], World Zone**, Shape;

WZDOSet [\Temp][\Stat], World Zone**, [\Inside][\Outside],[\Before]Shape, Signal, SetValue;

**World Zone is either a WZtemporary or WZstationary data type.


\Temp = a WorldZone that can be activates and deactivated in a program.
\Stat = a WorldZone that only be activated in a PowerOn event driven routine.

When using \Stat and WZDOSet the output must be defined as “Internal" access.

Instructions used to Activate and Deactivate World Zones:


WZDisable WorldZone; _____________________
Deactivates a Temp. World Zone

Reactivates a Temp. World Zone


WZEnable WorldZone; _____________________
© ABB Inc. -26

Deletes a Temp. World Zone


WZFree WorldZone; _______________________
IRC5 Expert Programming

Exercise 3

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.

2. Create a 50mm radius World Zone around the Service position.


Whenever the robot is in this zone do6_Alarm comes on. This zone
should be activated whenever the robot is powered on.

3. Create a World Zone that will not allow the robot to move unless the
TCP is over the table.
© ABB Inc. -27
Manipulating Data and IRC5 Expert Programming
Arrays
IRC5 Expert Programming

Data

There are two kinds of Data Types:

Atomic (Bool, Num, String)


Record (Robtarget, Tooldata, …)

There are three different kinds of data declarations:

Variable
Constant

Persistant
© ABB Inc. -29
IRC5 Expert Programming

Global or Local?

The scope of Data may be defined as:


MODULE module1(SYSMODULE)
LOCAL Var num nCounter:=0;
Global
LOCAL PROC routine1()
Local Var num nCount;
!Instructions
EndProc

ENDMODULE

The differences between Program Data and Routine data is:


Program Data – Can be seen from anywhere in the
program.
Routine Data – Can only be seen from within the current routine.
© ABB Inc. -30
IRC5 Expert Programming

Creating Alias Data


With the Advanced Rapid software data types can be created
and used in a program. These must be created off-line.

Alias
An __________ type of data is the same type as another data but
given a different name. (Example: Num data and Counter data)

Program code example:

Alias num Counter;


© ABB Inc. -31
IRC5 Expert Programming

Creating Record Data

Record type of data is a composite of other data types.


A ___________
(Example: Part name and number)

Program code example:


Record NameNum
String name;
Num count;
Endrecord
Remember:
Data type declarations must be before other data declarations.
Data type is local to the module.
© ABB Inc. -32
IRC5 Expert Programming

Record Data Type

VAR robtarget p15 := [ [600, 500, 225.3], [1, 0, 0, 0], [1, 1, 0, 0],
[ 11, 12.3, 9E9, 9E9, 9E9, 9E9] ];
< dataobject of robtarget >
< trans of pos >
< x of num >,< y of num >,< z of num >,
< rot of orient >
< q1 of num >,< q2 of num >,< q3 of num >,< q4 of num >
< robconf of confdata >
< cf1 of num >,< cf4 of num >,< cf6 of num >,< cfx of num >
< extax of extjoint >
< eax_a of num >,< eax_b of num >,< eax_c of num >,…

To move the X position of p15 by 10 mm:


P15.trans.x:=P15.trans.x + 10;
© ABB Inc. -33
IRC5 Expert Programming

Data Arrays

nOffsets

3132 3145 4532 1276 8634

3344 22 1276 11 7886

5569 6 332 556 665

8944 456 11 -677 446

A data ARRAY is a way storing many numbers in


one data location.
© ABB Inc. -34
IRC5 Expert Programming

Data Arrays

An array can be 1, 2, or 3 dimensional.

Program code example:


 
Var num reg6{5}:=[3132,3145,4532,1276,8634]
 
For i from 1 to 5 do
TPWrite "The current value is "\Num:=reg6{i};

© ABB Inc. -35
IRC5 Expert Programming

Exercise 4
1.      Create a System Module with the "NoStepIn attribute. Move the rWater_ON,
rWater_OFF, Cut_Hole, and your function routines to this module. Step
through the program. Can you tell a difference? If not, delete the attribute
and step through again.
2.      Create a new Alias data type named "Cycle_Num". Use this new data
type for the cycle counter counting the number of cycles through rStyle1
routine.

3.      Create a new routine named rStyle2. In this routine, use two single dimensional
arrays to get X and Y offset values for cutting 15mm holes. Use a starting
position on the table top and use the Offset function for this exercise. Use the
following values:

X Y
0 0
44 106
150 150
256 106
300 0
256 -106
© ABB Inc. -36

150 -150 Should look


44 -106 like this.
Collision Detection IRC5 Expert Programming
IRC5 Expert Programming

LoadID and Collision Detection


© ABB Inc. -38
IRC5 Expert Programming

Loads

The LoadID feature is used to identify the exact load of Tool


_________ and __________ loads.
PayLoad

Arm Load

PayLoad

Tool Load

When setting up a robot define the Arm Load first then define the
Tool Load followed by the Pay Load.
© ABB Inc. -39
IRC5 Expert Programming

ARM LOADS
Arm Load load must be defined before using LoadID.
The _____________
© ABB Inc. -40
IRC5 Expert Programming

ARM LOADS

r1_load_1 r1_load_3
r1_load_2
© ABB Inc. -41
IRC5 Expert Programming

LoadID
Before using Load Identification (LoadID) make sure the following
conditions are met:

Tool is correctly mounted.


Remember:
Axis 6 is not near limits. Create Tooldata before
Tool Load.

Axis 4 is near 0. Create LoadData before


Payload.
Arm load defined.

Speed override set to 100%.


© ABB Inc. -42
IRC5 Expert Programming

Running LoadID
© ABB Inc. -43

Man Load Identify is used to define external axis loads.


_________________
IRC5 Expert Programming

Tool Load

The angle that axis 6 is to move while performing the test should be
+90 or -90 degrees. This will give the best results. If the tooling is
unable to make this amount of rotation choose other. A minimum of
30 degrees must be specified.
 
At the end of the procedure the following information is given:
 
Mass (kg)=
Centrer of Gravity(mm) X=
Centrer of Gravity(mm) Y=
Centrer of Gravity(mm) Z=
Measurement Accuracy = (Should be greater than 80%)
(If not than run again)
© ABB Inc. -44
IRC5 Expert Programming

PayLoad and GripLoad

After defining the Tool Load define the PayLoad of each Part that the
robot carries. Then add the GripLoad instructions to the program.

PROC rPickUp()
MoveJ pAbovePick, v1000, z50, tGripper;
MoveL pAtPick, v1000, fine, tGripper;
Set do9_Grip;
GripLoad loadPart1;
MoveL pAbovePick, v1000, fine, tGripper;
ENDPROC

PROC rDropOff()
MoveJ pOverDrop, v1000, z50, tGripper;
MoveL pAtDrop, v1000, fine, tGripper;
Reset do9_Grip;
GripLoad load0;
MoveL pOverDrop, v1000, z50, tGripper;
ENDPROC
© ABB Inc. -45
IRC5 Expert Programming

Motion Supervision Manual Control

Motion Supervision can be manually activated, deactivated and tuned.


© ABB Inc. -46
IRC5 Expert Programming

Motion Supervision System Parameter

Motion Supervision can be set active, de-active and tuned in System Parameters.
© ABB Inc. -47
IRC5 Expert Programming

Motion Supervision Instruction

Motion Supervision Instruction:


 
Add Instruction : ________
______________ Common : ________ MotionSup : then
Settings : __________

choose /Off, /On, or /TuneValue.

1
Tune Value can be from ________(for more sensitivity)
300
to __________(for less sensitivity).
© ABB Inc. -48
IRC5 Expert Programming

Motion Supervision

GripLoad
To activate a Payload use the ______________ instruction and a Load
 
data.

Below are the system outputs that can be used with Motion Supervision.
© ABB Inc. -49
IRC5 Expert Programming

Exercise 5

1. Define the load of the tools using Load identify.

2. Define the load of the part being picked up.

3. Add to your program to use the part load.

4. Test the collision detection by trying to stop the robot


manually. Make tuning adjustments if necessary.
© ABB Inc. -50
Multi-Tasking IRC5 Expert Programming
IRC5 Expert Programming

MultiTasking Option
© ABB Inc. -52
IRC5 Expert Programming

Multi-Tasking

Multitasking can be used to:


Fault Monitoring
__________________________
 
Control of external equipment
__________________________
 
Parallel Processing
__________________________

20
There can be ________ tasks in the system.

Normal Program
Background tasks are programmed like ________________.

There are two parameters used to setup Multi-Tasks:

Tasks
Automatic loading of Modules (Not Needed)
© ABB Inc. -53
IRC5 Expert Programming

Multi-Tasking Parameters

Used to define background tasks.


Tasks are ____________________________________________.
 
Name of background task.
Task : ___________________________________________
 
#1 - 10
Prog. : ___________________________________________
 
Task that is higher priority.
Task in foreground: _________________________________
 
Type : ____________________________________________
Normal, Static (Restart at last), Semi-Static (Restart at beginning)
 
Starting routine.
Main entry : ________________________________________
 
Check for reference errors? Yes or No
BindRef : __________________________________________
 
SysFail, SysHalt, SysStop, NoSafety
TrustLevel : _________________________________
© ABB Inc. -54

 
IRC5 Expert Programming

Multi-Tasking Parameters

Auto loading of modules is performed when P-starting.

 
Name of task to load module into.
Task : _________________________________________________
 
Path to find file.
File : _____________________ (Release: = “3HAC…” directory)
(Home: = Active system directory)
 
Built-in or Loaded
Storage : _______________________________________________
 
0 = English
TextResource : __________________________________________
 
No or Yes
Shared : ________________________________________________
 
© ABB Inc. -55
IRC5 Expert Programming

TestAndSet Function
TestAndSet can be used together with a normal data object of the type bool, as a binary
semaphore, to retrieve exclusive right to specific RAPID code areas or system resources.
The function could be used both between different program tasks and different execution
levels (TRAP or Event Routines) within the same program task.

Example of resources that can need protection from access at the same time:

•Use of some RAPID routines with function problems when executed in parallel.
•Use of the FlexPendant - Operator Log
MAIN program task:
PERS bool tproutine_inuse := FALSE;

...WaitUntil TestAndSet(tproutine_inuse);
TPWrite "First line from MAIN";
TPWrite "Second line from MAIN";
TPWrite "Third line from MAIN";
tproutine_inuse := FALSE;

BACK1 program task:


PERS bool tproutine_inuse := FALSE;

...WaitUntil TestAndSet(tproutine_inuse);
TPWrite "First line from BACK1";
TPWrite" Second line from BACK1";
© ABB Inc. -56

TPWrite "Third line from BACK1";


tproutine_inuse := FALSE;
IRC5 Expert Programming

TaskRunMec and TaskRunRob Functions


TaskRunMec is used to check if the program task controls any mechanical units (robot
with TCP or manipulator without TCP).

Basic examples of the function TaskRunMec is illustrated below.

VAR bool flag;

...flag := TaskRunMec( );

If current task controls any mechanical unit flag will be TRUE, otherwise FALSE.

TaskRunRob is used to check if the program task controls some robot (mechanical unit
with TCP).

Basic examples of the function TaskRunRob is illustrated below.

VAR bool flag;

...flag := TaskRunRob( );

If current task controls some robot, flag will be set to TRUE, otherwise FALSE.
© ABB Inc. -57
IRC5 Expert Programming

WaitTestAndSet Function
WaitTestAndSet instruction waits for a specified bool persistent variable value to become
FALSE. When the variable value becomes FALSE, the instruction will set value to TRUE and
continue the execution. The persistent variable can be used as a binary semaphore for
synchronization and mutual exclusion.

This instruction has the same underlying functionality as the TestAndSet function, but the
WaitTestAndSet is waiting as long as the bool is FALSE while the TestAndSet instruction
terminates immediately.

It is not recommended to use WaitTestAndSet instruction in a TRAP-routine, UNDO-handler


or event routine.

Example of resources that can need protection from access at the same time:

•Use of some RAPID routines with function problems when executed in parallel.
•Use of the FlexPendant - Operator Log

MAIN program task: BACK1 program task:


PERS bool tproutine_inuse := FALSE; PERS bool tproutine_inuse := FALSE;

...WaitTestAndSet tproutine_inuse; ...WaitTestAndSet tproutine_inuse;


TPWrite "First line from MAIN"; TPWrite "First line from BACK1";
© ABB Inc. -58

TPWrite "Second line from MAIN"; TPWrite "Second line from BACK1";
TPWrite "Third line from MAIN"; TPWrite "Third line from BACK1";
tproutine_inuse := FALSE; tproutine_inuse := FALSE;
IRC5 Expert Programming

Multi-Tasking Example
An Example of an Interrupt driven Background Task may look like this:
 
MODULE ABB
VAR intnum intGasFlowFault:=0;
VAR intnum intGeneralFault:=0;
 
TRAP TrapFault
<SMT>
ENDTRAP
 
PROC main()
CONNECT intGasFlowFault WITH TrapFault;
ISignalDI\Single,di1GasFlow,1,intGasFlowFault;
CONNECT intGeneralFault WITH TrapFault;
ISignalDI\Single,di2GeneralFault,1,intGeneralFault;
.
.
.
WHILE TRUE DO
WaitTime 2;
ENDWHILE
RETURN;
ENDPROC
© ABB Inc. -59

ENDMODULE
IRC5 Expert Programming

Exercise 6
1. Create a background task that monitors input di4_Continue. When Input
di4_Continue is on then output do1_StyleAck1 and do2_StyleAck2 should
come on and vise versa. Set up and test.

2. Create another background task that monitors the robot position. If the
robot's faceplate is less than 500mm from the robot base X direction then
set output do3_StyleAck4 and write to the screen indicating that the robot
is close to the base. Setup task. Do Not Use World Zones for this
exercise.

3. Move the home position to with in 500mm of the base X direction. Run the
main task as well as the background task. Does do3_StyleAck4 come on
when the robot is home? Does this work when jogging the robot?

4. Create a background task that allows the operator to shift individual style
routines in the X, Y, or Z directions. This should happen when the operator
presses P1.
© ABB Inc. -60
Network Drive and Up/Down IRC5 Expert Programming
Loading
IRC5 Expert Programming

Load and Unload

Load
The __________ UnLoad
and _____________ instructions are used to Open and
Close a program modules during program execution.
Save, StartLoad, WaitLoad, and CancelLoad are other instructions.

Example:
 MODULE LoadMODFlp
CONST string stNames{4}:=["Part1.mod","Part2.mod","Part3.mod","Part4.mod"];
CONST string routineSTR:="rPart";
 
PROC main()
For i from 1 to 4 DO
Load "flp1:"\File:=stNames{i}; This is a "Late Binding". It is
%routineSTR%; needed here because if a regular
WaitTime 2; Procedure Call was used here a
reference error would be
UnLoad "flp1:"\File:=stNames{i}; generated when the unload
ENDFOR instruction is executed.
TPErase;
ENDPROC
ENDMODULE
© ABB Inc. -62
IRC5 Expert Programming

Static or Dynamic?
© ABB Inc. -63
IRC5 Expert Programming

Load and Unload Example

ON THE FLOPPY DISK:

File Part1.mod File Part2.mod


MODULE Part1 MODULE Part2
PROC rPart() PROC rPart()
TPWrite "This is Part 1 program"; TPWrite "This is Part 2 program";
ENDPROC ENDPROC
ENDMODULE ENDMODULE
   
File Part3.mod File Part4.mod
MODULE Part3 MODULE Part4
PROC rPart() PROC rPart()
TPWrite "This is Part 3 program"; TPWrite "This is Part 4 program";
ENDPROC ENDPROC
ENDMODULE ENDMODULE
   
 
 
© ABB Inc. -64
IRC5 Expert Programming

Setting up a Network Drive

Open…
Select a Program or a Module.

Massmemory Unit: PC:


\
.. up
© ABB Inc. -65
IRC5 Expert Programming

Setting up a Network Drive

NFS Client or FTP Client software option to do this.


The robot must have ______________________

NFS or FTP Server software to do this.


The computer must have __________________

To setup the robot the following Configurations must be setup:


 
ABB
____________ Control Panel : ____________
: _______________ Communication :
Configuration : _______________
  Physical Transmission Application
Channels and ____________
: ____________ Protocols and ____________
Protocols
© ABB Inc. -66
IRC5 Expert Programming

Setting up a Network Drive

Physical Channels :
 
lan1
Name __________

lan
Connector_______
 
Transmission Protocols:
 
TCPIP1
Name__________________

TCPIP
Type___________________

lan1
Physical Channel_________

An X-start must be performed


to set the IP address.
© ABB Inc. -67
IRC5 Expert Programming

Setting up a Network Drive

Application Protocols:

lan
Name _________________________ PC:
Local Path __________________
   
NFS or FTP
Type __________________________ /c/
Server Path _________________
   
0
User Name _________________
TCPIP1
Transmission Protocols____________
   
xxx.xxx.xxx.xxx
Server Address______________ 0
Password __________________
   
No or Yes
Trusted ____________________ 500
Max file size ________________
 
300
Memory Partition Size _________
 
© ABB Inc. -68
IRC5 Expert Programming

Setting up a Network Drive

Start NFS Server and create a User as shown below:


© ABB Inc. -69
IRC5 Expert Programming

Setting up a Network Drive

Also setup the Exports as shown below:

Remember to "Add" and then "OK".


© ABB Inc. -70
IRC5 Expert Programming

Setting up a Network Drive

Now give the robot access to the backups directory on the C: drive.
Click on the export location "/c/backups".
Press "ACCESS" and Add the "pc:" to the access list. Press OK.
© ABB Inc. -71
IRC5 Expert Programming

Setting up a Network Drive

When finished the Server screen should look like this:


© ABB Inc. -72
IRC5 Expert Programming

Exercise 7

1. Create 3 additional part style routines for your program. Name them
"rStyle3", "rStyle4", and "rStyle5".

2.      Save each routine in a separate Module, including rStyle1 and rStyle2


that were created earlier. Save them to a Directory on the memory stick
and the hard drive of the computer connected to the robot.

3.      Modify the Main routine so that the part style is selected from the teach
pendant. Then the corresponding module and routine should be down
loaded into the robot from the memory stick and run that style. Now try
using the computer hard drive instead of the memory stick.
© ABB Inc. -73
Serial Communications IRC5 Expert Programming
IRC5 Expert Programming

Serial Communications

The ABB robot controller has at least one serial channel:

Com1 – RS232
____________________

Instructions used to communicate over the Serial channel are:


Open
____________________
 
Write / WriteBin / WriteStrBin
____________________
 
Close
____________________

The functions used to read information from a serial channel is:


 
ReadStr
____________________
 
Readnum
____________________
© ABB Inc. -75
IRC5 Expert Programming

Serial Communications Example

Program Examples:

MODULE ABB MODULE ABB


VAR iodev iodev1; VAR iodev iodev1;
VAR String stNames:=""; Const String stNames{4}:=["Part1","Part2",
  "Part3","Part4"];
PROC main() PROC main()
Open "COM1",iodev1\Read; Open "COM1",iodev1\Write;
stNames:=ReadStr(iodev1); For i from 1 to 4 do
TPWrite stNames; Write iodev1,stNames{i};
Waittime 2; Waittime 2;
Close iodev1; Endfor
TPErase; Close iodev1;
Return; Return;
ENDPROC ENDPROC
ENDMODULE ENDMODULE
© ABB Inc. -76
IRC5 Expert Programming

Serial Communications Example


Program Example:
MODULE ABB
VAR bool flag1:=FALSE;
VAR iodev iodev1;
VAR string stNames:="";
 
PROC main()
Open "COM1",iodev1\Read;
TPErase;
TPWrite "Enter number";
stNames:=ReadStr(iodev1\RemoveCR);
flag1:=StrToVal(stNames,reg1);
IF flag1=FALSE RETURN;
FOR i FROM 1 TO reg1 DO
TPWrite stNames;
WaitTime 2;
ENDFOR
Close iodev1;
TPErase;
ENDPROC
ENDMODULE
© ABB Inc. -77
IRC5 Expert Programming

Serial Communications

Setup Hyperterminal to communicate at a baud rate of 9600 with no flow control.

Set Hyperterminal properties to the following:


 
Properties : Settings : Ascii Setup and choose

       Send line Ends


     Echo typed characters
     Append line feed
© ABB Inc. -78
IRC5 Expert Programming

Exercise 8

1. Add to your existing program. Have the robot wait for an input from the
computer to tell the robot how many parts to produce. (Use Hyperterminal for
the entry device)
© ABB Inc. -79
3D Frame Displacement IRC5 Expert Programming
IRC5 Expert Programming

3D Frame Displacement

Often we use a vision system to Displace the positions that the robot
moves to.

In the vision example, the amount of


displacement is sent from the vision computer
to the robot.
© ABB Inc. -81
IRC5 Expert Programming

3D Frame Displacement

The robot then puts the displacement information into a

Pose
_____________ data.

PDispSet
To activate the displacement information use the ____________
instruction.
 
© ABB Inc. -82
IRC5 Expert Programming

3D Frame Displacement

We can also use a sensor on the end of the robot arm to search for the
position of the part.
© ABB Inc. -83
IRC5 Expert Programming

3D Frame Displacement

The Functions used to calculate displacement after the searches are:


 
DefFrame (p1, p2, p3) – Creates a frame
________________________________
 
DefDFrame (pO1, pO2, pO3, pN1, pN2, pN3 )
________________________________
Creates a frame Difference.
© ABB Inc. -84
IRC5 Expert Programming

Exercise 9

1. Add to the existing program. Have the robot wait for an input from the
computer for an amount of displacement to apply to the program.

2. Now redo the same section of the program only have the robot search for
the position of the table and displace the program accordingly.
© ABB Inc. -85
Advanced Rapid IRC5 Expert Programming
IRC5 Expert Programming

What is Advanced Rapid

Refer to the application manual – Engineering Tools


© ABB Inc. -87
OPC Servers IRC5 Expert Programming
IRC5 Expert Programming

Introduction to OPC Server

 OPC = OLE for Process Control


(OLE = Object Linking and Embedding)

 A widely-accepted standard that specifies mechanisms


through which sources (e.g. devices on the factory floor) can
communicate their data to a client application in a well-defined,
consistent way.

 Based on Microsoft COM and DCOM technologies


COM = Component Object Model
DCOM = Distributed COM

 Shipped with every robot on the System CD.


© ABB Inc. -89
IRC5 Expert Programming

ABB IRC5 OPC Configurator

The Configuration tool is used to set up the communications with the robots.
Remember to save when setup is done. The file is used by OPC Server.
© ABB Inc. -90
IRC5 Expert Programming

Softing OPC Toolbox Demo Client


This is a sample. The Softing software does NOT come with the
robot CD.
© ABB Inc. -91
IRC5 Expert Programming

Exercise 11

1. Load and setup the ABB IRC5 OPC Configuration Software.

2. Load and run the Softing OPC Toolbox Demo Client


© ABB Inc. -92
User Authorization System IRC5 Expert Programming
IRC5 Expert Programming

User Authorization Overview

This presentation will cover the following topics


 Introduction to the user authorization system
 Grants
 Users and Groups
 Default User
 Lifetime of user login
 The UAS Tool
© ABB Inc. -94
IRC5 Expert Programming

User Authorization System

 The User Authorization System (UAS) information


defines the users and groups that can access the
controller, and what actions they are granted to do.
 The UAS works as a protection layer which requires a
user to logon, with password, to the robot controller
before using some of the functionality.
© ABB Inc. -95
IRC5 Expert Programming

User Authorization System

 Depending on which roles (groups) the user is assigned


to, he/she is granted access to certain functionality while
other functionality will be inaccessible.
 The UAS settings apply to all tools for communicating
with the controller, like e.g. RobotStudioOnline,
FlexPendant, IRC5 OPC-Server.
 The user authorization is managed by the controller,
which means that the UAS settings remains for the
controller regardless of which system it is running.
© ABB Inc. -96
IRC5 Expert Programming

Grants

 Which functionality a certain group has access to, is


controlled by assigning a list of grants to that group.
 Two types of grants exist, controller grants and
application grants.
 Controller grants is validated by the robot controller and apply to
all tools and devices accessing the controller
 Application grants is used by a specific application e.g.
FlexPendant and will only be valid using that application.
Application grants can be added by additional options and used
in customer applications.
© ABB Inc. -97
IRC5 Expert Programming

Grants
© ABB Inc. -98
IRC5 Expert Programming

Grants
© ABB Inc. -99
IRC5 Expert Programming

Users and Groups

 A user name is associated with one or more user group


(role).
 If the user belongs to more than one group, the user has
access to all the grants specified as included in any of
the groups.
 User names, passwords and user groups are case
sensitive strings with the max length of 16 characters
ISO Latin 1
© ABB Inc. -100
IRC5 Expert Programming

Users – Grants – Grants Relation

Users Groups
Service
Peter
Backup
****
Restore
UAS
Sys adm
Sys adm
Admin
Backup UAS Grants
Restore Sys adm
© ABB Inc. -101
IRC5 Expert Programming

Login and Logout

 All users except the default user needs to login


 Several users can access the same controller
simultaneously from different tools/locations.
 All users are automatically logged out at system
restart/power down.
 A current FlexPendant user will normally be logged out
when switching to automatic mode. This can be
prevented for selected users by a special FP application
grant.
© ABB Inc. -102
IRC5 Expert Programming

The Default User

 The “Default User” is always present.


 When you connect a tool or pendant it normally starts as
the default user and no login is required as long as you
want to access the controller with the default user
privileges.
 Note: By default the default users have unrestricted
access to the controller. To make use of UAS you need
to limit the default user privileges.
© ABB Inc. -103
IRC5 Expert Programming

The UAS Editor in Robot Studio Online


© ABB Inc. -104
IRC5 Expert Programming

UAS Administration

 An UAS administrator configures the different


roles, the users, the list of grants for each role,
and which roles a user are assigned to. The
available list of grants, i.e., which functionality
that is possible to restrict access to, is
predefined.
 For changes in the UAS settings to take effect
for a user, all logged on instances of the user
must be logged off. When the user is logged on
again, the new settings are active.
© ABB Inc. -105
IRC5 Expert Programming

Special Bypassing of UAS

 It is possible to disable UAS by typing the consol


command uas_disable on the main computer console
and then do a restart. That is, only persons that have
access inside the cabinet, can disable UAS.
 When UAS is disabled, users connected to the service
port and the pendant get full access to the controller. No
connection is possible via the LAN port, and the
controller will not report the existence of the controller on
the LAN.
 UAS is enabled again at next restart.
© ABB Inc. -106
IRC5 Expert Programming

User Information in Event Log


© ABB Inc. -107
IRC5 Expert Programming

Exercise 10

1. Create User’s and User Groups for all members of the class.
2. Change the default user to have no access.
3. Log in as each user and test accessibility.
4. Use the “back door” to get full accessibility.
© ABB Inc. -108

You might also like