0% found this document useful (0 votes)
85 views

MPS RobotAssembly Programming in Ciros6 v1 0 en

Uploaded by

Jackie Bernal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

MPS RobotAssembly Programming in Ciros6 v1 0 en

Uploaded by

Jackie Bernal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

MPS Robot Assembly Programming in CIROS 6.

0 [EN]
Version: v1.0 (09.11.2015)

Daniel Bolla – FESTO DC-ECP

Hardware Versions
 MPS-D Robot Assembly Statiton with Mitsubishi RV 2FB

Software Versions
 Window 7 Enterprise, Service Pack 1, 64 bit version
 CIROS Education 6.0.9a
 CIROS Studio 6.0.9a

[email protected]
MPS Robot Assembly Programming in CIROS 6.0  Run the Reference Model in Simulation

Table of Contents
Table of Contents.................................................................................................................................................. 2
Run the Reference Model in Simulation ............................................................................................................... 3
Open User Model of Robot Assembly ................................................................................................................. 3
Exercise 1 – Simple Pick&Place ........................................................................................................................... 5
Task .................................................................................................................................................................... 5
Solution .............................................................................................................................................................. 6
Create new project ........................................................................................................................................... 6
Create new program and position list .............................................................................................................. 7
Basic Movements ............................................................................................................................................. 9
Gripper Commands ........................................................................................................................................ 10
Speed Commands .......................................................................................................................................... 10
Write the Program of the Exercise 1 ............................................................................................................... 11
Create Position List ........................................................................................................................................ 11
Test the Program in Simulation ...................................................................................................................... 13
Exercise 2 – Pick&Place with Offsets ................................................................................................................. 14
Task .................................................................................................................................................................. 14
Solution ............................................................................................................................................................ 15
Create new Project ......................................................................................................................................... 15
Relative Movements ...................................................................................................................................... 15
Program of the Exercise 2 .............................................................................................................................. 16
Positionlist of the Exercise 2 .......................................................................................................................... 16
Test the Program in Simulation ...................................................................................................................... 16
Exercise 3 – Sorting According to Color ............................................................................................................. 17
Task ....................................................................................................................... Error! Bookmark not defined.
Solution 1 ......................................................................................................................................................... 18
Program of the Exercise 3 .............................................................................................................................. 18
Positionlist of the Exercise 3 .......................................................................................................................... 19
Solution 2 ......................................................................................................................................................... 19

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 2


MPS Robot Assembly Programming in CIROS 6.0  Run the Reference Model in Simulation

Run the Reference Model in Simulation


Open User Model of Robot Assembly
First we have to open the MPS Robot Assembly Station model. For this we use the Ciros
Education. In Ciros Education we can find many different models in the help.

First we open the Ciros Education [1] from the Start Menu.

When we open the Ciros Education, the help is opened automatically. In the help we should
navigate to “CIROS Education/Robot programming/MPS stations/Robot assembly station
with RV-2FB” [2]. There we find three options.
 The “Open reference model” means we want to open a model, and we do not want to
change it, just run the simulation. It is good for presentations.
 The “Open user model” means we copy the reference model to a separated folder. This
model we can edit and save. This is what we can use for practicing with the robot.
 With the “Delete user model” we can delete the model which we created with “Open
user model”. We should use it, if we want to start from the beginning with the user
model.

4 3

Now we want to change the program, so we click on the “Open reference model” [4]. If we
already used the user model, we should delete it first with the “Delete user model” [3].

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 3


MPS Robot Assembly Programming in CIROS 6.0  Run the Reference Model in Simulation

If we did not have a user model before, or we deleted it, we should se the following window
during copying the reference model.

After the copy was finished, the model will be opened in Ciros Education. Maybe the help
window will hide it. In this case we should minimize the help window.
In the project we get a defult program, which we can run in simulation. For this first we click
on the “Start” button [5]. Then we should reset the station with the “Reset” button (gray
button) on the station [6]. After the initial position is reached, with the buttons on the right
side of the station [7] we can fill-up the springs, pistons and covers. After that we can start
the station with the “Start” button (green button) [8].

7
8
6

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 4


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Exercise 1 – Simple Pick&Place


Task
The robot moves to the initial position (1). The workpiece slides down on the slide. The
robot moves above it (2), aproach it (3) and picks it up (4, 5). It moves above the place
position (6), moves down (7) and drops the workpiece on the slide (8). At the end the robot
moves back to the initial position (9, 10).

pHome
pCylIn2 pProdOut2

pCylIn pProdOut

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 5


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Solution
Create new project
For the simulation we need a project. First we open the “PROGRAMMING/Project
management” [1].

We right-click on the “Projects” and click on “New...” [2] to create a new project.

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 6


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Now we select “Melfa Basic V (MBA-V)” [3] and then “Project” [4]. We can select any name
for the project (e.g.: “Exercise 1.prjx”) [5]. We should save the file to a specific location. It will
be needed when we want to download the program to the real robot. Click on the “Browse”
[6] button and navigate to the following location.
C:\Users\...\Documents\CIROS\CIROS Models\Robot Programming\MPS Robot Stations RV-2FB\
MPS-RobotAssemblyStation\Model\RV-2FB

At the end we click on the “OK” button [7].

5 6

Create new program and position list


In the Project Management we will see the new project. We right-click on the “Files” under
the project and select the “New...” option [1] to add a new program to the project.

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 7


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

In the next window we select the “Program” [3] to add a program. The program name can
contain letters and numbers. It is good if the name is not longer than 4 characters (e.g.:
“EX1.mb5”) [4]. If it is longer, we cannot start it from the robot controller. We should save the
file to the same folder like the project. At the end we click on the “OK” button [5].

We create the position list the same way, but this time we select “Position list” [6]. The
name should be the same like the program name (e.g.: “EX1.pos”) [7].

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 8


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Basic Movements
There are two types of basic movements in Melfa Basic. Both has one parameter which is
the target position

 MOV: The MOV is a joint interpolated movement. It means each axis will finish the
movement at the same time. For example if we have to rotate Joint 1 with 30
degrees and Joint 2 with 60 degrees to reach the target positions, the Joint 2 will
move two times faster than Joint 1, and finish the movement at the same time.
The disadvantage of this movement is that we do not really know on which path
the robot will move. But if we try it once, the path will be the same for the second
time, even if we changed the speed.
The advantage of this movement is that the robot can reach all reachable position
from all positions.
MOV P1 'Mov to P1 with joint interpolated movement

 MVS: The MVS is a linear interpolated movement. It means the robot moves on a
straight line.
The disadvantage of this movement is that the robot cannot reach all reachable
positions from all positions. For example if we want to move from front of the
robot to behind the robot, it is not possible with MVS, but it is possible with MOV.
The advantage of this movement is that we really know how the robot will move.
MVS P1 'Mov to P1 with linear interpolated movement

Usually we use the MOV command when we are far from objects, and for the final approach
we use the MVS. So if we want to pick-up a workpiece, we move above the workpiece with
MOV and move down with MVS. After we closed the gripper, we move up with MVS.

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 9


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Gripper Commands
 HOPEN: With HOPEN we can open the gripper. It needs one parameter which is the
hand number. The robot can have more hands, so with this we can select
which gripper we want to open. If we have only one gripper, like now, we
should use 1 as hand number.
Before the hand commands we should have a small delay (e.g.: 0.1s). If we do
not do this, the gripper will be closed before the positioning. It happens
because the robot precalculates the path and if the next command is not a
movement, it will execute it before the last movement finished. If we have a
small delay, it will just execute the delay, but not the hand operation.
DLY 0.1 'Wait for finish the previous movement (0.1s)
HOPEN 1 'Open gripper 1
DLY 0.5 'Wait for the gripper to be closed (0.5s)

 HCLOSE: With HOPEN we can open the gripper. It needs one parameter which is the
hand number. Before closing and after closing we should wait some time like
at HOPEN.
DLY 0.1 'Wait for finish the previous movement (0.1s)
HCLOSE 1 'Close gripper 1
DLY 0.5 'Wait for the gripper to be open (0.5s)

Speed Commands
 JOVRD: With JOVRD we can change the speed of the MOV movement. It is in % of the
maximum joint speed. We can change tha speed at any point of the program.
JOVRD 40 'Change the speed to 40%
MOV P1 'Move to P1 with joint interpolation

 SPD: With SPD we can change the speed of the MVS movement. It is in mm/s. We
can change tha speed at any point of the program.
SPD 100 'Change the speed to 100 mm/s
MVS P1 'Move to P1 with linear interpolation

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 10


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Write the Program of the Exercise 1


Type in the following code to the “EX1.mb5” editor window.
SPD 50 'Set the speed for linear (MVS) movements to 50 mm/s
JOVRD 50 'Set the speed for joint interpolated (MOV) movements to 50% of the maximum joint speed

MOV pHome 'Move to the initial position

MOV pCylIn2 'Move above pick-up position


DLY 0.1 'Wait for finish the previous movement (0.1s)
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand (0.5s)
MVS PCylIn 'Move to the pick-up position
DLY 0.1 'Wait for finish the previous movement (0.1s)
HCLOSE 1 'Close the hand
DLY 0.5 'Wait for the hand
MVS pCylIn2 'Move above pick-up position

MVS pPrdOut2 'Move above drop position


MVS pPrdOut 'Move to the drop position (slide)
DLY 0.1 'Wait for finish the previous movement (0.1s)
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand (0.5s)
MVS pPrdOut2 'Move above drop position

MOV pHome 'Move to the initial position

Create Position List


Before we run the simulation we need coordinates for the positions in the position list. If we
right click in the position list we can insert a position [1] into the list.

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 11


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

If we do so, there will be a “P1” position int he position list with the actual coordinate of the
robot. If we select the position, right-click on it and select “Properties” [2], we can change the
name and the coordinates of the inserted position.

Now we change the name to “pHome” [3]. We can add some comments [4]. And we change
to the following coordinates [5]. At the end we click on the “OK” button [6]

3 4

Now we should do the same thing with the other positions. We add the following positions
with the following coordinates and comments.

Name X Y Z A B C Comment
pHome 200 0 350 180 0 180 Initial position
pCylIn 250 -35 180 180 0 -125 Pick-up position
pCylIn2 250 -35 220 180 0 -125 Above pick-up position
pPrdOut 140 260 310 180 0 90 Drop position
pPrdOut2 140 260 350 180 0 90 Above drop position

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 12


MPS Robot Assembly Programming in CIROS 6.0  Exercise 1 – Simple Pick&Place

Test the Program in Simulation


Before we run the simulation we have to compile our new project. First we click in the
program editor of the new program [1]. Then we compile the actual program with the
“PROGRAMMING/Compile” [2]. The compilation is only needed for the simulation, but not for
the real robot.

If the compilation was successful, we should see “Compilation: 1 successful” [3]. If the re
was an error, we can double-click on the error message, and it jumps to the wrong
programline.

After the compilation we can run the simulation. In our program we do not wait for the
workpiece, the movement starts immediately. Because of this after we click on the run
button [4] we should click immediately on the workpiece button [5].

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 13


MPS Robot Assembly Programming in CIROS 6.0  Exercise 2 – Pick&Place with Offsets

Exercise 2 – Pick&Place with Offsets


Task
The robot moves to the initial position (1). The workpiece slides down on the slide. The
robot moves above it (2) with 40 mm, aproach it (3) and picks it up (4, 5). It moves above the
place position (6) with 40 mm, moves down (7) and drops the workpiece on the slide (8). At
the end the robot moves back to the initial position (9, 10). We should not use taught
positions above the pick-up and drop position. We use relative movements.

pHome

pCylIn pProdOut

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 14


MPS Robot Assembly Programming in CIROS 6.0  Exercise 2 – Pick&Place with Offsets

Solution
Create new Project
As we created a new project in Exercise 1 we create a project for Exercise 2 [1]. We add a
program “EX2.mb5” [2] and a position list “EX2.pos” [3].

Relative Movements

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 15


MPS Robot Assembly Programming in CIROS 6.0  Exercise 2 – Pick&Place with Offsets

Program of the Exercise 2


We type in the following program in the program editor of “EX2.mb5”.
SPD 50 'Set the speed for linear (MVS) movements to 50 mm/s
JOVRD 50 'Set the speed for joint interpolated (MOV) movements to 50% of the maximum joint speed

MOV pHome 'Move to the initial position

MOV PCylIn, -40 'Move to pick-up shifted by -40 mm in TOOL-Z direction (above workpiece)
DLY 0.1 'Wait for finish the previous movement (0.1s)
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand (0.5s)
MVS PCylIn 'Move to the pick-up position
DLY 0.1 'Delay to finish the movement
HCLOSE 1 'Close the hand
DLY 0.5 'Wait for the hand
MVS PCylIn, -40 'Move to pick-up shifted by -40 mm in TOOL-Z direction (above workpiece)

MVS pPrdOut, -40 'Move to drop position shifted by -40 mm in TOOL-Z direction (above drop position)
MVS pPrdOut 'Move to the drop position (slide)
DLY 0.1 'Delay to finish the movement
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand
MVS pPrdOut, -40 'Move to drop position shifted by -40 mm in TOOL-Z direction (above drop position)

MOV pHome 'Move to the initial position

Positionlist of the Exercise 2


We add the following positions to “EX2.pos”.

Name X Y Z A B C Comment
pHome 200 0 350 180 0 180 Initial position
pCylIn 250 -35 180 180 0 -125 Pick-up position
pPrdOut 140 260 310 180 0 90 Drop position

Test the Program in Simulation


Now click in the “EX2.mb5” program editor and compile the project. Then we can run the
simulation.

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 16


MPS Robot Assembly Programming in CIROS 6.0  Exercise 3 – Sorting According Color

Exercise 3 – Sorting According to Color

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 17


MPS Robot Assembly Programming in CIROS 6.0  Exercise 3 – Sorting According Color

Solution 1
Program of the Exercise 3
DEF IO StartB = BIT, 3 'Define the Start Button which is connected to input 3
DEF IO RED = BIT, 900 'Define the Color Sensor which is connected to the first Hand input (input 900)
SPD 50 'Set the speed for linear (MVS) movements to 50 mm/s
JOVRD 50 'Set the speed for joint interpolated (MOV) movements to 50%

*Start 'Label to show the begining of the program. We will jump back to here.
WAIT StartB = 1 'Wait for the start button
MOV pCylCoC, -40 'Move above the color check position
MVS pCylCoC 'Move to the color check position
DLY 0.1 'Wait to finish the movement

IF RED = 1 THEN 'IF the workpiece is red


MVS pCylCoC, -40 'Move above color check position
MOV pCylIn, -40 'Move above pick-up position
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand (0.5s)
MVS pCylIn 'Move to the pick-up position
DLY 0.1 'Delay to finish the movement
HCLOSE 1 'Close the hand
DLY 0.5 'Wait for the hand
MVS pCylIn, -40 'Move above the pick-up position
MVS pProdOut, -40 'Move above target position (slide)
MVS pProdOut 'Move to the target position (slide)
DLY 0.1 'Delay to finish the movement
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand
MVS pProdOut, -40 'Move above target position (slide)
MVS PINIT 'Move to the initial position
ELSE
MVS pCylCoC, -40 'Move above color check position
MOV pCylIn, -40 'Move above pick-up position
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand (0.5s)
MVS pCylIn 'Move to the pick-up position
DLY 0.1 'Delay to finish the movement
HCLOSE 1 'Close the hand
DLY 0.5 'Wait for the hand
MVS pCylIn, -40 'Move above the pick-up position
MVS pMag1, -40 'Move above pMag1 position (magazine)
MVS pMag1 'Move to the pMag1 position (magazine)
DLY 0.1 'Delay to finish the movement
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand
MVS pMag1, -40 'Move above pMag1 position (magazine)
MVS pHome 'Move to the initial position
ENDIF
GOTO *Start 'Jump back to the *Start label and continue the program from there

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 18


MPS Robot Assembly Programming in CIROS 6.0  Exercise 3 – Sorting According Color

Positionlist of the Exercise 3


Name X Y Z A B C Comment
pHome 200 0 350 180 0 180 Initial position
pCylIn 250 -35 180 180 0 -125 Pick-up position
pPrdOut 140 260 310 180 0 90 Drop position
pCylCoC 265 -15 175 180 0 110 Cylinder color check position
pMag1 320 -105 350 180 0 -90 Magazine 1 position

Solution 2
If we check the previous solution, we will se that we use almost the same programlines in
the IF and in the ELSE. Instead of this we can use a target position (e.g.:”pTarget”), and
assign it to “pProdOut” or to “pMag1” depending on the sensor value.
DEF IO StartB = BIT, 3 'Define the Start Button which is connected to input 3
DEF IO RED = BIT, 900 'Define the Color Sensor which is connected to the first Hand input (input 900)

SPD 50 'Set the speed for linear (MVS) movements to 50 mm/s


JOVRD 50 'Set the speed for joint interpolated (MOV) movements to 50%

*Start 'Label to show the begining of the program. We will jump back to here.
WAIT StartB = 1 'Wait for the start button
MOV pCylCoC, -40 'Move above the color check position
MVS pCylCoC 'Move to the color check position
DLY 0.1 'Wait to finish the movement

IF RED = 1 THEN 'IF the workpiece is red


pTarget = pProdOut 'Select slide as target position
ELSE
pTarget = pMag1 'Select magazine as target position
ENDIF

MVS pCylCoC, -40 'Move above color check position


MOV pCylIn, -40 'Move above pick-up position
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand (0.5s)
MVS pCylIn 'Move to the pick-up position
DLY 0.1 'Delay to finish the movement
HCLOSE 1 'Close the hand
DLY 0.5 'Wait for the hand
MVS pCylIn, -40 'Move above the pick-up position
MVS pTarget, -40 'Move above target position
MVS pTarget 'Move to the target position
DLY 0.1 'Delay to finish the movement
HOPEN 1 'Open the hand
DLY 0.5 'Wait for the hand
MVS pTarget, -40 'Move above target position
MVS PINIT 'Move to the initial position

GOTO *Start 'Jump back to the *Start label and continue the program from there

Daniel Bolla (FESTO DC-ECP) – MPS_RobotAssembly_Programming_in_Ciros6_v1_0_EN.docx.pdf 09.11.2015 Page 19

You might also like