Epson .NET Support User manual

Type
User manual
Rev.5 EM129S2349F
EPSON RC+ 6.0 Option
VB Guide 6.0
EPSON RC+ 6.0 Option VB Guide 6.0 Rev.5
VB Guide 6.0 Rev.5 i
EPSON RC+ 6.0 Option
VB Guide 6.0
Rev.5
Copyright 2009-2012 SEIKO EPSON CORPORATION. All rights reserved.
ii VB Guide 6.0 Rev.5
FOREWORD
Thank you for purchasing our robot products.
This manual contains the information necessary for the correct use of the Manipulator.
Please carefully read this manual and other related manuals before installing the robot
system.
Keep this manual handy for easy access at all times.
WARRANTY
The robot and its optional parts are shipped to our customers only after being subjected to
the strictest quality controls, tests, and inspections to certify its compliance with our high
performance standards.
Product malfunctions resulting from normal handling or operation will be repaired free of
charge during the normal warranty period. (Please ask your Regional Sales Office for
warranty period information.)
However, customers will be charged for repairs in the following cases (even if they occur
during the warranty period):
1.
Damage or malfunction caused by improper use which is not described in the manual, or
careless use.
2.
Malfunctions caused by customers’ unauthorized disassembly.
3.
Damage due to improper adjustments or unauthorized repair attempts.
4.
Damage caused by natural disasters such as earthquake, flood, etc.
Warnings, Cautions, Usage:
1.
If the robot or associated equipment is used outside of the usage conditions and product
specifications described in the manuals, this warranty is void.
2.
If you do not follow the WARNINGS and CAUTIONS in this manual, we cannot be
responsible for any malfunction or accident, even if the result is injury or death.
3.
We cannot foresee all possible dangers and consequences. Therefore, this manual cannot
warn the user of all possible hazards.
VB Guide 6.0 Rev.5 iii
TRADEMARKS
Microsoft, Windows, and Windows logo are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries. Other brand and
product names are trademarks or registered trademarks of the respective holders.
TRADEMARK NOTATION IN THIS MANUAL
Microsoft® Windows® XP Operating system
Microsoft® Windows® Vista Operating system
Microsoft® Windows® 7 Operating system
Throughout this manual, Windows XP, Windows Vista, and Windows 7 refer to above
respective operating systems. In some cases, Windows refers generically to Windows XP,
Windows Vista, and Windows 7.
NOTICE
No part of this manual may be copied or reproduced without authorization.
The contents of this manual are subject to change without notice.
Please notify us if you should find any errors in this manual or if you have any comments
regarding its contents.
INQUIRIES
Contact the following service center for robot repairs, inspections or adjustments.
If service center information is not indicated below, please contact the supplier office for
your region.
Please prepare the following items before you contact us.
- Your controller model and its serial number
- Your manipulator model and its serial number
- Software and its version in your robot system
- A description of the problem
SERVICE CENTER
iv VB Guide 6.0 Rev.5
MANUFACTURER
Toyoshina Plant
Factory Automation Systems Dept.
6925 Toyoshina Tazawa,
Azumino
-shi, Nagano, 399-8285
JAPAN
TEL
: +81-(0)263-72-1530
FAX
: +81-(0)263-72-1495
SUPPLIERS
North & South America
EPSON AMERICA, INC.
Factory Automation/Robotics
18300 Central Avenue
Carson, CA 90746
USA
TEL
: +1-562-290-5900
FAX
: +1-562-290-5999
E-MAIL
Europe
EPSON DEUTSCHLAND GmbH
Factory Automation Division
Otto
-Hahn-Str.4
D
-40670 Meerbusch
Germany
TEL
: +49-(0)-2159-538-1391
FAX
: +49-(0)-2159-538-3170
E-MAIL
: robot.infos@epson.de
China
EPSON China Co., Ltd
Fa
ctory Automation Division
7F, Jinbao Building No. 89 Jinbao Street
Dongcheng District, Beijing
China, 100005
TEL
: +86-(0)-10-8522-1199
FAX
: +86-(0)-10-8522-1120
Taiwan
EPSON Taiwan Technology & Trading Ltd.
Factory Automation Division
14F,
No.7, Song Ren Road, Taipei 110
Taiwan, ROC
TEL
: +886-(0)-2-8786-6688
FAX
: +886-(0)-2-8786-6677
VB Guide 6.0 Rev.5 v
Southeast Asia
Epson Singapore Pte Ltd.
India
Factory Automation System
1 HarbourFrontPlace, #03
-02
HarbourFront Tower one, Singapore
098633
TEL
: +65-(0)-6586-5696
FAX
: +65-(0)-6271-3182
Korea
EPSON Korea Co, Ltd.
Marketing Team
(Robot Business)
11F Milim Tower, 825
-22
Yeoksam
-dong, Gangnam-gu, Seoul, 135-934
Korea
TEL
: +82-(0)-2-3420-6692
FAX
: +82-(0)-2-558-4271
Japan
EPSON SALES JAPAN CORPORATION
Factory Automation Systems Department
Nishi
-Shinjuku Mitsui Bldg.6-24-1
Nishishinjuku
Shinjuku-kuTokyo160-8324
JAPAN
TEL
: +81-(0)3-5321-4161
vi VB Guide 6.0 Rev.5
VB Guide 6.0 Rev.5 vii
Table of Contents
1. Introduction 1
1.1 Features ..........................................................................................................1
2. Installation 2
2.1 Step by step instructions .................................................................................2
2.2 What's installed ...............................................................................................2
3. Getting Started 3
3.1 Getting started using Visual Basic ..................................................................3
3.2 Getting started using Visual C# ......................................................................4
3.3 Getting started using Visual C++ ....................................................................5
4. Environments 6
4.1 Design-Time Environment ..............................................................................6
4.1.1 Development Startup ..........................................................................6
4.1.2 Spel Class Instance Initialization ........................................................6
4.1.3 Spel Class Instance Termination ........................................................6
4.1.4 Development Cycle.............................................................................6
4.2 Production Environment ..................................................................................7
4.2.1 Opening EPSON RC+ at Runtime ...............................................................7
4.2.2 Using EPSON RC+ Dialogs and Windows ..................................................7
4.2.3 Installation on Target System .......................................................................7
5. Executing Programs 8
5.1 Executing SPEL
+
Programs ............................................................................8
5.2 Aborting all tasks .............................................................................................8
6. Events 9
6.1 Overview ..........................................................................................................9
6.2 System Events ................................................................................................9
6.3 User Events from SPEL
+
.................................................................................9
7. Error Handling 10
7.1 Errors for Spel methods ............................................................................... 10
Table of Contents
viii VB Guide 6.0 Rev.5
8. Handling Pause and Continue 11
8.1 Pause state ................................................................................................... 11
8.2 Catching the Pause event ............................................................................. 11
8.3 Executing Pause ........................................................................................... 11
8.4 Continue after pause ..................................................................................... 12
8.5 Abort after pause ........................................................................................... 12
9. Handling Emergency Stop 13
9.1 Using system EStop events .......................................................................... 13
10. EPSON RC+ Windows and Dialogs 14
10.1 Windows ...................................................................................................... 14
10.2 Dialogs ......................................................................................................... 14
11. Displaying Video 15
12. Using AsyncMode 16
13. SPELCom_Event 17
14. SpelNetLib60 Reference 18
14.1 Spel Class ................................................................................................... 18
14.2 Spel Class Properties ................................................................................. 18
14.3 Spel Class Methods .................................................................................... 42
14.4 Spel Class Events ..................................................................................... 239
14.5 SPELVideo Control ................................................................................... 242
14.6 SPELVideo Control Properties.................................................................. 242
14.7 SPELVideo Control Methods .................................................................... 245
14.8 SPELVideo Control Events ....................................................................... 246
14.9 SpelControllerInfo Class ........................................................................... 246
14.10 SpelException Class ............................................................................... 247
14.11 SpelPoint Class ....................................................................................... 248
14.12 Enumerations .......................................................................................... 251
14.13 Spel Error Numbers and Messages ....................................................... 255
15. Using With LabVIEW 256
15.1 Overview ................................................................................................... 256
15.2 Setting VI Execution Mode ....................................................................... 256
15.3 Initialization ............................................................................................... 257
Table of Contents
VB Guide 6.0 Rev.5 ix
15.4 Use Spel properties and methods............................................................ 258
15.5 Shutdown.................................................................................................. 258
15.6 Using Dialogs and Windows .................................................................... 258
16. Using With VS 2010 and .NET Framework 4.0 259
16.1 Overview ................................................................................................... 259
16.2 Change the .NET target framework to v3.5 ............................................. 259
16.3 Modify the application configuration ........................................................ 259
Table of Contents
x VB Guide 6.0 Rev.5
1. Introduction
VB Guide 6.0 Rev.5 1
1. Introduction
The EPSON RC+ VB Guide 6.0 Option enables you to use Microsoft Visual Basic or any other
language that supports .NET technology to run your robotic applications. This gives you the
power to create sophisticated user interfaces, use databases, and use third party products
designed for use with VB.
1.1 Features
The following features are supported in the VB Guide 6.0 package:
- SpelNetLib60.dll library.
- Several EPSON RC+ windows and dialogs can be used by your VB application, including:
- Robot Manager
- IO monitor
- Task manager
- Controller Tools dialog
During development, EPSON RC+ can be run along with Visual Basic. At production time,
EPSON RC+ can be run invisibly in the background.
The figure below shows the basic structure of a system using VB Guide 6.0.
VB Guide 6.0 Basic Structure
By default, EPSON RC+ is an in-process server for the SpelNetLib60 library. The first instance
of SpelNetLib60 Spel class loads an instance of EPSON RC+ into the user application. Other
instances of the Spel class use the same instance of EPSON RC+. You can also use EPSON
RC+ 6.0 as on out-of-process server. See the ServerOutOfProcess property.
RC620 Controller
.NET Application
using SpelNetLib
EPSON RC+
In Process Server
2. Installation
2 VB Guide 6.0 Rev.5
2. Installation
Please follow the instructions in this chapter to help ensure proper installation of the VB Guide
6.0 software.
Before starting, ensure that all Windows applications have been closed.
2.1 Step by step instructions
1. Install one of the Visual Studio 2008 Express versions, such as Visual Basic Express, or
install Visual Studio 2008 .NET.
VB Guide 6.0 supports Visual Studio 2005, 2008, and 2010.
2. Install EPSON RC+.
3. Ensure that the software key has been enabled for VB Guide 6.0 in the controller. Refer to
the EPSON RC+ Users Guide for information on how to enable options in the controller.
This completes the VB Guide 6.0 installation.
2.2 What's installed
The directories and files shown in the table below are installed on your PC during installation.
File Description
\EPSONRC60\VBGUIDE\VB\DEMOS
Visual Basic .NET demonstrations
\EPSONRC60\VBGUIDE\VCS\DEMOS
Visual C# .NET demonstrations
\EPSONRC60\VBGUIDE\VC\DEMOS
Visual C++ .NET demonstrations
\EPSONRC60\PROJECTS\VBGuideDemos
EPSON RC+ projects for demos
\EPSONRC60\EXE\SpelNetLib60.dll
SpelNetLib60 Class library
NOTE
3. Getting Started
VB Guide 6.0 Rev.5 3
3. Getting Started
This chapter contains information for getting started in the following development environments.
- Visual Basic .NET
- Visual C# .NET
- Visual C++ .NET
Demonstration programs are supplied with VB Guide 6.0. It is recommended that you go
through the demonstrations to get familiar with the product.
3.1 Getting started using Visual Basic
To use SpelNetLib60 in a VB.NET project, declare a Spel Class instance, as shown in the
example below. g_spel can now be used in your project.
1. In Visual Studio .NET, select File | Project.
2. Create a Visual Basic project.
3. From the Project menu, select Add Reference.
4. In the NET Components tab, browse to the \EpsonRC60\Exe directory and select the
SpelNetLib60.dll file.
5. From the Project menu, create a new module and add the following code.
Module Module1
Public WithEvents g_spel As SpelNetLib60.Spel
Public Sub InitApp()
g_spel = New SpelNetLib60.Spel
With g_spel
.Initialize
.Project = "c:\EpsonRC60\projects\vbnet\vbnet.sprj"
End With
End Sub
Public Sub EventReceived( _
ByVal sender As Object, _
ByVal e As SpelNetLib60.SpelEventArgs) _
Handles g_spel.EventReceived
MsgBox("received event " & e.Event)
End Sub
End Module
When your application exits, you need to execute Dispose for each Spel class instance. This
can be done in your main form's FormClosed event. If Dispose is not executed, the application
will not shutdown properly.
g_spel.Dispose()
NOTE
3. Getting Started
4 VB Guide 6.0 Rev.5
3.2 Getting started using Visual C#
1. In Visual Studio .NET, select File | Project.
2. Create a Visual C# project.
3. From the Project menu, select Add Reference.
4. Select the Browse tab and browse to the \EpsonRC60\Exe directory and select the
SpelNetLib60.dll file.
5. In the Form1 class, declare a Spel class variable as shown below.
private SpelNetLib60.Spel m_spel;
6. In the Form_Load event, add initialization code, as shown below.
private void Form1_Load(object sender, EventArgs e)
{
m_spel = New SpelNetLib60.Spel();
m_spel.Initialize();
m_spel.Project =
"c:\\EPSONRC60\\projects\\vcsnet\\vcsnet.sprj";
m_spel.EventReceived += new
SpelNetLib60.Spel.EventReceivedEventHandler(m_spel_EventRe
ceived);
7. Add the event handler, as shown below.
public void m_spel_EventReceived(object sender,
SpelNetLib60.SpelEventArgs e)
{
}
When your application exits, you need to execute Dispose for each Spel class instance. This
can be done in your main form's FormClosed event. If Dispose is not executed, the application
will not shutdown properly.
m_spel.Dispose();
NOTE
3. Getting Started
VB Guide 6.0 Rev.5 5
3.3 Getting started using Visual C++
1. In Visual Studio .NET, select File | Project.
2. Create a Visual C++ CLR Windows Forms Application project.
3. From the Project menu, select References
4. Click the Add New Reference button.
5. Select the Browse tab and browse to the \EpsonRC60\Exe directory and select the
SpelNetLib60.dll file.
6. In the Form1 class, declare a Spel variable as shown below.
private SpelNetLib60::Spel^ m_spel;
7. In the Form_Load event, add initialization code, as shown below.
private System::Void Form1_Load(
System::Object^ sender, System::EventArgs^ e)
{
m_spel = gcnew SpelNetLib60::Spel();
m_spel->Initialize();
m_spel->Project =
“c:\\EPSONRC60\\projects\\vcnet\\vcnet.sprj";
m_spel->EventReceived += gcnew
SpelNetLib60::Spel::EventReceivedEventHandler(
this, &Form1::m_spel_EventReceived);
}
8. Add the event handler, as shown below.
private System::Void m_spel_EventReceived(
System::Object^ sender, SpelNetLib60::SpelEventArgs^ e)
{
MessageBox::Show(e->Message);
}
When your application exits, you need to delete each Spel class instance if it was allocated on
the heap (using gcnew). This can be done in your main form's FormClosed event. If the Spel
class instances are not deleted, then the application will not shutdown properly.
delete m_spel;
NOTE
4. Environments
6 VB Guide 6.0 Rev.5
4. Environments
4.1 Design-Time Environment
4.1.1 Development Startup
Typically, you would perform these steps to start development:
1. Declare a Spel class variable in a module in your VB project.
2. Start EPSON RC+.
3. Open the desired EPSON RC+ project or create a new EPSON RC+ project.
4. Build the EPSON RC+ project.
5. Add initialization code in VB for the SPEL class instance.
6. Run and debug the VB project.
4.1.2 Spel Class Instance Initialization
After a new instance of the Spel class has been created, it needs to be initalized. When
initialization occurs, the underlying EPSON RC+ modules are loaded and initialized.
Initialization is implicit with the first method call or property access. You can explicity
initialize the class by calling the Initialize method.
m_spel.Initialize()
4.1.3 Spel Class Instance Termination
When your application exits, you need to execute Dispose for each Spel class instance. This
can be done in your main form's FormClosed event. If Dispose is not executed, the application
will not shutdown properly.
For VB anc C#, use the Dispose method:
m_spel.Dispose()
For VC++, if your Spel class instance was created on the heap (with gcnew), then use delete:
delete m_spel;
4.1.4 Development Cycle
Follow these basic steps to edit and run your VB code:
1. Stop the VB project.
2. Edit the VB project
3. Open EPSON RC+.
4. Make changes in the EPSON RC+ project.
5. Build the EPSON RC+ project.
6. Close RC+.
7. Switch to VB.
8. Run the VB project.
4. Environments
VB Guide 6.0 Rev.5 7
4.2 Production Environment
4.2.1 Opening EPSON RC+ at Runtime
Decide if you want to allow the EPSON RC+ environment to be opened from your application.
This is especially useful for debugging. Set the OperationMode property to Program to put
EPSON RC+ in Program Mode and open the EPSON RC+ GUI.
4.2.2 Using EPSON RC+ Dialogs and Windows
At runtime, you can open and hide certain EPSON RC+ windows from your VB application.
You can also run certain EPSON RC+ dialogs. See the chapter EPSON RC+ Windows and
Dialogs for details.
4.2.3 Installation on Target System
You should make an installation program for your VB project by using a Visual Studio setup
project. Then follow these steps to setup a target system for your VB application:
1. Install EPSON RC+.
2. Install your EPSON RC+ project.
3. Install your VB application.
5. Executing Programs
8 VB Guide 6.0 Rev.5
5. Executing Programs
5.1 Executing SPEL
+
Programs
You can run any of the 64 built-in main functions in the current controller project by using the
Start method of the Spel class. The table below shows the program numbers and their
corresponding function names in the SPEL+ project.
Program Number
SPEL+ Function Name
0
main
1
main1
2
main2
3
main3
63
main63
Here is an example that starts function "main":
Sub btnStart_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnStart.Click
m_spel.Start(0) ' Starts function main
btnStart.Enabled = False
btnStop.Enabled = True
End Sub
5.2 Aborting all tasks
If you are running tasks and want to abort all tasks at once, you can use the Stop method of the
Spel class.
For example:
Sub btnStop_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnStop.Click
m_spel.Stop()
btnStop.Enabled = False
btnStart.Enabled = True
End Sub
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272

Epson .NET Support User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI