Apostila Cosimir Cosirop
Apostila Cosimir Cosirop
Apostila Cosimir Cosirop
0
Programming Software for
Mitsubishi Industrial Robots
First Steps
www.cosimir.com
COSIROP First Steps 3
Table of contents
Welcome .......................................................................................4
How to Install COSIROP ......................................................................5
Hardware Requirements ..................................................................5
Installation ..................................................................................5
Dongle (Hardlock) ........................................................................ 10
Uninstallation............................................................................. 10
How to Prepare Robot Programming with COSIROP ................................... 11
How to Work with the RCI Explorer...................................................... 14
How to Establish a Connection to the Robot Drive Unit .............................. 15
How to Check the Robot Type ............................................................ 18
How to Write a Robot Program ........................................................... 19
How to Create a Position List Using the Robot......................................... 20
How to Check the Syntax of your Program ............................................. 22
How to Exchange Programs and Position Lists with the Robot ...................... 23
Downloading a program ................................................................. 23
Downloading a position list ............................................................. 26
Uploading a program .................................................................... 27
How to Debug a Robot Program .......................................................... 30
How to Start and Stop a Robot Program ................................................ 33
How to Load a Robot Program into a Slot............................................... 34
How to Monitor running Robot Programs................................................ 37
How to Monitor Variable Values .......................................................... 38
How to Monitor Robot States ............................................................. 40
How to Send Commands to the Robot ................................................... 42
How to Change Parameter Values........................................................ 44
How to Check the latest Error Messages ................................................ 46
How to Backup your Robot Controller ................................................... 48
How to Import MELPRO Projects ......................................................... 50
How to Learn about Changes in Version 2.0 ............................................ 51
Welcome
Thank you for choosing the new COSIROP 2.0 programming software!
COSIROP 2.0 makes your programming life a lot easier. COSIROP 2.0 is the tool
for programming, online control, parameterization, and diagnosis of Mitsubishi
MELFA Robots. Use COSIROP 2.0 to develop robot programs in MELFA BASIC or
Movemaster Command. For each command you can get a detailed online help
simply by pressing the F1 help key. Use COSIROP’s jog operation tool to teach the
robot and to insert positions directly into a position list. Exchange your programs
between the PC and the robot controller via a serial interface or via an Ethernet
connection.
It has never been so easy to test your programs in deep. The new Debugger
supports a breakpoint-oriented online debugging of your robot programs. Set
breakpoints wherever you want. Start your program in any line; use single stepping
forward and backward. The online debugger is the ultimate test tool for detailed
online testing of your programs.
COSIROP 2.0 offers a wide range of Monitors for basically every type of robot data
available. Monitor the speed of single joints or the electrical current in each of the
servomotors of your robot. Monitor and change the values of inputs and outputs,
configure a CC-Link connection using the monitors for the input and output
registers. It is possible to monitor variables in different slots with just one monitor.
If the variable can be set, change its value, as you like.
The new features fully support the MITSUBISHI RV-A, RH-AH, and RP-AH robots. And
still, you can use COSIROP 2.0 for your old RV-EN and RV-E robots.
The following chapters give a brief introduction of how to work with COSIROP 2.0.
To get you started, it is best, to work through the following chapters with COSIROP
2.0 and your Mitsubishi robot. Afterwards, use your acquired knowledge to make
your own robot projects.
We wish you a lot of fun with your first robot project with COSIROP 2.0 and good
luck for your future robot projects.
Hardware Requirements
You should have at least the following hardware/software equipment for operating
COSIROP:
Installation
The setup program will create all necessary directories and copy all necessary files.
To install COSIROP start "SETUP.EXE" from the root directory of the CD-ROM. Follow
the instructions appearing on the screen.
Select the COSIROP installation language. Select "U.S. English". The following
dialog will appear:
You can abort the installation by clicking "Cancel". To proceed, click "Next >",
which will display the following screen:
Enter your name, the name of your company and press "Next >". If you have
installed COSIROP before the registration information will be displayed only. In the
next step the installation directory can be chosen:
If you want to select a different directory press the "Browse..." button and select
or enter the installation directory there. Proceed with "Next >" and specify the
serial interface that you are going to use for robot communication.
Proceed with "Next >" and select the program manager group respectively the
entry in the "Start" menu:
Proceed with "Next >" again. Now, you are ready to install:
Up to this point no files have been copied to your hard disk and this is the last
opportunity to cancel the installation by pressing "Cancel". To start the installation
press "Next >". The installation will copy files to your hard disk and display a
progress window:
After the installation you have to press "Finish" to terminate the setup program:
Now you are ready to start COSIROP for the first time. You can start COSIROP by
selecting COSIROP in the Windows "Start" menu.
Dongle (Hardlock)
Uninstallation
Before you can write robot programs and position lists with COSIROP you have to
define your robot type and configuration by Creating a Project.
Start COSIROP and select the command File/Project Wizard that will display the
first step of the Project Wizard:
Insert your desired "Project Name" into the appropriate field of the dialog box. The
dialog box will come up with the project name "UNTITLED". In the example the
project name is "DEMO". You can enter any valid file name (without file name
extension) into this field. As "Program Name" insert e.g. "3".
For each new project you create, COSIROP will create a new directory with the
name of the project. COSIROP uses this directory to store all the programs that
belong to your project. The program name is the name COSIROP uses to download
the robot program into the robot controller.
The directory used for this project is displayed under "Directory". If you want to
change the directory or if you want to create a new directory press the button
"Browse..." which will open the browse dialog.
Insert your name into the text box "Created by", your initials into "Initials", and a
short description of the project task into "Description".
Proceed to the second step of the project wizard by pressing the "Next >" button.
This will display the second step of the Project Wizard.
Select the robot type you are working with, from the list "Robot Type".
Then, select the number of "I/O Interface Cards" (only required for the I/O
Monitor), the number of "Hands" (only required for opening and closing hands in the
Jog Operation), the number and type of "Additional Axes" (required for Jog
Operation) and the "Programming Language", which is essential for opening of the
correct program window. You can only choose between different programming
languages for robots of the RV-EN and the A series (RV-A, RH-AH, RP-AH). Robots of
the RV-M and RV-E series can only be programmed in Movemaster Command
(MRL).
Press the button "Finish", to create the project. A workcell window, the RCI
Explorer, an empty robot program window, the associated position list window, and
the message window will be opened and arranged on your monitor. Several files for
the project itself, the program and the position list are created in the directory
"Project Name".
The RCI Explorer contains two folders. The first folder is the robot folder. The
name of the folder matches the robot name, you have configured in the second
step of the project wizard. This example makes use of the robot "RH-5AH55". The
robot folder provides access to the data on the robot controller. The second folder
is the "Workplace". It contains the data on your PC in the project directory.
the programs and position lists currently available in the COSIROP project
directory on your PC,
and the COSIROP tools.
2. Use the RCI Explorer to check the connection properties. Open the context
menu of the "Connection" by clicking with the right mouse button on the
folder "Connection". Select "Properties" from the context menu.
5. If you have a robot of the A series (RV-A, RH-AH, RP-AH), set the key switch
on the robot controller to Auto(Ext.).
6. Establish the logical connection between COSIROP and the robot drive unit
by executing the command Execute/Init Connection, which will
communicate with the robot and determine the type of the robot and some
parameters of the robot and display them in the dialog box Robot Type. If
this dialog box will be displayed the communication to the robot drive unit
has been established and programs and position lists can be down- and
uploaded.
7. Establish a connection between COSIROP and the robot controller. Use again
the context menu of the "Connection". Select "Connect" to establish the
connection.
You get information concerning the type of the connected robot, the version of the
operating system, the actual robot language, and the number of available robot
programs on the robot controller.
Now, you are ready to start out with your first robot program.
The online help contains a detailed syntax description for every command. The F1
key opens the help page of the command where the cursor is located. See the
Reference Manual or the Instruction Manual to get further information.
Use the context sensitive help to get help on the command OVRD. To open the help
page place the cursor inside the OVRD command and press the F1 key.
If you have added new program lines that should be inserted between other lines in
the program according to their line numbers, use the command Edit/Sort to sort
the whole program in ascending order according to the line numbers.
Usually, you use the T/B (teach pendant) to create position data. Have a look at
your Instruction Manual for a detailed description of how to create position data.
Once you have created position data with the T/B it is easy to upload the position
data into a position list on your PC. Simply use the program upload. You will get
your position data as a position list and additionally any program lines you might
have created with the T/B.
Alternatively, you can create and modify a position list interactively using
COSIROP. Open the window Jog Operation by double clicking on the "Tool" "Jog
Operation".
Optionally, you can also open the window Jog Operation by the command
Execute/Jog Operation. Use this window to jog the robot in JOINT, XYZ and TOOL
coordinates. Use the button "Current Position-> Pos. List" to insert the current
robot position into the position list as position number "Pos.-No.". To override an
existing position just enter the position number into the text box "Pos.-No." or use
the spin buttons next to the text box. Set the "Jog Speed" and the "Jog Increment"
to appropriate values.
Create two positions P1 and P2 in your current position list and save the position
list with the command File/Save. Your position list might look like this:
You can check the syntax of your program also by using the command
Execute/check Syntax. The syntax checker finds syntactical errors in your program
and displays the errors in the message window.
Load the syntactically correct program and position list into the robot controller.
Downloading a program
The RCI Explorer offers a very easy and intuitive way to download a program from
the PC to the robot controller. Select the program you want to download to the
controller, in the folder "Programs" in your "Workplace". In the example the
program "3.MB4" is selected. Keep the left mouse button pressed and simply "drag
and drop" the program into the folder "Programs" of the robot:
If you release the mouse button, the download starts. The download can also be
started with the command "Download" from the context menu of the program.
Click on the program "3.MB4" with the right mouse button to open the context
menu.
Alternatively, you can download a program without the RCI Explorer, too. Activate
the window with the robot program by clicking into the window or by selecting the
window with the command Window/1,2,3.... Download the program by executing
the command Download PC->Robot from the menu "Execute". The dialog box Up-
and Download is displayed.
Usually, it is best to use the default values in the dialog "Up- and Download" and
download the complete program. To download the complete program, select the
option "Complete Program". If you want to download only a certain number of
lines, switch off the option "Complete Program" and insert line number for "From
Line" to "To Line". For MELFA-BASIC III and MELFA-BASIC IV the line numbers have
to be in the range between 1 and 32767, for Movemaster Command between 1 and
9999. Before the download, the specified line range is cleared in the robot
controller. Furthermore, insert the program "Name", that will be used for your
program in the controller. This field is always initialized with the file name of the
program on the PC.
If you are programming in MELFA BASIC and you are using line numbers larger than
9999, be sure to check "Delete all before Downloading". If this option is chosen, a
program in the Drive Unit will be deleted even if it contains line numbers larger
than 9999. If this option is not selected, line numbers larger than 9999 will not be
erased, independent of the line number you specify in the "To Line" section.
Position lists will not be deleted.
Press the "OK" button to start the download. All commands that are transmitted to
the drive unit are displayed on the screen. After each command the alarm (error)
status of the drive unit is checked. If an error should occurs the download will be
aborted and the erroneous command is displayed.
If an error is reported during the deletion of the old program (command "DL..." for
RV-E or RV-M robots), delete the program on the robot controller manually. Use the
RCI Explorer to delete a program. Open the "Programs" folder on the robot. Open
the context menu of the program that is going to be deleted, by clicking with the
right mouse button on the program name. Select "Delete".
After the successful download of the robot program, discover how to download the
position list to the robot controller.
The steps required to download a position list are almost the same as for a
program. The easiest way, to download a position list from the PC to the robot
controller, is to use the RCI Explorer. Select the position list you are going to
download to the robot controller, in the folder "Programs" on your "Workplace".
Keep the left mouse button pushed and drag and drop it into the "Programs" folder
on the robot.
The example demonstrates another way to download a position list. Select the
position list "3.POS". Open the context menu with the right mouse button. In the
context menu select "Download".
Alternatively, you can download a position list without the RCI Explorer. Activate
the position list window and execute the command Download PC->Robot from the
menu "Execute".
The dialog box Up- und Download is displayed. In most cases, it is best to can use
the standard settings. Be sure that the option "All Positions" is selected. If you
want to download only a special range of position numbers, switch off the option
"All Positions" and insert values for "From Position" and "To Position". There are
no limits for position numbers in MELFA-BASIC III and MELFA-BASIC IV. In
Movemaster Command the position numbers are limited to 1 to 999, and for the
RV-M1 the range is 1 to 629.
Before the download the old positions in the selected range are cleared. Note, that
the old positions are not cleared if you use MELFA-BASIC IV.
Additionally, you can add a "Name". The default name is the name of the file
position list on the PC.
If you use a different name, be sure to use the same name that you have used
for the program beforehand.
It is also very easy, to upload all the programs on the robot controller back to the
PC.
Uploading a program
The procedure for uploading is very similar to the downloading procedure. Again, it
is best to use the RCI Explorer. Just drag and drop the program from the
"Programs" folder of the robot to the "Programs" folder of your "Workplace".
Optionally, you can use the context menu of the robot program. Right click with
the mouse on the program "3". Select "Upload" in the context menu to start the
upload of a program and its associated position list. Note, that the program is
uploaded into your Workplace folder, but it is not opened on your monitor. If you
want to upload and open the program, select "Open" from the context menu or
simply double click on the program name.
Alternatively, you can also upload programs and position lists without the RCI
Explorer. Activate the program window that is to be used for the uploaded
program. You can open a new program window with the command File/New, too.
Then, execute the command Upload Robot->PC from the menu "Execute". This will
again open the dialog box Up- and Download. After pressing the "OK" button the
program will be uploaded line by line from the robot controller and finally
displayed in the program window.
During this upload the original program file on the disk will be overwritten and
there is no way to restore it.
You are now ready to debug your program directly on the robot controller.
Now, as you have downloaded your robot program successfully to the robot
controller, it is time to test your program online on the robot controller. Locate
last errors with the online Debugger. Start the Debugger by using the context menu
of your program. Right click with the mouse on the name of the program in the
folder Programs inside the robot folder. Select "Debug". In the example the
debugger for the program "3" is opened:
Note! In the debug mode, the robot actually moves according to the movement
commands.
The Debugger opens with the selected program. Set the current line to the first
program line. Select the first program line with the mouse and set it as currently
active line by pressing the icon shown in the following picture:
A small green arrow marks the currently active line. This is the line that will be
executed next by the robot program. Now, set breakpoints by double clicking on
the program lines, on which the program is supposed to stop during debugging.
Press on the icon shown in the following picture and start the breakpoint
debugging:
Program execution stops at the first breakpoint. Now, continue using the single
step mode. In the single step mode, only the command in the currently active
program line is executed. Afterwards the currently active line moves on to the next
program line. Execute a single step by pressing the icon shown in the following
picture:
Stop debugging b simply by closing the debugger. Close the debugger by pressing on
the icon shown in the following picture:
After testing your program in detail with the online debugger, you can now
continue to finally start the program.
There are two commands to start a robot program. Use the command "Start (CYC)"
(1 cycle) to start the program, once. Use the command "Start (REP)" (repeated) to
start the program in a continuous loop. With the command "Start (REP)" the
program continues until the program is stopped by a user command.
Stop the program with the command "Stop" from the context menu. It is also
possible to stop the program without the RCI Explorer. Use the command
Execute/Program Stop to stop the program without using the RCI Explorer.
If you start a program, the robot controller loads the program into the so-called
slot 1 before it is actually executed. If you want to start the program in a slot
different from slot 1, then you have to load the program into this slot, first.
Open the folder "Slots". If your program "3" is already loaded into a slot (e. g. Slot
1), then reset the slots first. Open the context menu of the folder "Slots" and select
"Reset".
If your parameter settings do not assign any programs to any slot (parameter SLT1
to SLT32), then all the slots should now be empty.
At the moment our program example is not designed to run in a slot other than slot
1. Thus, we have to modify our program first. Add the MELFA-BASIC IC commands
GETM 1 und RELM. GETM 1 reserves the robot for the current program. This is
necessary, whenever a robot is to be moved by a program that is not running in slot
1. Only one single program can move the robot at any given time. The robot
controller assumes that only the program running in slot 1 is moving the robot.
Thus, the command GETM 1 is not necessary, if the program is only running in slot
1. But all other programs have to claim the robot first, before they can use it.
Check the syntax of the modified program and download it to the robot. If
necessary, check the functionality of the program with the debugger. Load the
modified and checked program into slot 5. Click with the right mouse button on the
program name in the folder Programs in the robot folder. Select "Load to" -> "Slot
5". The program is loaded into slot 5.
Now, open the folder Slots. Start your program in slot 5 with the command "Start
(CYC)" from the context menu.
Stop the program execution with the command "Stop" from the context menu.
Discover next, how to monitor your running program.
Optionally, double click on a slot to open the Program Monitor of the selected slot:
You can actually monitor a lot of different types of robot data. Discover how to
monitor variable values.
In order to monitor the value of a local variable, add the counter variable MCOUNT
to your robot program.
Download the modified program to the robot, load it into slot 5, and start the
program. Select slot 5 in the Variables Monitor and add the variable MCOUNT to the
list of the monitored variables with the arrow buttons.
Start the monitor by pressing "ON" and observe the changing value of MCOUNT.
Double click on the variable name to open the dialog "Set Value". Use it to change
the value of the variable MCOUNT. Observe the change in the Variables Monitor.
There are actually many more monitors available. Check the robot state with some
of the other robot monitors.
Open the monitor Robot Position. Watch the changing joint and world coordinates
of the current position as the robot moves.
Open the monitor Servo Speed. Observe the changing joint velocities of the robot.
Open the monitor Motor Current 1. Observe the changing electric currents of each
servomotor.
Stop the program. Discover how to send commands directly to the robot.
You can interactively send commands to the robot and display the reply of the
robot controller with the Command Tool in the "Tools" folder of the RCI Explorer.
Alternatively, you can also open the Command Tool with the command
Edit/Command Tool. Use the Command Tool to send commands to the robot as
well as to insert robot commands into a robot program.
In order to test the functionality of the Command Tool, reset the slot contents,
first. Then, load your example program "3" into slot 1. Switch on the servo motors
of the robot with the command "Servos on" from the context menu of the robot.
Send the motion commands "MOV P1" and "MOV P2" to the robot. The robot will
move to the desired positions.
The Command Tool offers a structured list of robot commands and displays a short
syntax description for each command. Use the Command Tool to send commands to
the robot using the button "->Robot". The current command can either be selected
from the command list or entered using the keyboard. The Command Tool
remembers the last 20 commands, which have been sent to the robot. Choose the
class "Last commands" to display the least recently used commands.
Use the button "->Send directly" only, to communicate with a robot program or if
you have detailed knowledge about the communication protocol. This command
does not add necessary modifications to the command. Instead, the command is
sent as it is. To directly communicate with a running robot program, you can also
use the Terminal.
Furthermore, you can build up your own list of favorite commands by using the
button "Add" in the group "User defined commands". This list can be displayed by
choosing the class "User defined commands". These commands will be stored
together with the project.
Enter a new value for the parameter in the Properties dialog. If you are working
with an A series robot (RV-A, RH-AH, RP-AH), be sure to switch the key switch on
the robot controller to Teach. Set the value of "BZR" to 0 and press the "OK"
button.
Note, that you have to switch the robot controller off and back on again to
confirm the changes.
Change the parameter "BZR" back to 1, switch the controller off and on, and switch
the key switch back to Auto(Ext.).
Discover in the next chapter, how to check the last error messages.
Determine the cause of any current error. Select "Current Alarm ..." from the
context menu of the robot.
Alternatively, you can determine the cause of any current error with the command
Current Alarm in the menu "Execute".
Closing the dialog box "Properties of the current error" with "OK" resets the
current error.
A dialog box pops up. Select a folder for the backup. Be sure to select an empty
folder for the backup. This backup folder will then contain only files necessary for
the backup and none of your PC data will be overwritten during the backup. The
backup can take several minutes, especially if there are a lot of programs on the
robot controller and you are connected via a slow serial link with the robot.
Store the backup data in a safe place and use it, whenever you need to recover the
state of the robot at the backup time. To load a backup, select "Load Backup" ->
"All" in the context menu of the robot.
Select the folder that contains your backup data. After your data is successfully
recovered, switch the robot controller off and back on again to confirm the
changes.
Use the backup folder only for data backups of your robot and for data
recovery. Do not try to download single backup files with the program download
of COSIROP, if the backup files have the same names as regular COSIROP
programs! Under no circumstances try to transfer COSIROP program files with
"Load Backup" to the robot. The file formats are different and the robot
programs will be destroyed and cannot be recovered.
Congratulations! You are now familiar with the most important functions of the
COSIROP software. We wish you a lot of successful projects with your new robots.
The remaining chapters cover very specialized and advanced topics. Have a look at
the overview, to find out, if they contain any interesting material for you.
Institute of Robotics Research Otto-Hahn-Str. 8 Phone: +49 231 755-4650/1/2 eMail: contact@irf.de
Director: Prof. Dr.-Ing. E. Freund D-44227 Dortmund, GERMANY Fax: +49 231 755-4653 Internet: www.irf.de