You are on page 1of 66

Application manual

Additional options
Controller software IRC5
RobotWare 5.0
Application manual
Additional options
RobotWare 5.0

Document ID: 3HAC023668-001


Revision: -
The information in this manual is subject to change without notice and should not be
construed as a commitment by ABB. ABB assumes no responsibility for any errors that
may appear in this manual.
Except as may be expressly stated anywhere in this manual, nothing herein shall be
construed as any kind of guarantee or warranty by ABB for losses, damages to persons
or property, fitness for a specific purpose or the like.
In no event shall ABB be liable for incidental or consequential damages arising from
use of this manual and products described herein.
This manual and parts thereof must not be reproduced or copied without ABB’s written
permission, and contents thereof must not be imparted to a third party nor be used for
any unauthorized purpose. Contravention will be prosecuted.
Additional copies of this manual may be obtained from ABB at its then current charge.

© Copyright 2004 ABB All right reserved.


ABB Automation Technologies AB
Robotics
SE-721 68 Västerås
Sweden
7DEOHRI&RQWHQWV

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Product documentation, M2004 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Safety. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

,QWURGXFWLRQ 
1.1 About additional options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Required files and file structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3 Example explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2SWLRQIXQFWLRQDOLW\ 
2.1 RAPID code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
(YHQWORJPHVVDJHV 
2.2.1 About event log messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.2 Event log texts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2.3 Event log titles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6\VWHPSDUDPHWHUV
2.3.1 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.2 Man-machine communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.3.3 Example cfg files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
,5&FRPSDUHGWR6
2.4.1 Concerning modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3DFNDJHWKHRSWLRQ 
3.1 About the option package structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2 version.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
LQVWDOOFPG 
3.3.1 Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3.2 Examples of install.cmd files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

&'.H\0DNHU 
4.1 Installing CD Key Maker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.2 Creating an option key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.3 Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

3HAC023668-001 Revision: - 3

Overview

2YHUYLHZ

$ERXW7KLV0DQXDO
This manual contains instructions for how to create your own option to use with ABB’s robot
systems.

8VDJH
With the help of this manual, you can package functionality into an option and create a key
that allows access to the option.

:KR6KRXOG5HDG7KLV0DQXDO"
This manual is intended for:
• line builders that want to implement the same program solution on many robots
• ABB's partners, selling the robot systems with their own functionality added
• ABB companies selling robot systems

3UHUHTXLVLWHV
The reader should...
• be experienced in working with ABB robots
• be experienced RAPID programmer
• be familiar with system parameters

4 3HAC023668-001 Revision: -
Overview

2UJDQL]DWLRQRI&KDSWHUV
The manual is organized in the following chapters:

&KDSWHU &RQWHQWV
1. Introduction Explains the purpose of additional options and gives an
overview of the files to create.
2. Option functionality The RAPID source code, event log message XML files and
configuration of system parameters.
3. Package the option How to package and structure the option. Explains the files
necessary for installation of the option.
4. CD Key Maker The tool CD Key Maker, used to create a key for the option,
and encrypt source code.

5HIHUHQFHV

5HIHUHQFH 'RFXPHQW,G
Technical reference manual - System parameters 3HAC 17076-1
Operator’s manual - RobotStudioOnline 3HAC 18236-1

5HYLVLRQV

5HYLVLRQ 'HVFULSWLRQ
- First edition

3HAC023668-001 Revision: - 5

Product documentation, M2004

3URGXFWGRFXPHQWDWLRQ0

*HQHUDO
The robot documentation may be divided into a number of categories. This listing is based on
the type of information contained within the documents, regardless of whether the products
are standard or optional. This means that any given delivery of robot products ZLOOQRWFRQWDLQ
DOO documents listed, only the ones pertaining to the equipment delivered.
However, all documents listed may be ordered from ABB. The documents listed are valid for
M2004 robot systems.

+DUGZDUHPDQXDOV
All hardware, robots and controller cabinets, will be delivered with a 3URGXFWPDQXDO which
is divided into two parts:
3URGXFWPDQXDOSURFHGXUHV
• Safety information
• Installation and commissioning (descriptions of mechanical installation, electrical
connections and loading system software)
• Maintenance (descriptions of all required preventive maintenance procedures
including intervals)
• Repair (descriptions of all recommended repair procedures including spare parts)
• Additional procedures, if any (calibration, decommissioning)
3URGXFWPDQXDOUHIHUHQFHLQIRUPDWLRQ
• Reference information (article numbers for documentation referred to in Product
manual, procedures, lists of tools, safety standards)
• Part list
• Foldouts or exploded views
• Circuit diagrams

6 3HAC023668-001 Revision: -
Product documentation, M2004

5RERW:DUHPDQXDOV
The following manuals describe the robot software in general and contain relevant reference
information:
• 5$3,'2YHUYLHZ: An overview of the RAPID programming language.
• 5$3,'UHIHUHQFHPDQXDOSDUW: Description of all RAPID instructions.
• 5$3,'UHIHUHQFHPDQXDOSDUW: Description of all RAPID functions and data types.
• 7HFKQLFDOUHIHUHQFHPDQXDO6\VWHPSDUDPHWHUV: Description of system
parameters and configuration workflows.

$SSOLFDWLRQPDQXDOV
Specific applications (e.g. software or hardware options) are described in $SSOLFDWLRQ
PDQXDOV. An application manual can describe one or several applications.
An application manual generally contains information about:
• The purpose of the application (what it does and when it is useful)
• What is included (e.g. cables, I/O boards, RAPID instructions, system parameters)
• How to use the application
• Examples of how to use the application

2SHUDWRU
VPDQXDOV
This group of manuals is aimed at those having first hand operational contact with the robot,
i.e. production cell operators, programmers and trouble shooters. The group of manuals
include:
• 2SHUDWRU
VPDQXDO,5&ZLWK)OH[3HQGDQW
• 2SHUDWRU
VPDQXDO5RERW6WXGLR2QOLQH
• 7URXEOHVKRRWLQJPDQXDO for the controller and robot

3HAC023668-001 Revision: - 7

Safety

6DIHW\

6DIHW\RISHUVRQQHO
A robot is heavy and extremely powerful regardless of its speed. A pause or long stop in
movement can be followed by a fast hazardous movement. Even if a pattern of movement
is predicted, a change in operation can be triggered by an external signal resulting in an
unexpected movement.
Therefore, it is important that all safety regulations are followed when entering safeguarded
space.

6DIHW\UHJXODWLRQV
Before beginning work with the robot, make sure you are familiar with the safety regulations
described in 2SHUDWRU
VPDQXDO,5&ZLWK)OH[3HQGDQW.

8 3HAC023668-001 Revision: -
,QWURGXFWLRQ
1.1. About additional options

,QWURGXFWLRQ
$ERXWDGGLWLRQDORSWLRQV

3XUSRVH
The purpose of additional options is that a robot program developer outside of ABB can
create options for the ABB robot systems, and sell the options to their customers.

:KDWLVDQDGGLWLRQDORSWLRQ
An additional option can include a number of RAPID modules, system modules or program
modules, which hold the basic code for the option. It also includes some files for loading and
configuration at start up. It may also include xml-files with messages in different languages.
An additional option can also consist of more advanced coding, such as Visual Basic or C#
code, for FlexPendant applications. This manual will cover the first case, with coding done
in RAPID only. For the second case you need the product Robot Application Builder.

:KDWLVGHOLYHUHGIURP$%%
What you need from ABB to create your own option is:
• the tool &'.H\0DNHU
• a licence to &'.H\0DNHU for your option name

%DVLFDSSURDFK
These are the major steps for creating an additional option. More detailed descriptions are
given later in this manual.
 Order a license key from ABB for your specific additional option name.
 Create the RAPID code for the option (see 5$3,'FRGH on page 15).
 Create the error message files (see (YHQWORJPHVVDJHV on page 18).
 Create configuration files for system parameters (see 6\VWHPSDUDPHWHUV on page 23).
 Create the file version.xml (seeYHUVLRQ[PO on page 42 ).
 Create the file install.cmd (see LQVWDOOFPG on page 44).
 Create an option key (see &'.H\0DNHU on page 57).

3HAC023668-001 Revision: - 9
,QWURGXFWLRQ
1.1. About additional options

 Place the option folder in the mediapool and select the option when creating a robot
system with RobotStudioOnline (see 2SHUDWRU
VPDQXDO5RERW6WXGLR2QOLQH).

3UHUHTXLVLWHV
The tools &'.H\0DNHUand HQFRGH are delivered from ABB as .zip files. To be able to open
them you need a program such as :LQ=LS.

6HOHFWLRQVZLWKLQRSWLRQV
An option can contain selections (i.e. optional functionality selectable at installation). This is
not described in this manual. If you need this functionality, contact ABB for more
information.

10 3HAC023668-001 Revision: -
,QWURGXFWLRQ
1.2. Required files and file structure

5HTXLUHGILOHVDQGILOHVWUXFWXUH

2SWLRQIROGHU
All the files for an option should be placed in a folder with the same name as the option.
When creating a robot system with the option, the option folder must be placed in the
mediapool (e.g. C:\Program Files\ABB Industrial IT\Robotics IT\Mediapool).
7,3
An installation script can be used for copying the option folder from an installation CD to the
mediapool.

)LOHVLQWKHIROGHU
An option consists of a number of files that you need to create in order to make your own
option.

)LOHW\SH 'HVFULSWLRQ 0RUHLQIR


.kxt A key file that allows access to the option functionality. &'.H\0DNHU on
page 57
version.xml Name, version number and description of the option. YHUVLRQ[PO on
page 42
install.cmd Installation script. E.g. specifies which .cfg files to load. LQVWDOOFPG on page
44
.cfg One or several .cfg files with the configuration of system 6\VWHP
parameters. One of the .cfg files should specify which SDUDPHWHUV on
RAPID module (.sys file) to load. page 23
.sys or .mod The RAPID source code. 5$3,'FRGH on
page 15

(YHQWORJPHVVDJHILOHV
If the option contains customized event log messages, two XML files for each language are
required. These are placed in a specific folder for each language:
• <option folder>\language\<language code>\<option name>_elogtext.xml
• <option folder>\language\<language code>\<option name>_elogtitles.xml

3HAC023668-001 Revision: - 11
,QWURGXFWLRQ
1.2. Required files and file structure

The language codes consist of two letters and are defined by the standard ISO 639.
See (YHQWORJPHVVDJHV on page 18.

,OOXVWUDWLRQ
This illustration shows the folders and files that should be present on the PC where a robot
system, containing the option, should be created. Note that mmc.cfg and the folder language
(and everything in that folder) are optional.

en0500001395

12 3HAC023668-001 Revision: -
,QWURGXFWLRQ
1.3. Example explanation

([DPSOHH[SODQDWLRQ

3XUSRVHRIWKHH[DPSOH
Throughout this manual, an example option is used to illustrate how to implement an
additional option. This option is called CIRCLEMOVE.
Some parts of this manual have detailed reference information for commands and syntax used
in the option files. Looking at the examples can be a way of solving your problem without
having to read all the reference information.

&RQWHQWRIH[DPSOHRSWLRQ
The option CIRCLEMOVE contains an instruction called MoveCircle that will move the
robot in a complete circle. This instruction is added to a pick list on the FlexPendant and
behaves just like one of the original instructions.
Error messages are stored in XML files (in this example only in English), and are used in the
RAPID code.

3HAC023668-001 Revision: - 13
,QWURGXFWLRQ
1.3. Example explanation

14 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.1. RAPID code

2SWLRQIXQFWLRQDOLW\
5$3,'FRGH

2YHUYLHZ
The RAPID code, implementing the functionality of your option, is written in a system
module (.sys) file (preferably <optionname>.sys).
7,3
By setting the argument NOSTEPIN on the module, stepwise execution of the RAPID
program will not step into the module. This makes a routine written in the module behave
much like an instruction delivered from ABB.
127(
The RAPID code of an option must be valid even before the base variables have been
declared. Therefor, the code cannot contain tool0, wobj0, load0, predefined zonedata (e.g.
z50) or predefined speeddata (e.g. v1000).

5$3,'FRGHH[DPSOH
This is an example of how to create your own move instruction and how to use your own error
messages. An instruction, MoveCircle, is created that moves the robot TCP in a circle around
a robtarget, with the radius given as argument. If MoveCircle is called with a too small
radius, a message defined in an XML file is written to the event log (see (YHQWORJWH[WV on
page 19).
%%%
VERSION:1
LANGUAGE:ENGLISH
%%%

MODULE CIRCLEMOVE(SYSMODULE, NOSTEPIN)

VAR errnum ERR_CIRCLE:= -1;


VAR num errorid := 5001;

PROC MoveCircle(

3HAC023668-001 Revision: - 15
2SWLRQIXQFWLRQDOLW\
2.1. RAPID code

robtarget pCenter,
num Radius,
speeddata Speed,
zonedata Zone,
PERS tooldata Tool
\PERS wobjdata WObj)

VAR robtarget p1;


VAR robtarget p2;
VAR robtarget p3;
VAR robtarget p4;

BookErrNo ERR_CIRCLE;
IF Radius < 2 THEN
ErrRaise "ERR_CIRCLE", errorid, ERRSTR_TASK, "Radius",
NumToStr(Radius,2), "2", ERRSTR_CONTEXT;
ENDIF

p1:=pCenter;
p2:=pCenter;
p3:=pCenter;
p4:=pCenter;
p1.trans:=pCenter.trans+[0,Radius,0];
p2.trans:=pCenter.trans+[Radius,0,0];
p3.trans:=pCenter.trans+[-Radius,0,0];
p4.trans:=pCenter.trans+[0,-Radius,0];

MoveL p1,Speed,Zone,Tool\WObj?WObj;
MoveC p2,p3,Speed,z10,Tool\WObj?WObj;
MoveC p4,p1,Speed,Zone,Tool\WObj?WObj;

BACKWARD
MoveL p1,Speed,Zone,Tool\WObj?WObj;

ERROR

16 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.1. RAPID code

IF ERRNO = ERR_CIRCLE THEN


TPWrite "The radius is too small";
RAISE;
ENDIF

ENDPROC
ENDMODULE

3HAC023668-001 Revision: - 17
2SWLRQIXQFWLRQDOLW\
2.2.1. About event log messages

(YHQWORJPHVVDJHV

$ERXWHYHQWORJPHVVDJHV

2YHUYLHZ
It is possible to create your own event log messages. The text of the message is placed in one
XML file for each language. You can then use the RAPID instructions ErrRaise and
ErrLog to raise an error using this message. Language independent strings can be used as
arguments to ErrRaise and ErrLog, and be included in the message.
127(
The robot system that will use the customized event log messages must have the RobotWare
option Advanced RAPID. If you attempt to install an additional option with customized event
log messages on a system that does not have Advanced RAPID, the additional option will not
be loaded.

7ZR;0/ILOHV
Your event log messages are added to the system via two XML files. One XML file contains
all the information about the messages. The other one contains only their message number
and title, but is currently required for technical reasons.
These files can be given any name, as long as the installation script install.cmd points out the
correct file names. In order to know what the files are, it is recommended to use the following
names:
• <option name>_elogtext.xml
• <option name>_elogtitles.xml

18 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.2.2. Event log texts

(YHQWORJWH[WV

2YHUYLHZ
All event log messages you want to add to the system must be written in an XML file. The
messages must have unique numbers, within its domain, which are used to reference the
message text from the RAPID code.

([SODQDWLRQRIWKH;0/ILOH
This is a list of the XML tags and arguments that you may need to define. All other tags and
arguments should always look like in the example below. The complete syntax is also shown
in the example below.

;0/WDJRUDUJXPHQW 'HVFULSWLRQ
domainNo Event log messages are divided into different domains. Domain
number 11 is called "Process" and have message numbers 5000
to 9999 reserved for non-ABB messages. For additional options,
always use domain 11 to avoid conflict with messages defined by
ABB.
lang Language code for the text in the messages. The same two-letter
code as the name of the folder where the message XML files are
placed. This code is defined by the standard ISO 639.
min The first message number in this file.
max The last message number in this file.
Message Create one instance of Message for each error message.
number A unique number, between 5000 and 9999, identifying the error
message.
Make sure that the systems using this option will not have other
options using the same message numbers.
eDefine A unique name for the message. Keep it short and descriptive.
Title The message title that will be shown in the event log.
Description The text describing the error, shown in the event log.
arg A string used as argument in the ErrRaise or ErrLog
instruction will be inserted in the message.
format The format of the argument sting from ErrRaise or ErrLog.
E.g. "%.40s" means that the string cannot be longer than 40
characters.

3HAC023668-001 Revision: - 19
2SWLRQIXQFWLRQDOLW\
2.2.2. Event log texts

;0/WDJRUDUJXPHQW 'HVFULSWLRQ
ordinal Determines which string argument from ErrRaise or ErrLog
that should be used in this arg tag. E.g. "1" means that the first
string argument is used.

([DPSOHRI;0/ILOH
This XML file contains the text for an error message that will look similar to this:

en0500001417

20 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.2.2. Event log texts

<?xml version="1.0" encoding="utf-8"?>


<!--*********************************************-->
<!--The text description file for Elog Messages -->
<!-- -->
<Domain elogDomain="" domainNo="11" lang="en"
elogTextVersion="1.0" xmlns="urn:abb-robotics-elog-text"
min="5001" max="5001">
<Message number="5001" eDefine="ERR_ARG_TO_SMALL">
<Title>Too small value on argument</Title>
<Description>
Task:
<arg format="%.16s" ordinal="1" />
<p />
The argument
<arg format="%.40s" ordinal="2" />
was set to
<arg format="%.20s" ordinal="3" />
but the minimum allowed value is
<arg format="%.20s" ordinal="4" />
.
<p />
Context:
<arg format="%.40s" ordinal="5" />
<p />
</Description>
</Message>
</Domain>

3HAC023668-001 Revision: - 21
2SWLRQIXQFWLRQDOLW\
2.2.3. Event log titles

(YHQWORJWLWOHV

2YHUYLHZ
For the internal handling of event log messages, an XML file listing the message numbers
and their titles is necessary.

([SODQDWLRQVWRWKH;0/ILOH
This is a list of the XML tags and arguments that you may need to define. For the complete
syntax, see the example below.

;0/WDJRUDUJXPHQW 'HVFULSWLRQ
Title Create one instance of Title for each event log message.
The text in the Title tag should be the same as in the event log
text XML file.
number The same event log message number as in the event log text
XML file.

([DPSOHRI;0/ILOH
<?xml version="1.0" encoding="utf-8"?>
<ExtractTitles>
<Title domain="11" number="5001">Too small value on argument</
Title>
</ExtractTitles>

22 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.1. Controller

6\VWHPSDUDPHWHUV

&RQWUROOHU

$ERXWWKHWRSLF&RQWUROOHU
This section describes system parameters that must be defined in the topic &RQWUROOHU (i.e. in
the configuration file sys.cfg).
The configuration of which program modules to load is made in the topic &RQWUROOHU. All files
containing the RAPID code for the option must be defined here.
For more information about the types and parameters of the &RQWUROOHU topic, see 7HFKQLFDO
UHIHUHQFHPDQXDO6\VWHPSDUDPHWHUV.

$XWRPDWLFORDGLQJRIPRGXOHV &$%B7$6.B02'8/(6
The type CAB_TASK_MODULES is used to define modules to be loaded when the
controller is started.

3DUDPHWHU 'HVFULSWLRQ
File The name of the file including the path on the controller.
An environment variable, defined in install.cmd, can preferably be
used. I.e. "<environment variable>:/<file name>".
Task Name of a task, if it should only be loaded to one task.
Install A module can be loaded or installed.
A loaded module will behave like a module manually loaded from the
teach pendant, e.g. it will be included in any back up of the system.
An installed module will behave like a built in module. By default the
attributes NOVIEW and NOSTEPIN are set, even if not stated in the
module declaration. Thus it will not be visible from the FlexPendant
and can only be removed by a cold start. It will not be possible to step
into a routine in such a module with FWD. An installed module will not
be included in a back up of the system.
It is recommended that all application modules are installed as built in
modules, since then they will be handled as part of the controller and
quite separated from the user´s modules.
Txres To be used if the RAPID code should be translated, e.g. if a RAPID
routine has different names in different languages.

3HAC023668-001 Revision: - 23
2SWLRQIXQFWLRQDOLW\
2.3.1. Controller

3DUDPHWHU 'HVFULSWLRQ
Shared Defines if the module should be reachable from all tasks.
AllTask Defines if the module should be loaded into all tasks.

Example
CAB_TASK_MODULES:
-File "CIRCLEMOVE:/CircleMove.sys" -Install -AllTask

24 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

0DQPDFKLQHFRPPXQLFDWLRQ

$ERXWWKHWRSLF0DQPDFKLQHFRPPXQLFDWLRQ
This section describes some of the types and system parameters in the topic 0DQPDFKLQH
FRPPXQLFDWLRQ (i.e. the configuration file mmc.cfg). It is used to define how a self-developed
instruction should be presented on the FlexPendant, e.g. which menu to select it from (pick
lists) and which argument values should be used as default (RAPID rules).
A short example is given for each type, and an example of an entire cfg file is shown after the
type descriptions.

3LFNOLVWV 00&B0&00&B0&00&B0&
The pick lists (e.g. 00&B0&) are used to configure which instructions will be present in
each pick list.

3DUDPHWHU 'HVFULSWLRQ
name The name of the instruction.

127(
The pick list types contains more parameters and more functionality. For more information
about these, see 7HFKQLFDOUHIHUHQFHPDQXDO6\VWHPSDUDPHWHUV.

Example
MMC_MC1 = MMC_PALETTE:
-name MoveCircle

,QVWUXFWLRQDUJXPHQWV 00&B5($/B5287,1(
00&B5($/B5287,1( is used to define which instruction arguments should have proposed
values, i.e. a default value when the instruction is added on the FlexPendant.

3DUDPHWHU 'HVFULSWLRQ
name The instruction name.

3HAC023668-001 Revision: - 25
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

3DUDPHWHU 'HVFULSWLRQ
default_struct Defines which arguments should have proposed values.
0: No proposed value
1: A proposed value. If alternative arguments, 1 indicates that the first
alternative argument should be used with a proposed value.
2: Only for alternative arguments. The second alternative argument should
be used with a proposed value.
3: Only for alternative arguments. The third alternative argument should be
used with a proposed value.
4: Only for alternative arguments. The fourth alternative argument should
be used with a proposed value.
hidden Defines if the instruction should be hidden when showing RAPID routines.
If KLGGHQ is set, the instruction will not be shown when choosing an
instance for ProcCall or Move PP to Routine.
For changes of the KLGGHQ parameter to take effect, a P-start or I-start is
required. A warm start is not enough.

7,3
It is not necessary to specify GHIDXOWBVWUXFW if there should only be proposed values for
required arguments.

Example
The instruction TriggInt is defined with the following arguments:
TriggInt TriggData Distance [\Start] | [\Time] Interrupt

$UJXPHQW $UJXPHQWQXPEHU $UJXPHQWDOWHUQDWLYH


TriggData 1 0
Distance 2 0
Start 3 1
Time 3 2
Interrupt 4 0

26 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

Note that Start and Time are alternative arguments and therefor have the same argument
number.
The following alternatives are examples of how to configure an instance of the type
MMC_REAL_ROUTINE:
Proposed values for TriggData, Distance and Interrupt (the same result as if default_struct is
not defined):
-name TriggInt -default_struct 1,1,0,1
Proposed values for TriggData, Distance, Start and Interrupt:
-name TriggInt -default_struct 1,1,1,1
Proposed values for TriggData, Distance, Time and Interrupt:
-name TriggInt -default_struct 1,1,2,1

$UJXPHQWUHXVH 00&B,167B127B5(86,1*B35(9B237B$5*
The proposed value of an instruction argument can be the same as (or in sequence with) the
same argument for a previous instruction. For example, if a work object has been used in the
previous move instruction, the same work object is proposed when a new move instruction is
added.
If the reusing of argument values is not desired for some arguments, those arguments are
specified in the type 00&B,167B127B5(86,1*B35(9B237B$5*.
Even if GHIDXOWBVWUXFW in the type 00&B5($/B5287,1( is set to 0, an argument used in the
previous instruction will be used in the next instruction. To avoid this, these arguments must
also be specified in 00&B,167B127B5(86,1*B35(9B237B$5*.

3DUDPHWHU 'HVFULSWLRQ
param_nr Specifies the argument numbers that should not reuse values from
previous instruction calls.

Example
The instruction MoveL is defined with the following arguments:
MoveL [\Conc] ToPoint [\ID] Speed [\V] | [\T] Zone [\Z] [\Inpos]
Tool [\WObj] [\Corr]

3HAC023668-001 Revision: - 27
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

As the arguments Conc, V, T, Z and Inpos should not be reused, the instance of
MMC_INST_NOT_REUSING_PREV_OPT_ARG would look like this:
MMC_INST_NOT_REUSING_PREV_OPT_ARG:
-name MoveL -param_nr 1,5,7,8
Note that both V and T have argument number 5, as they are alternative arguments.

$UJXPHQW1DPH5XOHV 00&B5($/B3$5$0
The type 00&B5($/B3$5$0 is used to specify how to generate the proposed identifier for
instruction arguments.
Even arguments that have GHIDXOWBVWUXFW in 00&B5($/B5287,1( set to 0 and are defined
in SDUDPBQU in 00&B,167B127B5(86,1*B35(9B237B$5* may need to be defined in
00&B5($/B3$5$0. No argument proposal will be used when the instruction is chosen
from a pick list, but if the argument is actively selected it will use the identifier specified in
00&B5($/B3$5$0.

3DUDPHWHU 'HVFULSWLRQ
name The instruction argument, defined as <instruction name>_<argument
name> (e.g. MoveL_Tool).
It is also possible to define a common argument name
(common_<argument name>) to be used in the type
MMC_COMMON_PARAM.

28 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

3DUDPHWHU 'HVFULSWLRQ
name_rule Specifies how the argument proposal should be generated. The following
rules can be used:
• NONE - Unexpanded placeholder. No proposal is generated.
• CUR - The parameter PHWKRG is used to define the argument
proposal. For example used when the tool argument should use
the current tool.
• DEF - The argument proposal should be a default value defined by
the parameter GHIBQDPH.
• SEQ - The argument proposal is based on the previous instruction
with a similar argument. Based on the identifier used in the
previous instruction, an increment of the index is used to create a
new identifier. For example, if the robtarget of the previous move
instruction is p10, the next move instruction will propose p20
(unless p20 is already used, then p30, p40, ... will be tried until an
identifier is found that is not already used). If no similar argument is
found, looking 100 instructions back, a data value is used instead
of an identifier.
• LAST - The argument proposal gets its value from the previous
instruction with a similar argument. If no similar argument is found,
looking 100 instructions back, a default value specified by
GHIBQDPH is used.
• VAL - No argument identifier is used. A literal value is used instead.
method Method to be called if QDPHBUXOH is CUR or SEQ. Supported methods are:
• hirule_robtarget - robtarget symbol name increment value
• hirule_jointtarget - jointtarget symbol name increment value
• hirule_tooldata - current tooldata
• hirule_wobjdata - current wobjdata
def_name Default name needed if QDPHBUXOH is LAST or DEF.

3HAC023668-001 Revision: - 29
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

Example
This example shows how some arguments for the MoveL instruction are configured. It also
defines the common arguments common_point, common_speed and common_zone, that are
used in the type MMC_COMMON_PARAM.

$UJXPHQW $UJXPHQWSURSRVDO
V If V is actively selected it should:
1. use the value from the last instruction using V
2. use the default value 1000
ID No identifier should be proposed for ID. A numeric value is proposed
instead. The proposed numeric value is defined in
00&B5($/B'$7$7<3(.
T If T is actively selected it should use the default value 5.
Z If Z is actively selected it should:
1. use the value from the last instruction using Z
2. use the default value 50
Tool The proposal for Tool should be defined by the method
hirule_tooldata.
WObj The proposal for WObj should be defined by the method
hirule_wobjdata.
common_point The proposal for common_point should:
1. be a sequential increase from the last robtarget
2. be defined by the method hirule_robtarget
common_speed The proposal for Tool should:
1. use the value from the last instruction using speeddata
2. use the default value 1000
common_zone The proposal for common_zone should:
1. use the value from the last instruction using zonedata
2. use the default value z50

30 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

MMC_REAL_PARAM:
-name MoveL_V -name_rule LAST -def_name 1000
-name MoveL_ID -name_rule VAL
-name MoveL_T -name_rule DEF -def_name 5
-name MoveL_Z -name_rule LAST -def_name 50
-name MoveL_Tool -name_rule CUR -method hirule_tooldata
-name MoveL_WObj -name_rule CUR -method hirule_wobjdata

-name common_point -name_rule SEQ -method hirule_robtarget


-name common_speed -name_rule LAST -def_name v1000
-name common_zone -name_rule LAST -def_name z50

$UJXPHQW,GHQWLILHU5XOHV 00&B&20021B3$5$0
With the type 00&B&20021B3$5$0, a common argument (defined in
00&B5($/B3$5$0) is used to define an argument proposal.
For example, a common argument defining proposals for all ToPoint arguments can be
defined in 00&B5($/B3$5$0. In 00&B&20021B3$5$0, the ToPoint argument for
all move instructions can use that common argument.

3DUDPHWHU 'HVFULSWLRQ
name The instruction argument, defined as <instruction
name>_<argument name> (e.g. MoveL_Tool).
common_space_name Name of the common argument defined in
00&B5($/B3$5$0.

Example
In this example the argument proposals for the MoveL arguments ToPoint, Speed and Zone
are defined by common_point, common_speed and common_zone.
MMC_COMMON_PARAM:
-name MoveL_ToPoint -common_space_name common_point
-name MoveL_Speed -common_space_name common_speed
-name MoveL_Zone -common_space_name common_zone

3HAC023668-001 Revision: - 31
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

'DWD9DOXH5XOHV 00&B5($/B'$7$7<3(
The type 00&B5($/B'$7$7<3( is used to specify how to generate the proposed value for
a data type.
When an instruction is added, the proposed argument identifiers are defined in
00&B5($/B3$5$0, while the values of those arguments are defined in
00&B5($/B'$7$7<3(.

3DUDPHWHU 'HVFULSWLRQ
name Name of the data type.
def_name Default base identifier for the data (e.g. tool). The identifier for the data is
created from the GHIBQDPH and an index. If nothing else is defined, the
index starts at 1 and the increment for each data is 1 (e.g. the first tooldata
is called tool1, the second is called tool2 and so on).
value_rule Specifies how the value of the new data should be generated:
• NONE - No initialize value for non-value data type.
• CUR - The parameter PHWKRG is used to define the data value. For
example used when a robtarget is given the value of the current
robot TCP.
• DEF - The data value should be a default value defined by the
parameter XVHBYDOXH.
• SEQ - The data value is based on the previous data of the same
data type. The previous value is increased with a value defined by
XVHBYDOXH. If no data is found, looking 100 statements back, a zero
value is used.
method Method to be called if YDOXHBUXOH is CUR. Supported methods are:
• hirule_robtarget - current robot TCP robtarget value
• hirule_jointtarget - current robot TCP jointtarget value
• hirule_tooldata - current tooldata value
• hirule_wobjdata - current wobjdata value
use_value Default value if YDOXHBUXOH is DEF or SEQ. Also used as increment value
if YDOXHBUXOH is SEQ.
object_type Data object type (i.e. CONST, VAR, PERS or TASK PERS).

32 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

3DUDPHWHU 'HVFULSWLRQ
validate_hook Method to be called when validating data. Supported methods are:
• hirule_validate_tooldata·
• hirule_validate_wobjdata·
• hirule_validate_robtarget·
• hirule_validate_orient·
• hirule_validate_pose·
• hirule_validate_progdisp·
• hirule_validate_loaddata

Example
This example defines the proposed values for the data types identno and robtarget.

'DWDW\SH 3URSRVHGGDWDYDOXH
identno If no identno exists, the value is 10. Otherwise the value from the last
identno is increased with 10.
robtarget The new robtarget gets the value of the current robot TCP.
A validation is used so that the value of a robtarget cannot be changed to
an incorrect format.

MMC_REAL_DATATYPE:
-name identno -def_name id -value_rule SEQ -use_value 10 \
-object_type CONST
-name robtarget -def_name p -value_rule CUR \
-method hirule_robtarget -object_type CONST\
-validate_hook hirule_validate_robtarget

3HAC023668-001 Revision: - 33
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

+LJKOLJKWDUJXPHQW 00&B6(/(&7B3$5$0
When an instruction is added, one of the arguments can be automatically selected for further
definitions. This is defined in the type 00&B6(/(&7B3$5$0. For example, when adding
a MoveC instruction, the CirPoint is set to the current TCP value and the ToPoint is selected
for the required modify position.

3DUDPHWHU 'HVFULSWLRQ
param_nr Parameter number for the argument to be selected.

Example
The instruction MoveC is defined with the following arguments:
MoveC [\Conc] CirPoint ToPoint [\ID] Speed [\V] | [\T] Zone [\Z]
[\Inpos] Tool [\WObj] [\Corr]
Since a modify position of ToPoint is required after the instruction is added, the argument
ToPoint is selected:
MMC_SELECT_PARAM:
-name MoveC -param_nr 3

:RUNREMHFWV 00&B,1675B:,7+B:2%-
If a work object argument has no other proposed value than Wobj0 (the default work object),
the argument should not be used. MMC_INSTR_WITH_WOBJ is used to specify these
arguments.

3DUDPHWHU 'HVFULSWLRQ
name Name of the instruction.
param_nr Argument number for the work object.

Example
MMC_INSTR_WITH_WOBJ:
-name MoveL -param_nr 10

34 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

&LUFXODUSRLQWV 00&B,1675B:,7+B&,5B32,17
If a MultiMove system has two synchronized move instructions with circular points, a modify
position should be able to modify both these circular points. The circular points are defined
in 00&B,1675B:,7+B&,5B32,17.

3DUDPHWHU 'HVFULSWLRQ
name Name of the instruction.
param_nr Argument number for the circular point.

Example
MMC_INSTR_WITH_CIR_POINT:-name MoveC -param_nr 2

$UJXPHQWVQRWDYDLODEOHIRUPRGLI\SRVLWLRQ 00&B12B02'326
00&B12B02'326 defines instruction arguments that should not be modified with modify
position, even though they are of data type robtarget or jointtarget.

3DUDPHWHU 'HVFULSWLRQ
name The instruction argument, defined as <instruction name>_<argument
name> (e.g. MoveL_Tool).

Example
The instruction MToolTCPCalib is defined with the following arguments:
MToolTCPCalib Pos1 Pos2 Pos3 Pos 4 Tool MaxErr MeanErr
Pos1, Pos2, Pos3, Pos4 are of type jointtarget but should not be available for modify position:
MMC_NO_MODPOS:
-name MToolTCPCalib_Pos1
-name MToolTCPCalib_Pos2
-name MToolTCPCalib_Pos3
-name MToolTCPCalib_Pos4

3HAC023668-001 Revision: - 35
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

%HWZHHQSRLQWV 00&B12B3&B029(0(17
For instructions with between point, such as MoveC, the program pointer should not continue
to the next instruction after modify position of the between point. The type
00&B12B3&B029(0(17 is used to define the between points for which a modify
position will not move the program pointer to the next instruction.

3DUDPHWHU 'HVFULSWLRQ
name The instruction argument, defined as <instruction
name>_<argument name> (e.g. MoveC_CirPoint).

Example
MMC_NO_PC_MOVEMENT:
-name movec_cirpoint

6HUYLFHURXWLQHV 00&B6(59B5287B6758&7
00&B6(59B5287B6758&7 is used to specify instructions that should be defined as
service routines.

3DUDPHWHU 'HVFULSWLRQ
name Instruction name.

Example
In this example the instruction LoadIdentify is defined as a service routine:
MMC_SERV_ROUT_STRUCT:
-name LoadIdentify

&KDQJHRIPRWLRQPRGH 00&B&+$1*(B027,21B02'(
For some move instructions it is possible to change motion mode (e.g. from MoveL and
MoveJ). Which instructions allow change of mode and what instruction it is changed to is
defined in 00&B&+$1*(B027,21B02'(.

3DUDPHWHU 'HVFULSWLRQ
name Name of the existing instruction.

36 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.2. Man-machine communication

3DUDPHWHU 'HVFULSWLRQ
shift_name Name of the instruction it should be changed to.
shift_mode Motion mode of instruction after changing motion mode.
param_restr Defines an argument number. If this argument is set, change of
motion is not allowed.

Example
This example specifies that the instruction MoveL can be changed into an MoveJ instruction.
If the argument Corr is set this change of motion mode cannot be done.
MMC_CHANGE_MOTION_MODE:
-name MoveL -shift_name MoveJ -shift_mode Joint -param_restr 11
-name MoveJ -shift_name MoveL -shift_mode Linear

3HAC023668-001 Revision: - 37
2SWLRQIXQFWLRQDOLW\
2.3.3. Example cfg files

([DPSOHFIJILOHV

2YHUYLHZ
This section contains cfg example files for the option CIRCLEMOVE and the instruction
MoveCircle.

&LUFOH0RYHBV\VFIJ
This example uses the environment variable CIRCLEMOVE that is defined in install.cmd
(see ([DPSOHVRILQVWDOOFPGILOHV on page 54).
SYS:CFG_1.0::
# Installation of RAPID routines for option CircleMove
# $Revision: 1.7 $

CAB_TASK_MODULES:
-File "CIRCLEMOVE:/CircleMove.sys" -Install -AllTask

&LUFOH0RYHBPPFFIJ
The instruction MoveCircle is defined with the following arguments:
MoveCircle pCenter Radius Speed Zone Tool [\WObj]
To define how MoveCircle should behave on the FlexPendant, the following configuration is
placed in a file called CircleMove_mmc.cfg, which is added to the CircleMove option.
MMC:CFG_1.0::
# MMC : RAPID PROGRAMMING RULES FOR MODULE CIRCLEMOVE
# $Revision: 1.7 $

MMC_MC1 = MMC_PALETTE:
-name MoveCircle

MMC_REAL_ROUTINE:
-name MoveCircle -default_struct 1,1,1,1,1,0 -hidden

MMC_REAL_PARAM:
-name MoveCircle_pCenter -name_rule SEQ -method hirule_robtarget
-name MoveCircle_Radius -name_rule LAST def_name 10

38 3HAC023668-001 Revision: -
2SWLRQIXQFWLRQDOLW\
2.3.3. Example cfg files

-name MoveCircle_Speed -name_rule LAST -def_name v1000


-name MoveCircle_Zone -name_rule LAST -def_name z50
-name MoveCircle_Tool -name_rule CUR -method hirule_tooldata
-name MoveCircle_WObj -name_rule CUR -method hirule_wobjdata

MMC_INSTR_WITH_WOBJ:
-name MoveCircle -param_nr 6

3HAC023668-001 Revision: - 39
2SWLRQIXQFWLRQDOLW\
2.4.1. Concerning modules

,5&FRPSDUHGWR6

&RQFHUQLQJPRGXOHV

,QKHULWHGPRGXOHDWWULEXWHV
In S4 the attributes of a module, e.g. NOSTEPIN, were inherited to all routines called from a
routine in the nostepin-module. Thus a user routine could be nostepin if it was called from an
application module installed as built in. This has been changed so that in IRC5 no attributes
are inherited. Only the attributes of the module where the routine is declared are valid.

5RXWLQHFDOOVZLWKODWHELQGLQJ
In S4, user routines could not be called with "late binding" from a routine in a module
installed as built in. For example, it was not possible to have a generic call, such as
%"MyMod1:MyProc1"%, in an application module installed as built in. In IRC5 this has been
changed and is now possible.

40 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.1. About the option package structure

3DFNDJHWKHRSWLRQ
$ERXWWKHRSWLRQSDFNDJHVWUXFWXUH

2SWLRQIROGHU
All the option files must be placed in an option folder. This folder must be placed in the
mediapool before creating a system that uses the option. The option folder can have any
name, but a recommendation is to have the same name as the option (defined by the licence
to CD Key Maker).

)LOHVDXWRPDWLFDOO\UHDGE\WKHV\VWHP
If an option folder is present in the mediapool when creating a robot system, and the option
is selected, the following files are automatically read by the system:

)LOH 'HVFULSWLRQ
version.xml Used by RobotStudioOnline to get the name, version and description of the
option.
install.cmd Installation script that for example define which configuration files and
event log messages files to load. One of the configuration files (sys.cfg)
defines which RAPID program files (.sys) to load.

3HAC023668-001 Revision: - 41
3DFNDJHWKHRSWLRQ
3.2. version.xml

YHUVLRQ[PO

2YHUYLHZ
For every option there must be an XML file specifying the name and version number of the
option.

;0/GHVFULSWLRQ
The file version.xml is using the following tags:

7DJ 'HVFULSWLRQ
Major Major version number. This number is changed every time a new
option version with major changes is released.
Integer between 0 and 65535.
Minor Minor version number. This number is changed every time a new
option version with minor changes is released.
Integer between 0 and 65535.
Revision Revision number. This number is changed every time a revision of the
option is released.
Integer between 0 and 65535.
Build Build number. To be used internally during developing and testing of
the option.
Integer between 0 and 65535.
Title The name of the option.
Description A description of what the option is used for.
Max 255 characters.
Date The release date for this version of the option.
Format: YYYY-MM-DD
Type Always set to AdditionalOption.

42 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.2. version.xml

([DPSOHILOH
<Version>
<Major>1</Major>
<Minor>01</Minor>
<Revision>01</Revision>
<Build>001</Build>
<Title>CircleMove</Title>
<Description>CIRCLEMOVE option (gives access to the instruction
MoveCircle)</Description>
<Date>2004-12-31</Date>
<Type>AdditionalOption</Type>
</Version>

3HAC023668-001 Revision: - 43
3DFNDJHWKHRSWLRQ
3.3.1. Commands

LQVWDOOFPG

&RPPDQGV

2YHUYLHZ
This section describes the syntax of the commands that can be used in the installation script
install.cmd.
The script install.cmd is executed at C-start and I-start to automatically install a number of
different files, like configuration files or text files. The install.cmd file can contain conditions
so that certain actions only are executed if certain conditions are true.


Defines that the characters after $ is the name of a string variable.
([DPSOH
setstr -strvar $LANG -value "en"
3UHGHILQHGVWULQJV

6WULQJ 3UHGHILQHGYDOXH
$BOOTPATH The folder where install.cmd is executed. For example:
/hd0a/<option folder>
$HOME /hd0a/<system name>/HOME
$SYSPAR /hd0a/<system name>/SYSPAR
$TEMP /hd0a/temp


Comment, if followed by a space.
Label, if no space between # and text.
([DPSOH
# A comment
#Label1

44 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.3.1. Commands

FRQILJ
Does one of the following:·
• Load configuration resource files into the configuration database
• Erase unprotected instances of the specified configuration domain
• Set cfg file version and revision

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


version Set cfg file version. 0
revision Set cfg file revision. 0
filename The cfg file name, including file path.
domain The topic of the cfg file. Allowed values are:
• 6,2 - Communication
• 6<6 - Controller
• (,2 - I/O
• 00& Man-machine communication
• 02& - Motion
erase Erase unprotected instances of the specified FALSE
configuration domain.
replace Replace all existing instances with the same name as FALSE
those in the loaded cfg file.
internal Load an internal configuration file. FALSE

([DPSOHV
config -version 5 -revision 0
config -filename $BOOTPATH/sys.cfg -domain SYS -internal
config -erase -domain MOC
config -filename $BOOTPATH/eiopw.cfg -domain EIO -replace
config -filename $BOOTPATH/awNoSimPrompt.cfg -domain SYS -replace
-internal

3HAC023668-001 Revision: - 45
3DFNDJHWKHRSWLRQ
3.3.1. Commands

FRS\
Copy a file.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


from The file to be copied, including the file path.
to The new file name, including the file path.

([DPSOH
copy -from $BOOTPATH/instopt.cmd -to $TEMP/instopt.cmd

GHOD\
Delay the running of the command script.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


time Number of milliseconds to delay. 100

([DPSOH
delay -time 1000

GHOHWH
Delete a file.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


name Name of file to delete, including file path.

([DPSOH
delete -path $TEMP/opt_l0.cmd

46 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.3.1. Commands

HFKR
Echo (print) a message to the FlexPendant during the system startup.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


text The text to show on the FlexPendant.

([DPSOH
echo -text "Installing configuration files"

ILOHBH[LVW
If a file exists, go to a label.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


path File name, including the file path.
label The label to go to if the file exists.

([DPSOH
fileexist -path $TEMP/opt_l0.cmd -label CLEANUP_0

ILQGBUHSODFH
Find and replace occurrences of a string in a file. Only the first occurrence of the string in
each line of the text is replaced.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


path File to search, including the file path.
find String to find.
replace String to replace with.

([DPSOH
find_replace -path $HOME/myfile.txt -find "ABC" -replace "CBA"

3HAC023668-001 Revision: - 47
3DFNDJHWKHRSWLRQ
3.3.1. Commands

JHWNH\
A number of selections can be made by user at the time of system creation. These selections
are stored by the system as a number of keys. The values stored in these keys can be read at
the system startup time by using getkey command.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


id Name of the key whose value is to be retrieved.
strvar Name of the variable where the result (the key value)
is stored.
errlabel Label to go to if an error occurs.

([DPSOH
getkey -id "LangSelect" -strvar $ANSWER -errlabel ENGLISH

JRWR
Go to a label.
The label to go to can either be specified directly, using the parameter label, or via a string
containing the label name, using the parameter strvar.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


strvar A string containing the label name to go to.
label Label to go to

([DPSOHV
goto -strvar $ANSWER
goto -label END_LABEL

48 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.3.1. Commands

LIVWU
If a string variable is equal to a string value, go to the specified label. If not equal, the next
statement is executed.
If the string variable is undefined, the command returns an error code.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


strvar String variable to be compared with a string value.
value String value to compare the string variable with.
label Label to go to if the comparison is true.

([DPSOH
ifstr -strvar $ANSWER -value "IRT5454_2B" -label APP2

LIYF
If the script containing this command is run on the Virtual Controller, go to the specified label.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


label Label to go to if the script is run on a Virtual Controller.

([DPSOH
ifvc -label NO_START_DELAY

LQFOXGH
Include the script of another command file. Executes all commands in the script and then
return to the current script.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


path The file name of the included script, including the file
path.

([DPSOH
include -path $BOOTPATH/instdrv.cmd

3HAC023668-001 Revision: - 49
3DFNDJHWKHRSWLRQ
3.3.1. Commands

PNGLU
Make a directory.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


path Directory name, including the path.

([DPSOH
mkdir -path $TEMP/newdir

RQHUURU
Set the default behavior of the script motor in case a script command fails and returns an error
status code.
It is always the most recent onerror command that sets the current default behavior. Onerror
semantics of included scripts does not affect the onerror semantics of any script that includes
it.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


action Defines if an error should result in: go to label, continue
continue execution, stop execution, system failure or
return from included script to the including script
Defines what behavior an error should result in. The
allowed values are:
• JRWR - Go to a label
• FRQWLQXH - Ignore errors and continue
execution
• VWRS - Stop execution of startup task using
DVVHUW
• V\VIDLO - Call SYS_FAIL()
• UHWXUQ - If used by a script included by another
script, execution returns to the calling script.
The included script returns an error code that
needs to be handled by the including script.
label The label to go to if action is goto.

50 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.3.1. Commands

([DPSOHV
onerror -action goto -label MY_LABEL1
onerror -action continue
onerror -action stop
onerror -action sysfail
onerror -action return

SULQW
Prints a text to the VX Works console.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


text The text to show on the console.

([DPSOH
print -text "Copying files to $BOOTPATH"

UHJLVWHU
Registers error messages, from an xml file, to the elogtext_registry.xml file. Once registered,
these messages can be used by the RAPID program.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


type Defines which type (e.g. elogmes or elogtitle) that is
being registered.
domain_no Error messages are stored in different domains.
Which domain to register in is defined by domain_no.
For additional options, domain_no should always be
9.
min The first message number in the file being registered.
max The last message number in the file being registered.
prepath The path to the language directory.
postpath The rest of the path, after the language directory,
including the file name.
extopt A flag indicating that the option is an additional option.

3HAC023668-001 Revision: - 51
3DFNDJHWKHRSWLRQ
3.3.1. Commands

([DPSOH
register -type elogmes -domain_no 11 -min 5001 -max 5001 -prepath
$BOOTPATH/language/ -postpath /CircleMove_elogtext.xml
-extopt

VHWHQY
Define an environment variable and set its value.
An environment variable can be used in the RAPID code or in .cfg files. If you define the path
to your option folder as an environment variable, this variable can be used in your programs
instead of hard coding the path.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


name The environment variable to be assigned a new
value.
value The string to assign to the environment variable.

([DPSOH
setenv -name CIRCLEMOVE -value $BOOTPATH
6\VWHPHQYLURQPHQWYDULDEOHV
The following environment variables are set up by the system and cannot be overwritten.

(QYLURQPHQWYDULDEOH 9DOXH
HOME /hd0a/<system name>/HOME
BACKUP /hd0a/<system name>/BACKUP
SYSPAR /hd0a/<system name>/SYSPAR
REPORTS /hd0a/<system name>/INTERNAL/REPORTS
INTERNAL /hd0a/<system name>/INTERNAL
CTRLROOT /hd0a/INTERNAL
TEMP /hd0a/temp
SYSTEM /hd0a/<system name>
RELEASE /hd0a/ROBOTWARE_5.XX.XXXX

52 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.3.1. Commands

VHWVWU
Define a string variable and set its value. The string can only be used in the installation script.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


strvar The string variable to be assigned a new string.
value The string to assign to the string variable.

([DPSOHV
setstr -strvar $LANG -value "en"
setstr -strvar $CFGPATH -value $SYSPAR

WH[W
This command loads a text description file into a text resource of a package. It accomplishes
the same thing as the RAPID instruction TextTabInstall, but can also specify different
texts for different languages.
Texts from text files can only be used if the RobotWare option Advanced RAPID is installed.
For more information, read about user message functionality in $SSOLFDWLRQPDQXDO
(QJLQHHULQJWRROV.

3DUDPHWHU 'HVFULSWLRQ 'HIDXOW


filename Name of the description file, including the file path.
package Package for building the text resource. "en"

([DPSOH
text -filename $BOOTPATH/language/en/text_file.xml -package "en"

WLPHVWDPS
Read the system clock and print number of seconds and milliseconds to the standard output.
No parameters.

3HAC023668-001 Revision: - 53
3DFNDJHWKHRSWLRQ
3.3.2. Examples of install.cmd files

([DPSOHVRILQVWDOOFPGILOHV

2YHUYLHZ
This section shows two examples of install.cmd files. The first example is the install.cmd file
necessary for the option CIRCLEMOVE (that is used as an example throughout this manual).
The second example is showing how to create a more complex install.cmd file (this example
is for the option PalletWare).

([DPSOHIRU&,5&/(029(
# Install.cmd script for option CIRCLEMOVE
echo -text "Installing CIRCLEMOVE option"
# Load configuration files
config -filename $BOOTPATH/CircleMove_sys.cfg -domain SYS -
internal
config -filename $BOOTPATH/CircleMove_mmc.cfg -domain MMC -
internal
# Define environment variable
setenv -name CIRCLEMOVE -value $BOOTPATH
# Register elog messages
register -type elogmes -domain_no 11 -min 5001 -max 5001 -prepath
$BOOTPATH/language/ -postpath /CircleMove_elogtext.xml
register -type elogtitle -prepath $BOOTPATH/language/ -postpath /
CircleMove_elogtitles.xml

54 3HAC023668-001 Revision: -
3DFNDJHWKHRSWLRQ
3.3.2. Examples of install.cmd files

0RUHFRPSOH[H[DPSOH
# Install.cmd script for option PalletWare
echo -text "Installing PalletWare"
copy -from $BOOTPATH/pal_cell.sys -to ram1disk:pal_cell.sys
copy -from $BOOTPATH/pal_cyc.sys -to ram1disk:pal_cyc.sys
copy -from $BOOTPATH/pal_dyn.sys -to ram1disk:pal_dyn.sys
copy -from $BOOTPATH/pal_exe.sys -to ram1disk:pal_exe.sys
copy -from $BOOTPATH/pal_usrr.sys -to ram1disk:pal_usrr.sys
copy -from $BOOTPATH/pal_usrt.sys -to ram1disk:pal_usrt.sys
copy -from $BOOTPATH/pal_cell.sys -to ram1disk:pal_cell.sys
echo -text "Installing language dependent files"
fileexist -path $BOOTPATH/pal_scr.$LANG -label LOAD_TEXT
echo -text "Language not available!"
echo -text "Installing English text files"
copy -from $BOOTPATH/pal_scr.eng -to ram1disk:pal_scr.sys
echo -text "Installing PalletWare user screens"
copy -from $BOOTPATH/pwussc.eng -to ram1disk:pwussc.cfg
goto -label INIT_UWM
#
#LOAD_TEXT
#
echo -text "Installing PalletWare user screens"
copy -from $BOOTPATH/pal_scr.$LANG -to ram1disk:pal_scr.sys
fileexist -path $BOOTPATH/pwussc.$LANG -label LOAD_TEXT
echo -text "Language not available!"
echo -text "Installing English text files"
copy -from $BOOTPATH/pwussc.eng -to ram1disk:pwussc.cfg
goto -label INIT_UWM
#
#LOAD_TEXT
#
copy -from $BOOTPATH/pwussc.$LANG -to ram1disk:pwussc.cfg
goto -label INIT_UWM
#
#INIT_UWM

3HAC023668-001 Revision: - 55
3DFNDJHWKHRSWLRQ
3.3.2. Examples of install.cmd files

#
copy -from $BOOTPATH/uwmlist.cfg -to ram1disk:uwmlist.cfg
init -entry uwm_new
delete -path ram1disk:pwussc.cfg
#
# LOAD CFG FILE
#
config -erase -domain SYS
config -filename $BOOTPATH/pwsysrp.cfg -domain SYS
echo -text "done..."
#
# END PALWARE
#

56 3HAC023668-001 Revision: -
&'.H\0DNHU
4.1. Installing CD Key Maker

&'.H\0DNHU
,QVWDOOLQJ&'.H\0DNHU

8Q]LSSLQJWKH]LSILOH
CD Key Maker is delivered as a zip file. Open this file, and in the zip program click on the
([WUDFW button. Select where in your file system you want the program CD Key Maker
(preferably in a folder named CDKeyMaker).

en0400001274

3HAC023668-001 Revision: - 57
&'.H\0DNHU
4.1. Installing CD Key Maker

/LFHQVHILOH
The license for an option is a file named OLFHQFHBRSWLRQQDPH!N[W. This file must be copied
to the folder cdkey (see figure below).

en0400001275

6WDUWLQJWKHSURJUDP
Start the program cdkey.exe, located in the folder cdkey.

58 3HAC023668-001 Revision: -
&'.H\0DNHU
4.2. Creating an option key

&UHDWLQJDQRSWLRQNH\

&'.H\0DNHUVWDUWZLQGRZ
When opening the file cdkey.exe, the program is started with the following view:

en0400001276

3HAC023668-001 Revision: - 59
&'.H\0DNHU
4.2. Creating an option key

&UHDWHDNH\ILOH

6WHS $FWLRQ ,QIR


1. From the menu .H\, select
$GGLWLRQDO.
2. Write the serial number for the For information about using wildcards in the serial
robot controller that the option number, see &UHDWHIUHHNH\V on page 60.
key is intended for. The serial For information about using RobotWare license
number is found on the control number instead of serial number, see &UHDWHNH\V
module. IRU5RERW:DUHOLFHQVHV on page 61.
3. Select the option that you want For information about wildcards, used to create
to issue a key for. The list different versions of an option, see &UHDWHRSWLRQ
contains all options that you YHUVLRQV on page 61.
have a license for (see /LFHQVH
ILOH on page 58).
4. Check the box &RS\NH\WRILOH.
5. Click on the button .H\.

en0400001277

6. Save the key file in the option


folder.

&UHDWHIUHHNH\V
When specifying the controller serial number, the numbers can be replaced by X to generate
a key that is valid for all serial numbers.
To create a free key, that works for all robot controllers, write "XX-XXXXX".

60 3HAC023668-001 Revision: -
&'.H\0DNHU
4.2. Creating an option key

&UHDWHNH\VIRU5RERW:DUHOLFHQVHV
For some robot deliveries, including many similar robot systems, a RobotWare license
number is found on the control module. This license number (e.g. 99-12345) can be used
instead of a controller serial number. The option key will then be valid for all controllers with
that RobotWare license.

&UHDWHRSWLRQYHUVLRQV
It is possible to create different versions of an option. On request, you can receive an option
license with wildcards. In the option selection box, you will see the option name followed by
"-" and one or several X.

en0400001278

In this selection box, replace the XX with the version identifier (e.g. "1A" for option version
number). Note that the number of characters must be the same as the number of X in the
license.

3HAC023668-001 Revision: - 61
&'.H\0DNHU
4.3. Encryption

(QFU\SWLRQ

2YHUYLHZ
To avoid that the source code of your option is copied and used by an unauthorized user, the
source code can be encrypted.
ABB provides an encryption program that can be used to encrypt any text based file, e.g.
RAPID modules or install.cmd.

(QFU\SWDILOH

6WHS $FWLRQ ,QIRLOOXVWUDWLRQ


1. In CD Key Maker, select &RS\)LOHV from the
menu 7RROV.

en0500001501

2. Click on ,PSRUWVRXUFH.

en0500001502

3. Browse and select the file you wish to encrypt.


4. Click on 6DYHFU\SWR.
5. Specify the name of the encrypted file and click An encrypted copy of the file is
on 6DYH. now created and CD Key Maker
can be closed down.

5HPRYHWKHRULJLQDOILOH
To make sure that the unencrypted source code file is not included in the delivered option,
save it somewhere else and remove it from the option folder.

62 3HAC023668-001 Revision: -
,QGH[

&
CAB_TASK_MODULES 23 5
CD Key Maker 57 RAPID code 15
CIRCLEMOVE 13 RAPID rules 25
' 6
default argument values 25 S4 40
( selections 10
encode 62 sys.cfg 23
system module 15
encryption 62
event log messages 18 9
example 13, 15, 38, 43, 54 version.xml 42
)
file structure 11
*
generic procedure calls 40
,
inherited module attributes 40
install.cmd 44
/
late binding 40
license file 58
load modules 23
0
mmc.cfg 25
module 15
MoveCircle 15
1
NOSTEPIN 15
2
option key 57
3
pick list 25

3HAC023668-001 Revision: - 63
3HAC 023668-001, Revision -, en


ABB Automation Technologies AB
Robotics
S-721 68 VÄSTERÅS
SWEDEN
Telephone: +46 (0) 21 344000
Telefax: +46 (0) 21 132592

You might also like