Tải bản đầy đủ

RobotStudio™ 6.03 programming and simulating I/Os

RobotStudio™ 6.03
Programming and simulating I/Os


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 2016 ABB All right reserved.
ABB AB
Robotics Products
SE-721 68

Västerås Sweden
2016-06-17 ABB


Table of Contents

1. Setting up a simulation from a backup.....................................................4
1.1 Create System from backup ..................................................................... 4

2. Working with Smart Components and RAPID Editor ............................11
2.1
2.2
2.3
2.4

Setup a simulation without action instructions ........................................ 11
Using the RAPID editor to edit the procedures ....................................... 12
Station Logic Setup ................................................................................. 19
Simulation Setup ..................................................................................... 20

3


Programming and simulating I/O signals

1. Setting up a simulation from a backup
Overview
In this exercise we will first learn how to create a system from a robot backup and then setup
and run a simulation of a spot welding application. To be able to synchronize the spot
instructions to the RobotStudio station, we will also learn how to create a process template for
instructions that are not automatically synchronized to station.

1.1

Create System from backup

Creating the system and Restoring the Backup
We will start with creating a solution with Station and Robot Controller but instead of creating
a new controller we will Create from backup. After starting this system we will also restore
the information from the backup. In this step, all data from the backup such as RAPID


programs and configuration files will be restored into the new system.
1. Go to File tab > New and choose Solution with Station and Robot Controller.
2. For Solution Name use mySpotSolution and for Location save it in a new file Module_5
in the location: \Courseware\Solutions\Module_5
3. Name the controller mySpotSystem then select Create from backup and browse to
\Courseware\Systems\Spot_Backup
Note!
You need to browse to the folder containing the backup folders to select them. In this case,
you must select the Systems folder. If there are more than one backup in the Systems folder,
then they will be listed under Available backups.

4. Press Create
Note!
You can also create from backup by going to the controller tab (before creating a station)
and click on Installation Manager. If you are using RW 6.x you choose Installation
Manager. If you are using 5.x you choose System Builder.

4


Programming and simulating I/O signals

5. As the backup includes a configuration file for a servo gun, you will be prompted to
select a library file for this tool. On the dialog, click Load from file…

6. Browse to \Courseware\Libraries\ServoGun.rslib and click Open then Ok.

Note that the gun will now be imported but not attached to the robot.
7. There are also different library models available for the IRB6700 so we are also
prompted to choose one. In this case since we are working with a spot welding
application we will choose the IRB6700_175_260_SW6_02. (The SW in the name
refers to Spot Welding and includes the proper dress pack on the model for this
application)

8. Press OK

5


Programming and simulating I/O signals

9. Attach the gun by using drag&drop in the Layout browser. Answer Yes on the Update
Position question.

Synchronizing Spot procedure to station
Now we will synchronize a procedure from the backup to station however we will notice that
only the Move instructions will be synchronized. To be able to synchronize Spot instructions
we need to setup templates for the Spot instructions for them to be handled by RobotStudio.
We will start with importing a workpiece.
1. Import WeldObject.rslib from Courseware > Libraries.
2. In the Rapid tab, click Synchronize to station from the Synchronize drop-down menu.
Select mySpotSystem in order to synchronize everything to the station. In this case we
want to synchronize the ToolData and WorkObject. In this case selecting just the
Path_Process will also automatically synchronize to the station, even if they are not
selected in the System tree, as shown in the below picture. Click OK in the dialog.

3. We have now synchronized the path to station but if we compare the amount of
instructions synchronized to station with the actual path in the RAPID editor, we will
notice that the Spot instructions has not been synchronized.

6


Programming and simulating I/O signals

In the image above you can only see six move instructions.

But when looking in the RAPID editor we can see some SpotL instructions as well.

Creating Instruction templates
In this section we will add templates for the Spot instructions using the Instruction Template
Manager. We will create Instruction Descriptions and Process Definitions for SpotL and
SpotJ.
1. From the Home tab Start Instruction template Manager from the active taskbar next to
the controller status icon.

7


Programming and simulating I/O signals

2. Create Move instruction descriptions for SpotL and SpotJ. (right click on “Move
Instruction Description”)

3. Select SpotL in the browser and ensure that PointType is set to ToPoint. Click Apply.
Then repeat for SpotJ.

4. Right click on in the Process Definition context menu to open the Create Process
Definition dialog box.

8


Programming and simulating I/O signals

5. Once the Create Process Definition dialog is opened, type Spot as the Process
Definition name and select both SpotL and SpotJ from the list. Then click Create.

6. Now go to the Rapid tab and Synchronize to Station again. Ensure that Path_process is
checked.

7. Go back to the Home tab and make sure that the path now is complete.

8. Click the Play button to run the simulation.
9. Save the station as
\Courseware\Solutions\Module_5\mySpotSolution\Stations\mySpotStation.

9


Programming and simulating I/O signals

Learn more
Click the F1 or Help button

10

in the top right corner of RobotStudio.

See the help section

For information about

The Home Tab
>Instruction Template Manager

On how to use the Instruction template manager.


Programming and simulating I/O signals

2. Working with Smart Components and RAPID Editor
Overview
In this exercise we will learn how to use Smart Components in a simulation. After this is done
we will use the RAPID Editor to edit the procedures to complete our program. We will learn
to use functions such as IntelliSense, Pick Lists and Complete Word.

2.1

Setup a simulation without action instructions

Unpack the Station
We will start with running a simulation without any action instructions in our procedures. So
far, the paths consist of only Move -instructions.
1. Use Unpack&Work to open the Pack&Go file StartLathe.rspag from the Courseware
> Stations folder. Unpack it to a new folder myLatheSolution in
\Courseware\Solutions\Module_5.
2. In order to run the simulation we need to create an empty path named Main that will call
for the other procedures. Right click the path and set as entry point.

3. From the Rapid tab, run Synchronize to RAPID. Make sure all paths are selected and
then click the OK button.

4. Go to the Simulation tab and click the Play button to start the simulation.
5. Save the station as
\Courseware\Solutions\Module_5\myLatheSolution\Stations\StartLathe.

11


Programming and simulating I/O signals

2.2

Using the RAPID editor to edit the procedures

RAPID Editor
We will now finalize the RAPID program by adding action instructions. This can be done
either from the Home tab or manually writing the instructions in the Rapid editor. In this
example, we will focus on the editor.
1. Go to the Rapid tab and open the RAPID Editor for Module1.

2. Use the functions IntelliSense, Pick Lists and Complete Word to complete the
procedures as shown below. Notice as you type various lists and prompts will come up
to ensure correct syntax.

TIP!
Depending upon whether you selected from the Pick Lists or simply typed the
instructions as shown above you may result with various capital and/or lower case letters
as well as different indentations. We have ways to standardize on the indentations and
formatting of the text in the Rapid program as it is viewed in the editor.
3. Once your main procedure is done click on the lower half of the Format button and
select format document.

12


Programming and simulating I/O signals

The result will be as shown below.

In addition we can also change all Keywords to uppercase letters.

4. Next we will add some instructions to the procedure “GetPiece”
5. Start by placing your cursor where you want the next instruction to be.

6. Next click on the Instruction button and move down to Common. Select WaitDI.

13


Programming and simulating I/O signals

7. If you add the first WaitDI from here you will notice that you are prompted to add the
argument. By holding Ctrl and hitting the space bar while on the you will get a
dropdown menu of all configured signals and procedures present in the controller.
(Notice you can also select the tab to open up all commands.)

8. Add the various I/O instructions to “GetPiece” as shown below.

14


Programming and simulating I/O signals

TIP!
Note that as you type instructions you will see a red underscore. This indicates that the
program is constantly being checked for syntax. In the case below the semicolon is not
yet present so this indicator will remain until the code is correctly entered.

9. Continue to add the instructions to the remaining procedures. Use a combination of Pick
Lists, IntelliSense and Snippets as shown in the TIP on the next page.

15


Programming and simulating I/O signals

Tip!
As you add instructions to the procedures you will notice that two instructions come up
repeatedly to control the tool. In cases like these you could create a Snippet that can be
reused over and over. In this case you could save these two instructions as ToolActivate.

They can then be called up when you want to add them in a future procedure. (Note that
you will have to change 1s to 0s or vice versa depending on which tool status you used.
Alternatively you can make one Snippet for “Grip” and one Snippet for “Ungrip”.

16


Programming and simulating I/O signals

10. Next we want to test run our program while watching the Graphics, Editor and I/O
signals.
11. Go to the Simulation tab and open up the I/O Simulator.

12. Under Filter select User List then Edit List.

13. Select new list and name it LatheSignals.

14. Select the signals you wish to view and then populate the list by clicking on the add
button. When finished click OK.

17


Programming and simulating I/O signals

15.Switch back to the Rapid tab and right click on the module tab you would like to view.
Select New Vertical Tab Group.

This way you can see the simulation, the RAPID execution and handle IOs

16. Set the Program Pointer to main by right clicking on the routine over on the controller
tab.

17. Test run the program by clicking Start from the ribbon in the RAPID tab. Respond with
the proper IO signals when necessary. Stop the program when you are satisfied that the
logic is running correctly. Reset all I/O signals to 0.

18


Programming and simulating I/O signals

2.3

Station Logic Setup
The next step is to setup I/O connections between the Smart Components and the Virtual
Controller to get a complete simulation. This can be thought of as “virtual wiring” between
the various components in the simulation environment whereas in the real application there
would be physical wiring in place between the actual components.
1. In the ribbon of the Simulation tab, click Station Logic.
2. On the Signals and Connections tab, click Add I/O Connection.

3. Set Source Object to SC_InFeeder, Source Signal to doPartInPos, Target Object to
IRB4600_IOTraining_system (the Virtual Controller) and Target Signal to
diPartInPickPos.
Click OK. We have now created our first I/O Connection.

Now create the rest of the I/O connections with the details from the picture below.

19


Programming and simulating I/O signals

Note that you can also view the I/O Connections in the Design View.

2.4

Simulation Setup
Each SC that consumes time (e.g. moving an object) needs to have a simulation running. But
if the RAPID Editor should be used for debugging and editing, the Virtual Controller has to be
excluded from that simulation.
The next step is to save the state for the simulation start, and to define what components
should be part of the simulation.
1. On the Compose tab, click Save Current State.

20


Programming and simulating I/O signals

Name the Current State SimulationStart.
Check all values for Object states and I/O Signal values for Virtual Controller states
and Smart Components as shown below and press OK.

When Simulation Play is pressed, all checked objects will go back to the state it had
when the Current State was saved, so it is important that joint values, I/O signals etc. has
the correct state before the state is saved.
2. In the ribbon of the Simulation tab, click Simulation Setup.
3. Verify that Saved State Simulation Start is selected at Initial state. Uncheck the
controller in the Simulated objects view. Press Close.

Start the simulation by pressing Play.

21


Programming and simulating I/O signals

4. Go back to the Rapid tab, click the Controller Status bar (
) and check if
the controller is in Auto mode. If not, open the Control Panel from the Controller tab
and then switch the controller status to Auto mode.
5. Set the Program Pointer to main and step through the program one cycle with Step In
(F11) from the RAPID tab. If the program works correct, click Start (F8) to run the
program continuously.
6. Stop the program. Now use the functions Step Out (Shift+F11) and Step Over (F12) to
run through the program.
7. Stop the program. Set a Breakpoint (F9) at the instruction SetDO doCloseGripper_1,1;
in the procedure GetPiece(). Start (F8) the program from main and verify that the
program stops before SetDO doCloseGripper_1,1 is executed.
8. Save the station
\Courseware\Solutions\Module_5\myLatheSolution\Stations\myStationSimSetup.

Learn more
Click the Help button

in the top right corner of RobotStudio.

See the Help section

For information about

The Simulation Tab
>Station Logic

On how to use Station Logics.

How to program robots
> RAPID Editor

On how to use the RAPID Editor

Challenge
You have learned to use the RAPID Editor and work with Smart Components.
Now try to change the rapid program and add I/O connections, so that the robot feeds the
machine with a new part within the same routine as it picks a ready part from the machine.

22


Programming and simulating I/O signals

© Copyright 2016 ABB All right reserved.
ABB AB
Robotics Products
SE-721 68 Västerås
Sweden

23




Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×