Table of Contents
6.2 Program structure ........................................................................... 151
6.2.1 What is a SPEL+ program?................................................ 151
6.2.2 Calling functions ................................................................. 151
6.3 Commands and statements ............................................................ 152
6.4 Function and variable names .......................................................... 152
6.5 Data types....................................................................................... 153
6.6 Operators........................................................................................ 153
6.7 Working with variables .................................................................... 154
6.7.1 Variable scopes .................................................................. 154
6.7.2 Local variables ................................................................... 154
6.7.3 Module variables ................................................................ 154
6.7.4 Global variables.................................................................. 155
6.7.5 Global Preserve variables .................................................. 155
6.7.6 Arrays ................................................................................. 156
6.7.7 Initial values........................................................................ 156
6.7.8 Clearing variables............................................................... 156
6.8 Working with strings........................................................................ 157
6.9 Multi-statements.............................................................................. 158
6.10 Labels ............................................................................................. 158
6.11 Comments....................................................................................... 158
6.12 Error handling ................................................................................. 159
6.13 Multi-tasking.................................................................................... 161
6.14 Robot coordinate systems............................................................... 162
6.14.1 Overview ............................................................................ 162
6.14.2 Robot Coordinate System .................................................. 162
6.14.3 Local Coordinate Systems.................................................. 165
6.14.4 Tool Coordinate Systems.................................................... 165
6.14.5 ECP Coordinate Systems (Option) ..................................... 166
6.15 Robot arm orientations.................................................................... 167
6.15.1 SCARA robot arm orientations ........................................... 167
6.15.2 6-Axis robot arm orientations.............................................. 168
6.15.3 RS series arm orientations ................................................. 172
6.16 Robot motion commands ................................................................ 174
6.16.1 Homing the robot................................................................ 174
6.16.2 Point to point motion........................................................... 174
6.16.3 Linear motion...................................................................... 174
6.16.4 Curves ................................................................................ 174
6.16.5 Joint motion ........................................................................ 175
6.16.6 Controlling position accuracy.............................................. 175
6.16.7 CP Motion Speed / Acceleration and Tool Orientation ........ 175
6.16.8 PTP Speed / Acceleration for Small Distances ................... 176
6.17 Working with robot points................................................................ 177
6.17.1 Defining points.................................................................... 177
6.17.2 Referencing points by name............................................... 177
6.17.3 Referencing points with variables....................................... 177
6.17.4 Using points in a program................................................... 178
xii EPSON RC+ 5.0 (Ver.5.4) User's Guide Rev.5