Application Development
Application Development
Application Development
UMI-R3-111
Application Development
Revision
ii 99-07-13
Contents
CHAPTER 1 ............................................................................................... 1
Introduction............................................................................................... 1
CHAPTER 2 ............................................................................................... 3
Teach-First Method .................................................................................... 3
Tasks and Recommended Tools ....................................................... 4
Task 1 Start Up ............................................................................... 6
Task 1.1 Start the Computer .......................................................... 6
Task 1.2 Start the Robot ................................................................ 6
Task 2 Create or Open an Application .............................................. 7
Task 3 Transform the Tool ............................................................... 8
Task 3.1 Determine the Tool Transform .......................................... 8
Task 3.2 Set the Tool Transform ..................................................... 8
Task 4 Create and Teach Locations .................................................10
Task 4.1 Move the Arm to a New Position.......................................10
Task 4.2 Create a Location Variable...............................................11
Task 4.3 Teach a Value to the Location Variable ............................12
Task 4.4 Check the Location .........................................................12
Repeat ...........................................................................................13
Task 5 Set Non-Location Variables ..................................................14
Task 5.1 Create a Non-Location Variable .......................................14
Task 5.2 Set a Value to the Non-Location Variable .........................15
Task 6 Write Your RAPL-3 Program .................................................16
RAPL 3 Programming Tips ..............................................................16
Task 7 Send the Program to the Controller ......................................19
Task 8 Run Your Application ..........................................................20
Chapter 2 .................................................................................................21
Write-First Method ....................................................................................21
Tasks and Recommended Tools ......................................................22
Task 1 Start Up ..............................................................................24
Task 1.1 Start the Computer .........................................................24
Task 1.2 Start the Robot ...............................................................24
Task 2 Write Your RAPL-3 Program .................................................25
RAPL 3 Programming Tips ..............................................................25
Task 3 Send the Program to the Controller ......................................27
Task 3.1 Set Up the App................................................................27
Task 3.2 Send Your Program to the Controller ...............................27
Task 4 Open the Application ...........................................................28
Task 5 Transform the Tool ..............................................................30
5.1 Determine the Tool Transform .................................................30
5.2 Set the Tool Transform ............................................................30
Task 6 Teach Locations...................................................................32
Task 6.1 Review Your Location Variables .......................................32
Task 6.2 Move the Arm and Teach the Location .............................33
iii
Task 6.3 Check the Accuracy of Your Locations ............................. 34
Task 7 Set Teachable Non-Location Variables ................................. 36
Task 7.1 Set Your Non-Location Variables ..................................... 36
Task 8 Run Your Application .......................................................... 37
iv 99-07-13
1
CHAPTER 1
Introduction
Teach-First Method
The teach-first chapter describes how to develop a simple application by
teaching locations first and then writing your program.
Use this method if you prefer a hands-on approach. Walk through your
application, moving the actual arm in the workcell, saving the locations,
and determining the order of robot work. Then write your program to
follow the order of work.
Write-First Method
The write-first chapter describes how to develop a simple application by
writing your program first and then teaching the locations.
Use this method if you prefer a large-scale design approach. Determine
the work of the robot. Write the program, adding sections until the
program until complete. Then, using the program’s location names, teach
the locations with the arm.
You can use this method to get started on your application when you do
not yet have the robot installed to teach locations.
2 Application Development: Introduction
Teach-First or Write-First
Comparison of major steps for teach-first and write-first.
Teach-First Write-First
transform tool write & compile program
teach locations send program
write & compile program transform tool
send program teach locations
run application run application
3
CHAPTER 2
Teach-First Method
The teach-first method is useful for working out your application in the
workcell, moving the arm from one location to the next as you determine
the order of robot work. Once you have decided on the sequence of
motion, you can write your program. Using the teach-first method
requires that you have a robot, preferably with the end-of-arm tooling
(such as a gripper), to teach locations.
4 Application Development: Teach-First Method
Preferred Tools
The procedures on the following pages prefer these tools.
Task
1. Open open application
Alternative Tools
If you want, or if your tool selection is limited, you can use either the
preferred tool (in bold) or the alternative tool.
Task
1. Open open application open application
Task 1 Start Up
The application development procedures in this chapter assume that the
system and necessary tools are started.
Preferred Tool
ash
Alternative Tool
Teach Pendant
Opening
If your robot system automatically started up the teach pendant, shut
down the teach pendant by pressing ESC on the teach pendant keypad
until you reach the terminate screen and press F1 to confirm.
To create or open an app using ash:
1. Start ash. At the $ prompt, enter
ash
2. The shell displays the message “Existing applications are:” and lists all
existing applications.
3. Open an application.
• To create a new application and open it:
a) Enter the name for your application. For example
dispense
my_app
The shell displays the message “Application application_name
not found -- try to create it?”
b) Enter y for yes. ashcreates the new application, displays a
number of messages, and displays a prompt with the
application name in it, such as
dispense>
my_app>
• To open an existing application:
a) Enter the name of the application. For example
dispense
my_app
The application shell displays a message and then a prompt
with the application name in it.
You are now ready to set the tool transform in Task 2.
8 Application Development: Teach-First Method
Alternative Tool
There is no alternative tool.
Setting Directly
To set the transform:
1. Set the tool transform using the tool command followed by your
specific tool parameters.
Example: A servo gripper with microplate fingers, in metric
tool 30, 0, 205, 0, 0, 0
Application Development: Teach-First Method 9
Setting Indirectly
To set the transform with values that can also be used in the program,
put the transform values in an array of floats. Use the array to set the
transform in ashfor teaching and to set the transform later when the
program runs.
1. Create a new array of six floats named tran
new %tran[6]
The array is indexed from 0 to 5: tran[0], tran[1], tran[2], tran[3],
tran[4], tran[5].
2. Set each element of the array to one parameter of the tool transform
according to this order.
For example, for a servo gripper with microplate fingers, in metric, the
parameters are 30, 0, 205, 0, 0, 0.
set tran[0] = 30
set tran[0] = 0
set tran[0] = 205
set tran[0] = 0
set tran[0] = 0
set tran[0] = 0
3. Check the settings with the print command
print tran
The values are now in the array elements. You now need to get the
array elements into the tool transform setting on the system.
4. Set the tool transform using the array
tool tran[0], tran[1], tran[2], tran[3], tran[4], tran[5]
5. Check the transform by entering the tool command with no
parameters
tool
10 Application Development: Teach-First Method
Alternative Tool
ash
Moving
Use the teach pendant in Velocity-Joint motion to move the arm to
positions you want to teach. With Velocity type, motion continues while
you press the axis key, but stops when you release the key. With Joint
mode, you move each joint individually by pressing the axis keys.
1. At the controller front panel, turn on arm power by pressing the
button near the upper right corner. The LED in the button lights up.
2. Ensure that the teach pendant is running. If you have only been using
ashat the terminal window, start the teach pendant by entering
pendant
The pendant displays the Application screen with the name of the
application on the second line.
4. Select Motion by pressing F3. The Manual Menu displays with Motion
Type (motn) available at F3 and Motion Mode (mode) available at F4.
5. Scroll through motion types by pressing F3. If you are a new user,
select Velocity (vel) for constant motion or Jog for incremental motion.
Application Development: Teach-First Method 11
6. Scroll through motion modes by pressing F4. If you are a new user,
select World to move along a world axis, Tool to move along a tool axis,
or Joint to move an individual joint.
7. Select a speed by pressing Speed Up and Speed Down. If you are a
new user, use a speed of 25% or slower.
8. Move the tool center point to your location using the teach pendant.
You can change motion type, motion mode, or speed, as needed.
• Squeeze the live-man switch on the right side of the teach
pendant, using adequate but not excessive pressure.
• Press an axis key to move in either a positive or negative direction.
• If arm power shuts off, turn it on by pressing the Arm Power
switch on the controller.
9. When the tool center point is at the position you want, you are ready
to create a location.
Alternative Tool
Teach Pendant
Creating
Once the arm is positioned in your desired location, you can use the ash
New command to create a variable. This variable holds the location data
and is used in the application program.
Use a prefix character to specify the type of location variable you want to
use.
Alternative Tool
Teach Pendant
Teaching
Make sure that the tool center point is at the point you want to teach to
the variable.
To teach the location variable:
1. Enter
here location_variable_name
For example
here pick
here place
here safe_1
2. Confirm that the variable was taught by entering
list
The location displays without an asterisk, indicating that it has been
taught.
3. Check the positional data for the location variable by entering
print location_variable_name
For example
print pick
print place
The location data displays, separated by commas and enclosed within
brackets.
If “unknown” is displayed, the data was not taught to the variable.
Alternative Tool
Teach Pendant
Checking
Once you have taught a location, you can check the accuracy of your
locations by moving the robot to the location. Although recommended,
this procedure is optional.
Warning! Start with a slow speed (speed 10) and be prepared to strike an e-stop
button to prevent a possible collision. When you enter a motion command, the arm
moves to the location and expects no obstructions in the way.
1. Set a slow speed. Enter
speed 10
Application Development: Teach-First Method 13
for 10% of full speed. The speed can be set from 1% to 100% of full
speed.
2. Move the arm to a position away from your location, such as the ready
position by entering
ready
or another suitable position where there is no possibility of collision
when the arm moves from the position to your location.
3. Approach the location with the appro command. The appro command
positions the arm near the location, but away from it at the distance
that you specify. Enter
appro location_variable_name, distance
For example:
appro pick, 4
appro place,6
To place the arm closer to the location, you can specify a smaller
distance.
4. Move to the location with the move command. Enter
move location_variable_name
For example:
move pick
move place
move safe_1
5. Depart from the location with the depart command. The depart
command positions the arm away from the location by the distance
that you specify. Enter
depart distance
For example:
depart 4
Repeat
Repeat the teaching tasks for each location.
14 Application Development: Teach-First Method
Alternative Tool
Teach Pendant
Creating
When you create a new teachable variable with ashyou use the new
command.
When you create the variable, you must specify the type of teachable
variable with a prefix character. Creating a variable without a prefix
character creates it as an integer.
Alternative Tool
Teach Pendant
Setting
Once a variable exists, you can assign it a value or “set a value to the
variable”. When you set a value to a variable with ash, you use the set
command.
A value can either be a constant or another variable. Certain characters
can only be used with different types of variables, as shown in the
following table.
Alternative Tool
Plain text editor and command-line compiler
Writing
After teaching your locations, you can write and compile your RAPL-3
program using Robcomm3. Using specific commands and determining the
structure of a program is an extensive subject. Refer to the RAPL-3
Language Reference Guide for details.
In summary, to write a RAPL-3 program:
1. In Robcomm3, open an editor window by selecting File|New.
2. Save your program, using the Save As function, to the directory you
want. Use an appropriate file name, such as the same name as your
application. Make sure the extension is .r3.
3. Setup an Application. From Application, select New. Name your app
using the same name as your program file.
4. Check the settings in the App Setup. From Application, select Setup.
Make sure that the source file name is the same as your program, the
object file name is the same, and the directory name on the controller
is the same as the one you used when you taught your locations.
5. In the Editor window, type your program.
6. Compile your program (from source file to object file).
7. Continue adding material to your program. Continue de-bugging your
program after attempts to compile.
Entity
application dispense
(name in ash, sub-directory in \app)
application dispense.app
(name in Robcomm New App)
source file dispense.r3
(program in readable RAPL-3)
object file dispense. dispense.
(program in compiled form)
variable file dispense.v3
(file with teachables)
If you created an array of floats to use when teaching in ash and to use in
your program when running, write the array into the tool_set() command.
For example, tool_set(tran)
Application Development: Teach-First Method 19
Alternative Tool
There is no alternative tool.
Sending
You have written and compiled your program on the computer. You must
send it to the controller, to use it to run the robot.
With Robcomm3, the procedure for transferring your program to the
controller is simplified if you use the App Setup feature described in the
previous task.
1. Send the program using the Send function available from the Send
button, Application menu, or right-mouse click menu. The Send File
Transfer Progress window displays the transfer.
2. Check that your program was successfully transferred to the
appropriate place. In the terminal window, with ash running and your
application open, display the contents with the dir command.
20 Application Development: Teach-First Method
Alternative Tool
Teach Pendant
Running
CHAPTER 2
Write-First Method
Preferred Tools
The procedures on the following pages prefer these tools.
Task
1. Write write program,
compile program
Alternative Tools
If you want, or if your tool selection is limited, you can use either the
preferred tool (in bold) or the alternative tool.
Task
1. Write write program,
compile program
Task 1 Start Up
The application development procedures in this chapter assume that the
system and necessary tools are started.
Alternative Tool
Plain text editor and command-line compiler
Writing
Write and compile your RAPL-3 program using Robcomm3. Using specific
commands and determining the structure of a program is an extensive
subject. Refer to the RAPL-3 Language Reference Guide for details.
In summary, to write a RAPL-3 program:
1. In Robcomm3, open an editor window by selecting File|New.
2. Save your program, using the Save As function, to the directory you
want. Use an appropriate file name, such as the same name as your
application. Make sure the extension is .r3.
3. Setup an Application. From Application, select New. Name your app
using the same name as your program file.
4. Check the settings in the App Setup by selecting Setup from
Application. Make sure that the source file name is the same as your
program and the object file name is the same.
5. In the Editor window, type your program.
6. Compile your program (from source file to object file).
7. Continue adding material to your program. Continue de-bugging your
program after attempts to compile.
Entity Name
application dispense.app
(name in Robcomm New App)
source file dispense.r3
(program in readable RAPL-3)
object file dispense.
(program in compiled form)
26 Application Development: Write-First Method
Alternative Tool
There is no alternative tool.
Sending
You have written and compiled your program on the computer. You must
send it to the controller.
With Robcomm3, the procedure for transferring your program to the
controller is simplified if you use the App Setup feature.
Preferred Tool
ash
Alternative Tool
Teach Pendant
Opening
If you sent the program automatically with the App Setup feature, the
application on the controller was automatically created. You only have to
open it.
1. Startash. At the $ prompt, enter
ash
2. The shell displays the message “Existing applications are:” and lists all
existing applications.
3. Open the application.
• If the application that you want already exists:
a) Enter the name of the application. For example
dispense
my_app
The application shell displays a message and then a prompt
with the application name in it.
• To create a new application and open it:
a) Enter the name for your application. For example
dispense
my_app
The shell displays the message “Application application_name
not found -- try to create it?”
b) Enter y for yes. Ash creates the new application, displays a
number of messages, and displays a prompt with the
application name in it, such as
dispense>
my_app>
c) Search for your program file. Since the application did not
already exist when you started ash, the application was not
created in the proper place and your file did not go to the
proper place when you sent the file. Either use system shell
Application Development: Write-First Method 29
Alternative Tool
There is no alternative tool.
Setting Directly
To set the transform:
1. Set the tool transform using the tool command followed by your
specific tool parameters.
Example: A servo gripper with microplate fingers, in metric
tool 30, 0, 205, 0, 0, 0
Application Development: Write-First Method 31
Setting Indirectly
To set the transform with values that can also be used in the program,
put the transform values in an array of floats. Use the array to set the
transform in ash for teaching and to set the transform later when the
program runs.
1. Create a new array of six floats named tran
new %tran[6]
The array is indexed from 0 to 5: tran[0], tran[1], tran[2], tran[3],
tran[4], tran[5].
2. Set each element of the array to one parameter of the tool transform
according to this order.
For example, for a servo gripper with microplate fingers, in metric, the
parameters are 30, 0, 205, 0, 0, 0.
set tran[0] = 30
set tran[0] = 0
set tran[0] = 205
set tran[0] = 0
set tran[0] = 0
set tran[0] = 0
3. Check the settings with the print command
print tran
The values are now in the array elements. You now need to get the
array elements into the tool transform setting on the system.
4. Set the tool transform using the array
tool tran[0], tran[1], tran[2], tran[3], tran[4], tran[5]
5. Check the transform by entering the tool command with no
parameters
tool
32 Application Development: Write-First Method
ashAlternative Tool
Teach pendant
Reviewing
When you opened the application (when you started ash with the ash
command at the terminal) the teachable variables from your program
were copied into a variable file and loaded into the ash database. Check
that this happened. If not, there are corrective steps.
1. At the ash prompt (the name of your application with an angle
bracket) such as
application_name>
list the teachable variables in the database with the list command
list
The variables from the database are displayed at the terminal.
2. Compare the list of variables to your knowledge of the program.
Troubleshooting
If there are no variables listed, the utility that generates the variables may
not have run successfully. Run it now to generate the variables from the
program using the refresh command.
1. At the prompt, enter
refresh
A line for each variable (added from the program to the variable file) is
displayed.
2. Check that they are in the database by entering
list
The variables should be displayed.
If the refresh command did not generate variables, the program file may
not be in the directory.
1. Search for your program file, using system shell commands. List all
Application Development: Write-First Method 33
contents of all directories (with the –Recursive flag), starting from the
root directory (/), by entering
dir -R /
All directories, sub-directories, etc. down to each file, are listed.
2. Look for your file by name. If you locate it, more it with the file move
command
mv current_file_location preferred_file_location
for example
mv /dispense /app/dispense/dispense
If the file is not on the controller, you need to send it.
1. In Robcomm3, check that the Open App feature is open and that the
App Setup configuration is set to send your object file to the proper
application directory on the controller, for example
/app/dispense
/app/spray
2. From Robcomm3, send your file with the Send feature available from
the right-mouse click menu, the Send button, or Send command from
the drop-down menu.
3. Check that your file is in the proper app directory on the controller. In
the terminal window, at the application prompt enter
dir
4. At the prompt, enter
refresh
A line for each variable (added from the program to the variable file) is
displayed.
5. Check that they are in the database by entering
list
The variables should be displayed.
Alternative Tool
ash
Alternative Tool
Teach pendant
Application Development: Write-First Method 35
Once you have taught and saved several locations, check the accuracy of
your locations at different speeds. Although recommended, this procedure
is optional.
Warning! Start with a slow speed and be prepared to strike an e-stop button
to prevent a possible collision. When you enter a motion command, the arm
moves to the location and expects no obstruction.
1. Set a slow speed, enter speed 10.
Note: The speed ranges from 1% to 100% of full speed.
2. Use the following procedure to check the accuracy of each of your
locations:
a) Use the appro command to approach the location. The appro
command positions the arm near the location, at the distance you
specify.
Enter
appro location variable name , distance
For example:
appro pick,4
appro place,6
Note: To place the arm closer to the location, you can specify a
smaller number.
c) Use the depart command to depart from the location. The depart
command positions the arm away from the location at a distance
you specify.
Enter
depart distance
For example:
depart 4
Note: To use the depart command, the arm must be at a location,
not at a depart or appro position.
3. If the arm is moving without obstruction, increase the speed in step 1
and repeat step 2 until you find an appropriate speed in which to run
your application.
36 Application Development: Write-First Method
Alternative Tool
Teach pendant
Setting
Once a variable exists, you can assign it a value or “set a value to the
variable”. When you set a value to a variable with ash, you use the set
command.
A value can either be a constant or another variable. Certain characters
can only be used with different types of variables, as shown in the
following table.
Alternative Tool
Teach Pendant
Running
When you run your application, the controller executes your program
using the variable file containing your taught locations.