This paper present the content: setting up a simulation from a backup, create system from backup, working with smart components and rapid editor, setup a simulation without action instructions, using the rapid editor to edit the procedures, station logic setup, simulation setup...
Trang 1Programming and simulating I/Os
Trang 2purpose 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, andcontents 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 ABRobotics Products
Trang 31 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 Setup a simulation without action instructions 11
2.2 Using the RAPID editor to edit the procedures 12
2.3 Station Logic Setup 19
2.4 Simulation Setup 20
Trang 41 Setting up a simulation from a backup
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
Trang 55 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 t he 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
Trang 69 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 ofinstructions synchronized to station with the actual path in the RAPID editor, we willnotice that the Spot instructions has not been synchronized
Trang 7In 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 TemplateManager We will create Instruction Descriptions and Process Definitions for SpotL andSpotJ
1 From the Home tab Start Instruction template Manager from the active taskbar next to
the controller status icon
Trang 82 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.
Trang 95 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.
Trang 10Learn more
Click the F1 or Help button 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
Trang 112 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.
Trang 122.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 andformatting of the text in the Rapid program as it is viewed in the editor
Trang 13The 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.
Trang 147 If you add the first WaitDI from here you will notice that you are prompted to add theargument By holding Ctrl and hitting the space bar while on the <ARG> you will get adropdown menu of all configured signals and procedures present in the controller.(Notice you can also select the tab to open up all commands.)
Trang 15Note that as you type instructions you will see a red underscore This indicates that theprogram is constantly being checked for syntax In the case below the semicolon is notyet 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.
Trang 16As 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 thatyou 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”
Trang 1710 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.
Trang 1815.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
Trang 192.3 Station Logic Setup
The next step is to setup I/O connections between the Smart Components and the VirtualController to get a complete simulation This can be thought of as “virtual wiring” betweenthe various components in the simulation environment whereas in the real application therewould 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
Trang 20Note 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 beexcluded from that simulation
The next step is to save the state for the simulation start, and to define what componentsshould be part of the simulation
1 On the Compose tab, click Save Current State.
Trang 21Name 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
Trang 224 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 themachine with a new part within the same routine as it picks a ready part from the machine
Trang 23© Copyright 2016 ABB All right reserved.
ABB ABRobotics Products
SE-721 68 Västerås
Sweden