Omron eV 3 Keyword Reference Manual

eV+3
Keyword Reference Manual
I652-E-03
Copyright Notice
The information contained herein is the property of Omron Robotics and Safety Technologies, Inc., and shall not be reproduced in whole or in part without prior written approval of Omron Robotics and Safety Technologies, Inc.. The information herein is subject to change without notice and should not be con­strued as a commitment by Omron Robotics and Safety Technologies, Inc. The documentation is peri­odically reviewed and revised.
Omron Robotics and Safety Technologies, Inc., assumes no responsibility for any errors or omissions in
the documentation.
Copyright  2020 Omron Robotics and Safety Technologies, Inc. by OMRON Corporation. All rights
reserved.
Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and
other countries for OMRON factory automation products.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany.
DeviceNet is a trademark of ODVA.
Other company names and product names in this document are the trademarks or registered trademarks
of their respective companies.
Created in the United States of America.
Table of Contents
Chapter 1: Introduction 13
1.1 Intended Audience
1.2 Related Manuals
1.3 Alert Levels
1.4 Special Information
1.5 Keyword Syntax
1.6 Keyword Parameters
Parameter Data Type Designations 16 Numeric Parameters 16
13
14
14
14
15
15
Chapter 2: Keyword QuickReference 19
2.1 Function Keyword Summary
2.2 Monitor Command Keyword Summary
2.3 Other Keyword Summary
2.4 Program Command Keyword Summary
2.5 System Parameter Keyword Summary
2.6 System Switch Keyword Summary
19
25
29
29
36
37
Chapter 3: Keyword Details 39
3.1 Function Keywords
ABS 39 ACCEL 40 ACOS 42 ALIGN 44 ASC 45 ASIN 46 ATAN2 48 BASE 50 BCD 51 BELT 52 BITS 54 BMASK 56 BSTATUS 57 CAS 59 $CHR 60 COM 61 CONFIG 62 COS 67 CUBRT 69 $DBLB 70 DBLB 71
39
22353-000 Rev. C eV+3KeywordReferenceManual 3
DCB 73 $DECODE 74 $DEFAULT 77 DEFINED 79 DEST 80 DEVICE 82 DISTANCE 84 DURATION 85 DX 87 DY 88 DZ 89 ENCLATCH 90 $ENCODE 91 $ERROR 94 ERROR 95 FALSE 100 $FLTB 101 FLTB 102 FRACT 104 FRAME 105 FREE 107 GETC 108 GET.EVENT 110 HERE 111 HOUR.METER 112 $ID 113 ID 114 IDENTICAL 124 INRANGE 125 $INTB 127 INT 128 INTB 130 INVERSE 132 IOSTAT 133 LAST 136 LATCH 138 LATCHED 139 LEN 141 $LNGB 142 LNGB 143 MAX 145 $MID 146 MIN 147 NETWORK 148 NORMAL 150 NOT 151 NULL 152 OFF 153 ON 154 OUTSIDE 155 PARAMETER 156 #PDEST 157
4 eV+3KeywordReferenceManual 22353-000 Rev. C
#PHERE 158 PI 159 #PLATCH 160 POS 161 #PPOINT 162 PRIORITY 164 RANDOM 165 RX 166 RY 167 RZ 168 SCALE 169 SELECT 170 #SET.POINT 172 SHIFT 173 SIG.INS 174 SIGN 176 SIG 177 SIN 179 SOLVE.FLAGS 181 SPEED 183 SQRT 185 SQR 186 STATE 187 STATUS 195 STRDIF 197 SWITCH 199 TAN 200 TAS 201 TASK 204 $TIME 207 $TIME4 209 TIME 211 TIMER 213 TOOL 216 TPS 217 TRANS 218 $TRANSB 220 TRANSB 221 TRUE 222 $TRUNCATE 223 $UNPACK 224 VAL 226 VLOCATION 227 VPARAMETER 230 VRESULT 232 VSTATE 234 WINDOW 235
3.2 Monitor Command Keywords
ABORT 238 BASE 240 BITS 242 CALIBRATE 244
238
22353-000 Rev. C eV+3KeywordReferenceManual 5
CD 247 COMMANDS 248 COPY 250 CYCLE.END 251 DEFAULT 253 DELETE 257 DELETEL 259 DELETEM 261 DELETEP 263 DELETER 265 DELETES 267 DIRECTORY 269 DISABLE 271 DO 273 ENABLE 275 ESTOP 277 EXECUTE 278 FCOPY 282 FDELETE 284 FDIRECTORY 286 FLIST 291 FREE 292 FRENAME 293 FSET 294 HERE 295 ID 297 IO 300 JOG 302 KILL 306 LIST 307 LISTL 309 LISTP 311 LISTR 312 LISTS 314 LOAD 316 MDIRECTORY 319 MODULE 321 NET 323 PANIC 326 PARAMETER 327 PING 329 PRIME 330 PROCEED 332 RENAME 334 RESET 335 RESET.LOCK 336 RETRY 337 SELECT 339 SIGNAL 341 SPEED 343 SRV.RESET 345 SSTEP 346
6 eV+3KeywordReferenceManual 22353-000 Rev. C
STACK 348 STATUS 350 STORE 354 STOREL 356 STOREM 358 STOREP 360 STORER 362 STORES 364 SWITCH 366 TESTP 368 TOOL 369 WAIT.START 371 WHERE 373 XSTEP 374 ZERO 377
3.3 Other Keywords
.END 379 IPS 380 MMPS 381
3.4 Program Command Keywords
ABORT 382 ABOVE 384 ACCEL 386 ALIGN 389 ALTER 390 ALTOFF 392 ALTON 393 ANY 395 APPRO 396 APPROS 397 ATTACH 398 AUTO 402 BASE 405 BELOW 407 BITS 409 BRAKE 411 BREAK 412 BY 414 CALIBRATE 415 CALL 419 CALLS 422 CASE 424 CLEAR.EVENT 427 CLEAR.LATCHES 428 COARSE 429 CPOFF 431 CPON 433 CYCLE.END 435 DECOMPOSE 437 DEF.DIO 439 DEFBELT 441
379
382
22353-000 Rev. C eV+3KeywordReferenceManual 7
DEPART 443 DEPARTS 445 DETACH 447 DISABLE 449 DO 451 DOS 453 DRIVE 455 DURATION 457 ELSE 459 ENABLE 460 END 462 ESTOP 464 EXECUTE 465 EXIT 469 EXTERNAL 470 FCLOSE 472 FCMND 473 FCOPY 477 FDELETE 479 FEMPTY 481 FINE 483 FLIP 485 FOPEN 488 FOPENA 491 FOPEND 494 FOPENR 497 FOPENW 500 FOR 503 FSEEK 505 FSET 507 GLOBAL 509 GOTO 511 HALT 512 HERE 513 IF ... GOTO 515 IF ... THEN 517 IGNORE 519 JMOVE 520 JOG 521 KEYMODE 525 KILL 527 LEFTY 528 LOCAL 530 LOCK 532 MC 534 MCS 536 MULTIPLE 538 MOVE 539 MOVEC 540 MOVES 547 NEXT 548 NOFLIP 549
8 eV+3KeywordReferenceManual 22353-000 Rev. C
NONULL 550 NOOVERLAP 552 NULL 554 OVERLAP 556 PACK 558 PANIC 560 PARAMETER 561 PAUSE 563 PDNT.CLEAR 564 PDNT.NOTIFY 565 PDNT.WRITE 566 PENDANT 568 PROCEED 571 .PROGRAM 573 PROMPT 576 REACT 578 REACTE 581 REACTI 583 READ 585 READY 589 RELEASE 591 RESET 592 RETRY 593 RETURN 595 RETURNE 596 RIGHTY 597 RUNSIG 599 SELECT 601 SET.EVENT 603 SET 604 SETBELT 606 SETDEVICE 608 SIGNAL 610 SINGLE 612 SOLVE.ANGLES 613 SOLVE.TRANS 620 SPEED 622 STOP 625 SWITCH 626 TIMER 628 TOOL 629 TYPE 630 UNTIL 633 VALUE 634 VPARAMETER 635 VRUN 637 VWAITI 638 WAIT 639 WAIT.EVENT 640 WHILE 643 WINDOW 645 WRITE 647
22353-000 Rev. C eV+3KeywordReferenceManual 9
3.5 System Parameter Keywords
BELT.MODE 650 DEVIATION 653 JOG.TIME 654 NOT.CALIBRATED 655 VTIMEOUT 657
3.6 SystemSwitch Keywords
AUTO.POWER.OFF 658 CP 660 DECEL.100 661 DELAY.IN.TOL 662 DRY.RUN 664 MESSAGES 666 OBSTACLE 667 POWER 669 ROBOT 671 SCALE.ACCEL 673 SCALE.ACCEL.ROT 675 UPPER 676
650
658
10 eV+3KeywordReferenceManual 22353-000 Rev. C
Revision History
Revision
Code
A July, 2020 Original release
B August, 2020 Minor corrections and updates
C October, 2020 Updates for Viper robots and minor corrections
ReleaseDate Details
22353-000 Rev. C eV+3KeywordReferenceManual 11

Chapter 1: Introduction

eV+ uses a special programming language and command set to send and request information to and from the operating system. The keywords detailed in this manual are used when cre­ating programs with Sysmac Studio and issuing commands from the Monitor Window in the Sysmac Studio interface.
Additional Information: More information about keyword syntax, parameters, and data types can be found in theeV+3 User'sManual (Cat.No. I651).
IMPORTANT: An error "Command not supported"will be returned if a keyword is issued on a system that does not include the NJ-series Robot Integ­rated CPUUnit as the Host System.
There are 6 different types of keywords that are used based on the functionality that is needed as described below.
Table 1-1. eV+ Keyword Types
Keyword Type Usage
Functionkeywords Used to return values from the eV+ Operating System.
Monitor command keywords
Program command keywords
System parameter keyword
System switch keywords
Other keywords Used to specify units when using the SPEEDprogram command

1.1 Intended Audience

This manual is intended for the following personnel, who must also have knowledge of com­mon programming practices and robotic control methods.
l Personnel in charge of introducing FA systems. l Personnel in charge of designing FA systems. l Personnel in charge of installing and maintaining FA systems. l Personnel in charge of managing FA systems and facilities.
Used to issue individual operations in the Monitor Window or to cre­ate Monitor Commandprograms.
Used to command operations in V+ Programs.
Used to manipulate systemparameters in V+ Programs or with the Monitor Window.
Used to manipulate system switches in V+ Programs or with theMonitor Window.
keyword.
Refer to the eV+3 User'sManual (Cat.No. I651) for more inform- ation.
22353-000 Rev. C eV+3KeywordReferenceManual 13
1.2 Related Manuals
!
!
!

1.2 Related Manuals

Use the following related manuals for reference.
Manual Description
eV+3 User'sManual (Cat.No. I651) Provides information that is necessary to use
Table 1-2. Related Manuals
eV+.
Sysmac Studio Robot Integrated System Build­ing Function with Robot Integrated CPU Unit Operation Manual (Cat. No. W595)
Robot User Guides User Guide for the robot in use.
T20 Pendant User's Manual (Cat. No. I601) Describes the use of the optional T20 manual
NJ-series Robot Integrated CPUUnit User'sManual (Cat. No. O037)
Robot Safety Guide (Cat. No. I590) Contains safety information forOMRON indus-

1.3 Alert Levels

The following alert levels are used throughout this document.
Learning about the operating procedures and functions of the Sysmac Studio to configure Robot Integrated System using Robot Integ­rated CPU Unit.
control pendant.
Describes the settings and operation of the CPU Unit and programming concepts for OMRON robot control.
trial robots.
DANGER: Identifies an imminently hazardous situation which, if not avoided, is likely to result in serious injury, and might result in death or severe property damage.
WARNING: Identifies a potentially hazardous situation which, if not avoided, will result in minor or moderate injury, and might result in serious injury, death, or significant property damage.
CAUTION: Identifies a potentially hazardous situation which, if not avoided, might result in minor injury, moderate injury, or property damage.

1.4 Special Information

The following notation is used throughout this document to indicate special information.
IMPORTANT: Information to ensure safe use of the product.
14 eV+3KeywordReferenceManual 22353-000 Rev. C
NOTE: Information for more effective use of the product.
Additional Information: Helpful tips, recommendations, and best practices.

1.5 Keyword Syntax

Use the following guidelines with the keyword syntax provided in this manual.
l Keywords are presented with uppercase text and parameters are presented with lower-
case text.
l Any parentheses, brackets, and commas must be used exactly as shown. l Bold text represents required syntax and non-bold text represents optional syntax. l Commas must be present between consecutive parameters. l Blank spaces are not evaluated by the system and extra spaces or missing spaces do not
cause syntax problems.
Use the following example to understand how keyword syntax is presented in this manual.
KEYWORD req_param1 = req_param2 SECONDARY.KEYWORD opt_param1, opt_param2
Chapter 1: Introduction
Item Details
KEYWORD Required and must be entered exactly as shown.
req_param1 Required and must be replaced with a value, variable, or expres-
= Assignment operator. If required, follows the keyword and / or
req_param2 Required when an equal sign is present and must be replaced with
SECONDARY.KEYWORD If present, required and must be entered exactly as shown.
opt_param1, opt_param2 Optional and if used, must be replaced with a value, variable, or

1.6 Keyword Parameters

This section describes parameters and how they are used withkeyword syntax.
NOTE: Do not confuse keyword parameters with system parameter keywords. Refer to System Parameter Keywords on page 650 for more information.
Table 1-3. Keyword Syntax Details
sion.
parameters.
a value, variable, or expression.
expression.
Parameters are considered arguments to keywords. Keywords may have multiple required and optional parameters. Some keywords do not use any parameters such as BREAK or FALSE .
22353-000 Rev. C eV+3KeywordReferenceManual 15
1.6 Keyword Parameters
When an optional parameter is omitted, the system will assume a default. Omitting an optional parameter that is in the middle of the keyword's syntax must respect the use of any necessary commas, as shown below.
CALL program_name(1, , n+3)
If an the optional parameter is trailing, it can be removed if unused. Consider the CALL keyword shown with the syntax structure CALL program(arg_list). If this keyword is used to simply execute a new subroutine program without passing arguments, the syntax would be as follows.
CALL program_name

Parameter Data Type Designations

The data type of the constant or variable must be the same type that is required by the keyword. String and numeric parameters can be constant values or any valid variable names. Use the following rules to designate parameter data types used in keyword syntax.
l String variables must be preceded with the $symbol and string constants must be
enclosed in quotes.
l Precision Point variables must be preceded with a # symbol. l Belt variables must be preceded with a % symbol. l Real and integer constants can be used without modification.
Additional Information: Keywords cannot be used as variable names or pro­gram names.

Numeric Parameters

Several types of numeric parameters can appear in keyword syntax. For each type of para­meter, the value can generally be specified by a numeric constant, a variable name, or a math­ematical expression. There are some restrictions on the numeric values that are accepted by eV+. The following rules determine how a value will be interpreted in the various situations.
l Distances are used to define locations to where a robot is to move. The unit of measure
for distances is in millimeters, although units are never explicitly entered for any value. Values entered for distances can be positive or negative. Refer to theIPS keyword for a special case of specifying robot speed in inches/s.
l Joint numbers are integers from 1 up to the number of joints in the robot. Refer to the
robot User's Guide for information about robot joint numbering arrangements.
l Signal numbers are used to identify digital signals. They are always considered as
integer values. A negative signal number indicates an OFF state. Refer to the appro­priate robot user's guide and the eV+3 User'sManual (Cat.No. I651) for more information about signal numbers for your particular robot.
l Integer parameters can be satisfied with real values (values with integer and fractional
parts). When an integer is required, the value is rounded and the resulting integer is used.
l Parameters indicated as being scalar variables can be satisfied with a real value (with
integer and fractional parts) except where noted. Scalar variables can range from -
16 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 1: Introduction
9.22*1018to 9.22*1018in value (displayed as -9.22E18 and 9.22E18). Numbers declared to be double-precision values can range from -1.8*10
-307
to 1.8*10
-307
.
All numbers in this manual are decimal unless otherwise noted. Binary numbers are shown as ^B, octal numbers as ^, and hexadecimal numbers as ^H.
22353-000 Rev. C eV+3KeywordReferenceManual 17
Chapter 2: Keyword QuickReference
Use the sections below as a quick reference to all keywords described in this document.

2.1 Function Keyword Summary

The table below provides a summary of all function keywords.
Keyword Description Reference
ABS Real-valued function that returns the absolute value (mag-
nitude) of the argument provided.
ACCEL Real-valued function that returns the current setting for robot
acceleration, deceleration, or the maximum allowable per­centage limits defined in the robot configuration profile.
ACOS Real-valued function that returns the arc cosine of its argu-
ment.
ALIGN Transformation function that aligns the input location with the
nearest axis of the world coordinate system.
ASC Real-valued function that returns an ASCII character value
from within a string.
ASIN Real-valued function that returns the arc sine of its argument. Page 46
ATAN2 Real-valued function that returns the size of the angle in
degrees that has its trigonometric tangent equal to value_ 1/value_2.
BASE Transformation function that returns the transformation value
that represents the translation and rotation set by the last BASE program command or monitor command.
BCD Real-valued function that converts a real value to Binary Coded
Decimal (BCD) format.
Page 39
Page 40
Page 42
Page 44
Page 45
Page 48
Page 50
Page 51
BELT Real-valued function that returns information about a con-
veyor belt being tracked with the conveyor tracking feature.
BITS Real-valued function that reads multiple digital signals and
returns the value corresponding to the binary bit pattern.
BMASK Real-valued function that creates a bit mask by setting indi-
vidual bits.
BSTATUS Real-valued function that returns information about the status
of the conveyor tracking system.
CAS Real-valued function that compares a real variable to a test
value and conditionally sets a new value as one indivisible oper­ation.
Page 52
Page 54
Page 56
Page 57
Page 59
22353-000 Rev. C eV+3KeywordReferenceManual 19
2.1 Function Keyword Summary
Keyword Description Reference
$CHR String function that returns a one-character string cor-
responding to a given ASCII value.
COM Perform the binary complement operation on a value. Page 61
CONFIG Real-valued function that returns a value providing information
about the robot's geometric configuration or the status of the motion servo control features.
COS Real-valued function that returns the trigonometric cosine of a
given angle.
CUBRT Real-valued function that returns the cube root of a value. Page 69
$DBLB String function that returns an 8-byte string containing the bin-
ary representation of a real value in double-precision IEEE 754 floating-point format.
DBLB Real-valued function that returns the value of eight bytes of a
string interpreted as an IEEE double-precision floating-point number.
DCB Real-valued function that converts BCD digits into an equi-
valent integer value.
$DECODE String function that extracts part of a string as delimited by
given break characters.
Page 60
Page 62
Page 67
Page 70
Page 71
Page 73
Page 74
$DEFAULT String function that returns a string containing the current or
initial system default device, unit, and directory path for disk file access.
DEFINED Real-valued function that determines if a variable has been
defined.
DEST Transformation function that returns a transformation value
representing the planned destination location for the current robot motion.
DEVICE Real-valued function that returns a real value from a specified
device. The value may be data or status information, depending upon the device and the parameters.
DISTANCE Real-valued function that determines the distance between the
points defined by two location values.
DURATION Real-valued function that returns the current setting for one of
the motion DURATION specifications.
DX Real-valued function that returns the X-axis component of a
given transformation value.
DY Real-valued function that returns the Y-axis component of a
given transformation value.
DZ Real-valued function that returns the Z-axis component of a
given transformation value.
Page 77
Page 79
Page 80
Page 82
Page 84
Page 85
Page 87
Page 88
Page 89
20 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
ENCLATCH Real-valued function that returns the encoder position for any
encoder in the system at the occurrence of the last latch.
$ENCODE String function that returns a string created from output spe-
cifications.
$ERROR String function that returns the error message associated with
the given error code.
ERROR Real-valued function that returns the message number of a
recent system message that caused program execution to stop or caused a REACTE operation.
FALSE Real-valued function that returns the value used by eV+ to rep-
resent a logical false result.
$FLTB String function that returns a 4-byte string containing the bin-
ary representation of a real value in single-precision IEEE float­ing-point format.
FLTB Real-valued function that returns the value of four bytes of a
string interpreted as an IEEE single-precision floating-point number.
FRACT Real-valued function that returns the fractional part of the argu-
ment.
FRAME Transformation function that returns a transformation value
defined by four positions.
Page 90
Page 91
Page 94
Page 95
Page 100
Page 101
Page 102
Page 104
Page 105
FREE Real-valued function that returns the amount of unused free
memory of storage space.
GETC Real-valued function that returns the next character (byte)
from a device or input record on the specified logical unit.
GET.EVENT Real-valued function that return events that are set for the spe-
cified task.
HERE Transformation function that returns a transformation value
that represents the current location of the robot tool point.
HOUR.METER Real-valued function that returns the current value of the
robot hour meter.
$ID String function that returns the system ID string. Page 113
ID Real-valued function that returns values that identify the con-
figuration of the current system.
IDENTICAL Real-valued function that determines whether two location val-
ues are exactly the same.
INRANGE Real-valued function that returns a value that indicates if a spe-
cific location can be reached by the robot and provides addi­tional information when a location cannot be reached.
$INTB String function that returns a 2-byte string containing the bin- Page 127
Page 107
Page 108
Page 110
Page 111
Page 112
Page 114
Page 124
Page 125
22353-000 Rev. C eV+3KeywordReferenceManual 21
2.1 Function Keyword Summary
Keyword Description Reference
ary representation of a 16-bit integer.
INT Real-valued function that returns the integer part of the value. Page 128
INTB Real-valued function that returns the value of two bytes of a
string interpreted as a signed 16-bit binary integer.
INVERSE Transformation function that returns the transformation value
that is the mathematical inverse of the given transformation value.
IOSTAT Real-valued function that returns status information for the
last input / output operation for a device associated with a logical unit.
LAST Real-valued function that returns the highest index used for an
array (dimension).
LATCH Transformation function that returns a transformation value
representing the location of the robot at the occurrence of the last external trigger.
LATCHED Real-valued function that returns the status of the position
latch and which input triggered it.
LEN Real-valued function that returns the number of characters in
the given string.
$LNGB String function that returns a 4-byte string containing the bin-
ary representation of a 32-bit integer.
LNGB Real-valued function that returns the value of four bytes of a
string interpreted as a signed 32-bit binary integer.
Page 130
Page 132
Page 133
Page 136
Page 138
Page 139
Page 141
Page 142
Page 143
MAX Real-valued function that returns the maximum value con-
tained in the list of values.
$MID String function that returns a substring of the specified string. Page 146
MIN Real-valued function that returns the minimum value con-
tained in the list of values.
NETWORK Real-valued function that returns network status and
IPaddress information of the robot controller.
NORMAL Transformation function that corrects a transformation for any
mathematical round-off errors.
NOT Operator that performs logical negation of a value. Page 151
NULL Transformation function that returns a null transformation
value (one with all zero components).
OFF Real-valued function that returns the value used by eV+ to rep-
resent a logical false result.
ON Real-valued function that returns the value used by eV+ to rep-
resent a logical true result.
Page 145
Page 147
Page 148
Page 150
Page 152
Page 153
Page 154
22 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
OUTSIDE Real-valued function that tests a value to determine if it is out-
side a specified range.
PARAMETER Real-valued function that returns the current setting of the
named system parameter.
#PDEST Precision-point function that returns a precision-point value rep-
resenting the planned destination location for the current robot motion.
#PHERE Precision-point function that returns a precision-point value rep-
resenting the current location of the currently selected robot.
PI Real-valued function that returns the value of the math-
ematical constant pi (3.141593).
#PLATCH Precision-point function that returns a precision-point value rep-
resenting the location of the robot at the occurrence of the last external trigger.
POS Real-valued function that returns the starting character pos-
ition of a substring in a string.
#PPOINT Precision- point function that returns a precision-point value
composed from the given components.
PRIORITY Real-valued function that returns the current reaction lock-out
priority for the program.
Page 155
Page 156
Page 157
Page 158
Page 159
Page 160
Page 161
Page 162
Page 164
RANDOM Real-valued function that returns a pseudo-random number. Page 165
RX Transformation function that returns a transformation describ-
ing a rotation about the X-axis.
RY Transformation function that returns a transformation describ-
ing a rotation about the Y-axis.
RZ Transformation function that returns a transformation describ-
ing a rotation about the Z-axis.
SCALE Transformation function that returns a transformation value
equal to the transformation parameter with the position scaled by the scale factor.
SELECT Real-valued function that returns information about the device
specified for the currently selected task. .
#SET.POINT Precision point function that returns the commanded joint-
angle positions computed by the trajectory generator during the last trajectory-evaluation cycle.
SHIFT Transformation function that returns a transformation value
resulting from shifting the position of the transformation para­meter by the given shift amounts.
SIG.INS Real-valued function that returns an indication of whether a
digital I/O signal is installed in the system or whether a soft­ware signal is available in the system.
Page 166
Page 167
Page 168
Page 169
Page 170
Page 172
Page 173
Page 174
22353-000 Rev. C eV+3KeywordReferenceManual 23
2.1 Function Keyword Summary
Keyword Description Reference
SIGN Real-valued function that returns the value 1, with the sign of
the value parameter.
SIG Real-valued function that returns the logical AND of the states
of the indicated digital signals.
SIN Real-valued function that returns the trigonometric sine of a
given angle.
SOLVE.FLAGS Real-valued function that returns bit flags representing the
robot configuration specified by an array of joint positions.
SPEED Real-valued function that returns one of the system motion
speed factors.
SQRT Real-valued function that returns the square root of the para-
meter.
SQR Real-valued function that returns the square of the parameter. Page 186
STATE Real-valued function that returns a value to provide inform-
ation about the robot system state.
STATUS Real-valued function that returns status information for an
application program.
STRDIF Real-valued function that compares two strings byte-by-byte
for the purpose of sorting.
Page 176
Page 177
Page 179
Page 181
Page 183
Page 185
Page 187
Page 195
Page 197
SWITCH Real-valued function that returns information about the set-
ting of a system switch.
TAN Real-valued function that returns the trigonometric tangent of
a given angle.
TAS Real-valued function that returns the current value of a real-
valued variable and assigns it a new value. The two actions are done indivisibly so that no other program task can modify the variable at the same time.
TASK Real-valued function that returns information about a program
execution task.
$TIME String function that returns a string value containing either the
current system date and time or the specified date and time.
$TIME4 String function that returns a string value containing either the
current system four-digit date and time or the specified four­digit date and time.
TIME Real-valued function that returns an integer value rep-
resenting either the date or the time specified in the given string parameter.
TIMER Real-valued function that returns the current time value of the
specified system timer.
Page 199
Page 200
Page 201
Page 204
Page 207
Page 209
Page 211
Page 213
TOOL Transformation function that returns the value of the trans- Page 216
24 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
formation specified in the last TOOL operation.
TPS Real-valued function that returns the number of ticks of the
system clock that occur per second (Ticks Per Second).
TRANS Transformation function that returns a transformation value
computed from the given X, Y, Z position displacements and y, p, r orientation rotations.
$TRANSB String function that returns a 48-byte string containing the bin-
ary representation of a transformation value.
TRANSB Transformation function that returns a transformation value
represented by a 48-byte or 96-byte string.
TRUE Real-valued function that returns the value used by eV+ to rep-
resent a logical true result.
$TRUNCATE String function that returns all characters in the input string
until an ASCII NUL (or the end of the string) is encountered.
$UNPACK String function that returns a substring from an array of 128-
character string variables.
VAL Real-valued function that returns the real value represented by
the characters in the input string.
VLOCATION Transformation function that returns a cartesian trans-
formation result of the execution of the specified vision sequence. The returned value is a transform result as x, y, z, yaw, pitch, and roll.
Page 217
Page 218
Page 220
Page 221
Page 222
Page 223
Page 224
Page 226
Page 227
VPARAMETER Transformation function that returns the current value of a vis-
ion tool parameter.
VRESULT Real-valued function that returns a specified result of a vision
tool, or returns the status of a specified tool.
VSTATE Real-valued function that returns the state of the execution of
a sequence.
WINDOW Real-valued function that returns a value to indicate where the
location described by the belt-relative transformation value is relative to the predefined boundaries of the working range on a moving conveyor belt.

2.2 Monitor Command Keyword Summary

The table below provides a summary of all monitor command keywords.
Keyword Description Reference
ABORT Monitor command that terminates execution of an execut-
able program.
BASE Monitor command that translates and rotates the world ref- Page 240
Page 230
Page 232
Page 234
Page 235
Page 238
22353-000 Rev. C eV+3KeywordReferenceManual 25
2.2 Monitor Command Keyword Summary
Keyword Description Reference
erence frame relative to the robot.
CALIBRATE Monitor command that initializes the robot positioning sys-
tem.
CD Monitor command that displays or changes the default path
for disk access.
COMMANDS Monitor command that initiates processing of a Monitor
Commandprogram.
COPY Monitor command that creates a new program as a copy of
an existing program.
CYCLE.END Monitor command that terminates the specified executable
program the next time it executes a STOP operation or its equivalent. It will suspend processing of a command pro­gram until a program completes execution.
DEFAULT Monitor command that defines the default relationship
between the eV+ disk logical device and the physical device to be accessed. This also displays the current default.
DELETE Monitor command that deletes the specified programs from
the system memory.
DELETEL Monitor command that deletes the named location vari-
ables from the system memory.
DELETEM Monitor command that deletes the named program module
from the system memory.
Page 244
Page 247
Page 248
Page 250
Page 251
Page 253
Page 257
Page 259
Page 261
DELETEP Monitor command that deletes the named programs from
the system memory.
DELETER Monitor command that deletes the named real-valued vari-
ables from the system memory.
DELETES Monitor command that deletes the named string variables
from the system memory.
DIRECTORY Monitor command that displays the names of some or all of
the programs in the system memory.
DISABLE Monitor command that turns OFF one or more system
switches.
DO Monitor command that executes a keyword(s) as though it
were the next step in an executable program or the next step in the specified task / program context.
ENABLE Monitor command that turns ON one or more system
switches.
ESTOP Monitor command that stops the robot in the same manner
as if an emergency stop signal was received.
EXECUTE Monitor command that begins execution of a control pro- Page 278
Page 263
Page 265
Page 267
Page 269
Page 271
Page 273
Page 275
Page 277
26 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
gram.
FCOPY Monitor command that copies the information in an existing
disk file to a new disk file.
FDELETE Monitor command that deletes one or more disk files match-
ing the given file specification.
FDIRECTORY Monitor command that displays information about the files
on a disk and the amount of space remaining for storage as well as creates and delete subdirectories on disks.
FLIST Monitor command that lists the contents of the specified
disk file on the Monitor Window.
FREE Monitor command that displays the percentage of available
system memory not currently in use.
FRENAME Monitor command that changes the name of a disk file. Page 293
FSET Monitor command that sets or modifies attributes of a net-
work device.
HERE Monitor command that defines the value of a trans-
formation or precision-point variable to be equal to the cur­rent robot location.
ID Monitor command that displays identity information about
components of the system.
Page 282
Page 284
Page 286
Page 291
Page 292
Page 294
Page 295
Page 297
IO Monitor command that displays the current states of
external digital input / output signals or internal software signals.
JOG Monitor command that moves the specified joint of the
robot, or moves the robot tool along the specified Cartesian axis. Each time JOG is executed, the robot moves for up to 300 ms.
KILL Monitor command that clears a program execution stack
and detaches any I/O devices that are attached.
LIST Monitor command that displays the value of the expression. Page 307
LISTL Monitor command that displays the values of the listed loc-
ations.
LISTP Monitor command that displays all the steps of the listed
user programs.
LISTR Monitor command that displays the values of the real
expressions specified.
LISTS Monitor command that displays the values of the specified
strings.
LOAD Monitor command that loads the contents of the specified
disk file into the system memory.
Page 300
Page 302
Page 306
Page 309
Page 311
Page 312
Page 314
Page 316
22353-000 Rev. C eV+3KeywordReferenceManual 27
2.2 Monitor Command Keyword Summary
Keyword Description Reference
MDIRECTORY Monitor command that displays the names of all the pro-
gram modules in the system memory or the names of the programs in a specified program module.
MODULE Monitor command that creates a new program module, or
modifies the contents of an existing module.
NET Monitor command that displays status information about
the network. Also displays details about the remote mounts that are currently defined in the eV+ system.
PANIC Monitor command that simulates an external E-stop button
press, stops all robots immediately but does not turn OFFrobot high power.
PARAMETER Monitor command that sets or displays the values of
systemparameters.
PING Monitor command that tests the network connection to a
node.
PRIME Monitor command that prepares a program for execution
but does not start execution.
PROCEED Monitor command that resumes execution of an application
program.
RENAME Monitor command that changes the name of a user pro-
gram in memory to the new name provided.
Page 319
Page 321
Page 323
Page 326
Page 327
Page 329
Page 330
Page 332
Page 334
RESET Monitor command that will turn OFFall the digital output
signals.
RESET.LOCK Monitor command that detaches a robot from the applic-
ation program.
RETRY Monitor command that repeats execution of the last inter-
rupted statement and continues execution of the program.
SELECT Monitor command that selects a robot for subsequent Mon-
itor Window operations
SIGNAL Monitor command that turns ON or OFF digital output sig-
nals, internal software signals, or host signals.
SPEED Monitor command that specifies monitor speed. Page 343
SRV.RESET Monitor command that restarts and resets eV+. Page 345
SSTEP Monitor command that executes a single step or an entire
subroutine of a control program.
STACK Monitor command that specifies the amount of system
memory reserved for a program task to use for subroutine calls and automatic variables.
STATUS Monitor command that returns status information for the
system and the programs being executed.
Page 335
Page 336
Page 337
Page 339
Page 341
Page 346
Page 348
Page 350
28 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
STORE Monitor command that stores programs and variables in a
disk file.
STOREL Monitor command that stores location variables in a disk
file.
STOREM Monitor command that stores a specified program module
to a disk file.
STOREP Monitor command that stores program files to a disk file. Page 360
STORER Monitor command that stores real variables in a disk file. Page 362
STORES Monitor command that stores a string variable in a disk file. Page 364
SWITCH Monitor command that displays the settings of system
switches in theMonitor Window.
TESTP Monitor command that tests for the presence of the named
program in the system memory.
TOOL Monitor command that sets the internal transformation
used to represent the location and orientation of the tool tip relative to the tool-mounting flange of the robot.
WAIT.START Monitor command that puts a Monitor Commandprogram
into a wait state until a condition is satisfied.
Page 354
Page 356
Page 358
Page 366
Page 368
Page 369
Page 371
WHERE Monitor command that displays the current location of the
robot and the hand opening.
XSTEP Monitor command that executes a single step of a program. Page 374
ZERO Monitor command that initializes the eV+ system and
deletes all the programs and data in system memory.

2.3 Other Keyword Summary

The table below provides a summary of all keywords not categorized as function, monitor com­mand, program command, system parameter, or system switch keywords.
Keyword Description Reference
.END Keyword that marks the end of an eV+ program. Page 379
IPS Specify the units for a SPEED program command as inches
per second.
MMPS Specify the units for a SPEED program command as mil-
limeters per second.

2.4 Program Command Keyword Summary

Page 373
Page 377
Page 380
Page 381
The table below provides a summary of all program command keywords.
22353-000 Rev. C eV+3KeywordReferenceManual 29
2.4 Program Command Keyword Summary
Keyword Description Reference
ABORT Terminate execution of an executing program task. Page 382
ABOVE Request a change in the robot configuration during the
next motion so that the elbow is above the line from the shoulder to the wrist.
ACCEL Set acceleration and deceleration for robot motions and
optionally specify a defined acceleration profile.
ALIGN Align the robot tool Z-axis with the nearest world axis. Page 389
ALTER Specify the magnitude of the real-time path modification
that is to be applied to the robot path during the next tra­jectory computation.
ALTOFF Terminate real-time path-modification mode (alter mode). Page 392
ALTON Enable real-time path-modification mode (alter mode) and
specify the way in which alter coordinate information will be interpreted.
ANY Signal the beginning of an alternative group of commands
for the CASE structure.
APPRO Start a robot motion toward a location defined relative to
specified location with joint-interpolated motion.
APPROS Start a robot motion toward a location defined relative to
specified location with straight-line motion.
Page 384
Page 386
Page 390
Page 393
Page 395
Page 396
Page 397
ATTACH Make a device available for use by the application program. Page 398
AUTO Declare temporary variables that are automatically created
on the program stack when the program is entered.
BASE Translate and rotate the world reference frame relative to
the robot.
BELOW Request a change in the robot configuration during the
next motion so that the elbow is below the line from the shoulder to the wrist.
BITS Set or clear a group of digital signals based on a value. Page 409
BRAKE Abort the current robot motion. Page 411
BREAK Suspend program execution until the current motion com-
pletes.
BY Completes the syntax of theSCALE andSHIFT functions. Page 414
CALIBRATE Initialize the robot positioning system with the robot's cur-
rent position.
CALL Suspend execution of the current program and continue
execution with a new subroutine program.
CALLS Suspend execution of the current program and continue
execution with a new subroutine program specified with a
Page 402
Page 405
Page 407
Page 412
Page 415
Page 419
Page 422
30 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
string value.
CASE Initiate processing of a CASE structure by defining the
value of interest.
CLEAR.EVENT Clear an event associated with the specified task. Page 427
CLEAR.LATCHES Empties the latch buffer for the selected device. Page 428
COARSE Enable a low-precision nulling tolerance for the robot. Page 429
CPOFF Instruct the eV+ system to stop the robot at the com-
pletion of the next motion operation (or all subsequent motion operations) and null position errors.
CPON Instruct the eV+ system to execute the next motion oper-
ations (or all subsequent motion operations) as part of a continuous path.
CYCLE.END Terminate the executing program in the specified task the
next time it executes a STOP program command (or its equivalent).
DECOMPOSE Extract the real values of individual components of a loc-
ation value.
DEF.DIO Assign virtual digital I/O to standard eV+ signal numbers
for use by keywords.
DEFBELT Define a belt variable for use with a conveyor tracking
robot.
Page 424
Page 431
Page 433
Page 435
Page 437
Page 439
Page 441
DEPART Start a robot motion away from the current location with
joint-interpolated motion.
DEPARTS Start a robot motion away from the current location with
straight-line motion.
DETACH Release a specified device from the control of the applic-
ation program.
DISABLE Turn OFF one or more system switches. Page 449
DO Introduce a DO program structure. Page 451
DOS Execute a keyword defined by a string expression. Page 453
DRIVE Execute a keyword defined by a string expression. Page 453
DURATION Set the minimum execution time for subsequent robot
motions.
ELSE Separate the alternate group of statements in an IF ...
THEN control structure.
ENABLE Turn ON one or more system switches. Page 460
END Mark the end of a control structure. Page 462
Page 443
Page 445
Page 447
Page 457
Page 459
22353-000 Rev. C eV+3KeywordReferenceManual 31
2.4 Program Command Keyword Summary
Keyword Description Reference
ESTOP Stop the robot in the same manner as if an emergency-
stop signal was received.
EXECUTE Begin execution of a control program. Page 465
EXIT Branch to the statement following the nth nested loop of a
control structure.
EXTERNAL Declare a variable that is shared between eV+ and the NJ-
series Robot Integrated CPUUnit.
FCLOSE Close the disk file currently open on the specified logical
unit.
FCMND Generate a device-specific command to the input / output
device specified by the logical unit.
FCOPY Copy the information in an existing disk file to a new disk
file.
FDELETE Delete the specified disk file. Page 479
FEMPTY Empty any internal buffers in use for a disk file by writing
the buffers to the file if necessary.
FINE Enable a high-precision nulling tolerance for the robot. Page 483
FLIP Request a change in the robot configuration during the
next motion so that the pitch angle of the robot wrist has a negative value.
Page 464
Page 469
Page 470
Page 472
Page 473
Page 477
Page 481
Page 485
FOPEN Create and open a new TCPconnection. Page 488
FOPENA Opens a file for read-write-append access. If the specified
file does not already exist, the file is created.
FOPEND Opens a disk directory for reading. Page 494
FOPENR Opens a file for read-only access. Page 497
FOPENW Opens a file for read-write access. If the file already exists,
an error occurs.
FOR Execute a program loop a specified number of times. Page 503
FSEEK Position a file open for random access and initiate a read
operation on the specified record.
FSET Set or modify attributes of a network device. Page 507
GLOBAL Declare a variable to be global and specify the type of the
variable.
GOTO Perform an unconditional branch to the program step iden-
tified by the given label.
HALT Stop program execution and do not allow the program to
be resumed.
Page 491
Page 500
Page 505
Page 509
Page 511
Page 512
32 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
HERE Set the value of a transformation or precision-point vari-
able equal to the current robot location.
IF ... GOTO Branch to the specified step label if the value of the logical
expression is TRUE (non-zero).
IF ... THEN Conditionally execute a group of keywords (or one of two
groups) depending on the result of a logical expression.
IGNORE Cancel the effect of a REACT or REACTI program com-
mand.
JMOVE Moves all robot joints to positions described by a list of joint
values. The robot performs a coordinated motion in joint­interpolated mode.
JOG Jogs the specified joint of the robot or moves the robot tool
along the specified cartesian direction.
KEYMODE Set the behavior of a group of keys on the pendant. Page 525
KILL Clear a program execution stack and detach any I/O
devices that are attached.
LEFTY Request a change in the robot configuration during the
next motion to make the first two links of a SCARA robot use the left arm orientation.
Page 513
Page 515
Page 517
Page 519
Page 520
Page 521
Page 527
Page 528
LOCAL Declare permanent variables that are defined only within
the current program.
LOCK Set the program reaction lock-out priority to the value
given.
MC Introduce a monitor command within a Monitor
Commandprogram.
MCS Invoke a monitor command from an application program. Page 536
MOVE Initiate a robot motion to the position and orientation
described by the given location with joint-interpolated motion.
MOVEC Initiate a circular / arc-path robot motion using the pos-
itions and orientations described by the given locations.
MOVES Initiate a robot motion to the position and orientation
described by the given location with straight-line motion.
MULTIPLE Allow full rotations of the robot wrist joints. Page 538
NEXT Branch to the END statement of the nth nested loop, per-
form the loop test, and loop if appropriate.
NOFLIP Request a change in the robot configuration during the
next motion so the pitch angle of the robot wrist has a pos­itive value.
Page 530
Page 532
Page 534
Page 539
Page 540
Page 547
Page 548
Page 549
22353-000 Rev. C eV+3KeywordReferenceManual 33
2.4 Program Command Keyword Summary
Keyword Description Reference
NONULL Instruct the eV+ system to not wait for position errors to
be nulled at the end of continuous-path motions.
NOOVERLAP Instruct the eV+ system to not wait for position errors to
be nulled at the end of continuous-path motions.
NULL Instruct the eV+ system to wait for position errors to be
nulled at the end of continuous path motions.
OVERLAP Disable the NOOVERLAP limit-error checking either for the
next motion or for all subsequent motions.
PACK Replace a substring within an array of (128-character)
string variables, or within a (non-array) string variable.
PANIC Simulate an external E-Stop button press to stop all robots
immediately, but do not turn off high power.
PARAMETER Set the value of a systemparameter. Page 561
PAUSE Stop program execution but allow the program to be
resumed.
PDNT.CLEAR Clears the current notification window or custom message
window on the T20 pendant, if any, and returns the T20 pendant back to the Home screen.
PDNT.NOTIFY Creates a pendant notification. Page 565
Page 550
Page 550
Page 554
Page 556
Page 558
Page 560
Page 563
Page 564
PDNT.WRITE Sets the pendant's Custom Message screen. Page 566
PENDANT Return input from the manual control pendant. Page 568
PROCEED Resume execution of an application program. Page 571
.PROGRAM Define the arguments that are passed to a program when
it is invoked.
PROMPT Display a string on the Monitor Window and wait for oper-
ator input.
REACT Initiate continuous monitoring of a specified digital signal
and automatically trigger a subroutine call if the signal transitions.
REACTE Initiate the monitoring of system messages that occur dur-
ing execution of the current program task.
REACTI Initiate continuous monitoring of a specified digital signal.
Automatically stop the current robot motion if the signal transitions properly and optionally trigger a subroutine call.
READ Read a record from an open file or from an attached device
that is not file oriented. For an network device, read a string from an attached and open TCP connection.
READY Move the robot to the ready location. Page 589
Page 573
Page 576
Page 578
Page 581
Page 583
Page 585
34 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 2: Keyword QuickReference
Keyword Description Reference
RELEASE Allow the next available program task to run. Page 591
RESET Turn OFF all external output signals. Page 592
RETRY Repeat execution of the last interrupted program com-
mand and continue execution of the program.
RETURN Terminate execution of the current subroutine and
resume execution of the suspended program at its next step.
RETURNE Terminate execution of an error reaction subroutine and
resume execution of the last-suspended program at the step following the statement that caused the subroutine to be invoked.
RIGHTY Request a change in the robot configuration during the
next motion to make the first two links of a SCARA robot use the right arm orientation.
RUNSIG Turn ON or OFF the specified digital signal as long as exe-
cution of the invoking program task continues.
SELECT Select a unit of the named device for access by the current
task.
SET.EVENT Set an event associated with the specified task. Page 603
SET SET Page 604
SETBELT Set the encoder offset of the specified belt variable equal to
the value of the expression.
Page 593
Page 595
Page 596
Page 597
Page 599
Page 601
Page 606
SETDEVICE Initialize a device or set device parameters. The operation
performed depends on the device referenced.
SIGNAL Turn ON or OFF external digital output signals or internal
software signals.
SINGLE Limit rotations of the robot wrist joint to the range -180
degrees to +180 degrees.
SOLVE.ANGLES Compute the robot joint positions for the current robot
that are equivalent to a specified transformation.
SOLVE.TRANS Compute the transformation equivalent to a given set of
joint positions for the current robot.
SPEED Set the nominal speed for subsequent robot motions. Page 622
STOP Terminate execution of the current program cycle. Page 625
SWITCH Enable or disable a system switch based on a value. Page 626
TIMER Set the specified system timer to the given time value. Page 628
TOOL Set the internal transformation used to represent the loc-
ation and orientation of the tool tip relative to the tool mounting flange of the robot.
Page 608
Page 610
Page 612
Page 613
Page 620
Page 629
22353-000 Rev. C eV+3KeywordReferenceManual 35
2.5 System Parameter Keyword Summary
Keyword Description Reference
TYPE Display the information described by the output spe-
cifications on the Monitor Window.
UNTIL Indicate the end of a DO ... UNTIL control structure and
specify the expression that is evaluated to determine when to exit the loop. The loop continues to be executed until the expression value is nonzero.
VALUE Indicate the values that a CASE statement expression
must match in order for the program statements imme­diately following to be executed.
VPARAMETER Sets the current value of a vision tool parameter. Page 635
VRUN Initiates the execution of a vision sequence. Page 637
VWAITI Waits until the specified vision sequence reaches the state
specified by the type parameter.
WAIT Put the program into a wait loop for one trajectory cycle. If
a condition is specified, wait until the condition is TRUE.
WAIT.EVENT Suspend program execution until a specified event has
occurred or until a specified amount of time has elapsed.
WHILE Initiate processing of a WHILE structure if the condition is
TRUE or skipping of the WHILE structure if the condition is initially FALSE.
Page 630
Page 633
Page 634
Page 638
Page 639
Page 640
Page 643
WINDOW Set the boundaries of the operating region of the specified
belt variable for conveyor tracking.
WRITE Write a record to an open file or to any I/O device. For net-
work device, write a string to an attached device and open a TCP connection.

2.5 System Parameter Keyword Summary

The table below provides a summary of all system parameter keywords.
Keyword Description Reference
BELT.MODE System parameter that sets the characteristics of the con-
veyor tracking feature of the eV+system.
DEVIATION Adds a path deviation from 1 to 100% to the motion in the
singularity region when a robot is in singularity.
JOG.TIME Systemparameter that sets the keep-alive time of a jog oper-
ation.
NOT.CALIBRATED Systemparameter that indicates or asserts the calibration
status of the robots connected to the system.
VTIMEOUT Systemparameter that sets a timeout value so that an error
message is returned if no response is received following a vis-
Page 645
Page 647
Page 650
Page 653
Page 654
Page 655
Page 657
36 eV+3KeywordReferenceManual 22353-000 Rev. C
Keyword Description Reference
ion command.

2.6 System Switch Keyword Summary

The table below provides a summary of all systemswitch keywords.
Keyword Description Reference
Chapter 2: Keyword QuickReference
AUTO.POWER.OFF This system switch disables high power when certain
motion errors occur.
CP System switch that controls the continuous-path function
of a robot.
DECEL.100 SystemSwitch that enables or disables the maximum decel-
eration of 100% for the ACCEL program command keyword.
DELAY.IN.TOL System switch that controls the timing of coarse or fine
nulling after the eV+ system completes a motion segment.
DRY.RUN System switch that controls whether or not eV+ com-
municates with the robot.
MESSAGES SystemSwitch to enable or disable output to the Monitor
Window from TYPE Program Commands.
OBSTACLE System Switch that enables or disables up to four obstacles
for a selected robot.
POWER System Switch that controls or monitors the status of the
robot high power.
ROBOT System switch that enables or disables one robot or all
robots.
Page 658
Page 660
Page 661
Page 662
Page 664
Page 666
Page 667
Page 669
Page 671
SCALE.ACCEL System switch that enables or disables the scaling of accel-
eration and deceleration as a function of program speed.
SCALE.ACCEL.ROT System switch that specifies whether or not the
SCALE.ACCEL switch takes into account the Cartesian rota­tional speed during straight-line motions.
UPPER System switch that controls whether or not the case of
each character is ignored when string comparisons are per­formed.
Page 673
Page 675
Page 676
22353-000 Rev. C eV+3KeywordReferenceManual 37
This section provides details for all eV+ keywords.

3.1 Function Keywords

Use the information in this section to understand function keywords and their use with the eV+ system.
ABS
Real-valued function that returns the absolute value (magnitude) of the argument provided.
Syntax
ABS (value)
Parameter

Chapter 3: Keyword Details

value
Examples
The following example returns 0.123.
ABS(0.123)
The following example returns 5.462
ABS(-5.462)
The following example returns 0.013125.
ABS(1.3125E-2)
The following example divides the variable "part.size" by the absolute value of the variable "belt.scale" and returns the result to the variable "belt.length".
belt.length = part.size/ABS(belt.scale)
Real-valued expression.
22353-000 Rev. C eV+3KeywordReferenceManual 39
3.1 Function Keywords

ACCEL

Real-valued function that returns the current setting for robot acceleration, decel­eration, or the maximum allowable percentage limits defined in the robot con­figuration profile.
Syntax
ACCEL (value)
Usage Considerations
The ACCEL function returns information for the robot selected by the task execut­ing the function.
NOTE: If the task executing this function does not have a robot selected, the output of this function is invalid.
Parameter
value Real-valued expression, the result of which is rounded to an
integer to select the value that is returned. Setting the select parameter to the following values will return the specified information.
l 0: Number of selected acceleration profile. l 1: Acceleration l 2: Deceleration l 3: Maximum allowable acceleration percentage l 4: Maximum allowable deceleration percentage l 5: Program speed below which acceleration and decel-
eration are scaled proportional to a program's speed set­ting when the SCALE.ACCEL system switch is enabled
Examples
The following example will return the current acceleration setting.
ACCEL(1)
The following example will return the current deceleration setting.
ACCEL(2)
Related Keywords
ACCEL (program command)
SCALE.ACCEL
SELECT (real-valued function)
40 eV+3KeywordReferenceManual 22353-000 Rev. C
SELECT (program command)
Chapter 3: Keyword Details
22353-000 Rev. C eV+3KeywordReferenceManual 41
3.1 Function Keywords

ACOS

Real-valued function that returns the arc cosine of its argument.
Syntax
ACOS (value)
Usage Considerations
The value parameter must be in the range of -1.0 to +1.0. Any value outside this range will cause an illegal value error.
Parameter
value
Real-valued expression that defines the cosine value to be considered.
Details
Returns the inverse cosine (arccosine) of the argument, which is assumed to be in the range of -1.0 to +1.0. The resulting value is always in the range of 0.0 to +180.0, inclusive.
Examples
The following example returns a value of 90.
ACOS(0)
The following example returns a value of 180.
ACOS(-1)
The following example returns a value of 84.2608295.
ACOS(0.1)
The following example returns a value of 60.
ACOS(0.5)
NOTE: TYPE, PROMPT, and other similar commands output the results of the above examples as single-precision values. However, they are actually stored and manipulated as double-precision val­ues. The LISTR monitor command will display real values to full precision.
Related Keywords
COS
42 eV+3KeywordReferenceManual 22353-000 Rev. C
SIN
ASIN
TAN
ATAN2
Chapter 3: Keyword Details
22353-000 Rev. C eV+3KeywordReferenceManual 43
3.1 Function Keywords

ALIGN

Transformation function that aligns the input location with the nearest axis of the world coordinate system.
Syntax
ALIGN (location)
Parameter
location Transformation value to be used as a reference.
Details
Returns a modified version of the input location that is aligned parallel to the nearest axis of the World coordinate system.
Example
The following example aligns the position of a robot to a location defined as "point1" and sets it to the value of the location variable "align.loc".
SET align.loc= ALIGN(point1)
Related Keywords
ALIGN (program command)
SELECT (program command)
SELECT (real-valued function)
44 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
ASC
Real-valued function that returns an ASCII character value from within a string.
Syntax
ASC(string, index)
Parameters
string String expression from which the character is to be picked. If
the string is empty, the function returns the value -1.
index Optional real-valued expression defining the character pos-
ition of interest. The first character of the string is selected if the index is omitted or has a value of 0 or 1.
If the value of the index is negative, or greater than the length of the string, the function returns the value -1.
Details
The ASCII value of the specified character is returned as a real value.
Examples
The following example returns the ASCII value of the letter "a".
ASC("sample", 2)
The following example returns the ASCII value of the first character of the string contained in the variable "$name".
ASC($name)
The following example uses the value of the real variable "i" as an index to the character of interest in the string contained in the variable "$system".
ASC($system, i)
Related Keywords
$CHR
VAL
22353-000 Rev. C eV+3KeywordReferenceManual 45
3.1 Function Keywords

ASIN

Real-valued function that returns the arc sine of its argument.
Syntax
ASIN (value)
Usage Considerations
The value parameter must be in the range of -1.0 to +1.0. Any value outside this range will cause an illegal value error.
Parameter
value Real-valued expression that defines the sine value to be con-
sidered.
Details
Returns the inverse sine (arcsine) of the argument, which is assumed to be in the range of -1.0 to +1.0. The resulting value is always in the range of -90.0 to +90.0, inclusive.
Examples
The following example returns a value of 0.
ASIN(0)
The following example returns a value of -90.
ASIN(-1)
The following example returns a value of 5.73917047.
ASIN(0.1)
The following example returns a value of 30.
ASIN(0.5)
NOTE: TYPE, PROMPT, and similar commands output the results of the above examples as single-precision values. However, they are actually stored and manipulated as double-precision values. The LISTR monitor command will display real values to full pre­cision.
Related Keywords
COS
46 eV+3KeywordReferenceManual 22353-000 Rev. C
ACOS
SIN
TAN
ATAN2
Chapter 3: Keyword Details
22353-000 Rev. C eV+3KeywordReferenceManual 47
3.1 Function Keywords

ATAN2

Real-valued function that returns the size of the angle in degrees that has its tri­gonometric tangent equal to value_1/value_2.
Syntax
ATAN2 (value_1, value_2)
Usage Considerations
The returned value is zero if both parameter values are zero.
Parameters
value_1 Real-valued expression.
value_2 Real-valued expression.
Examples
The following example returns 26.1067.
ATAN2(0.123,0.251)
The following example returns -6.600926.
ATAN2(-5.462,47.2)
The following example returns -90.56748.
ATAN2(1.3125E+2,-1.3)
The following example returns and angle value to the "slope" variable from tri­gonometric tangent equal to "rise"/"run".
slope = ATAN2(rise, run)
NOTE: TYPE, PROMPT, and similar commands output the results of the above examples as single-precision values. However, they are actually stored and manipulated as double-precision values. The LISTR monitor command will display real values to full pre­cision.
Related Keywords
COS
ACOS
SIN
48 eV+3KeywordReferenceManual 22353-000 Rev. C
ASIN
TAN
Chapter 3: Keyword Details
22353-000 Rev. C eV+3KeywordReferenceManual 49
3.1 Function Keywords

BASE

Transformation function that returns the transformation value that represents the translation and rotation set by the last BASE program command or monitor com­mand.
Syntax
BASE
Usage Considerations
The BASE function returns information for the robot selected by the task execut­ing the function.
The statement LISTL BASE can be used to display the current base setting.
NOTE: If the task executing this function does not have a robot selected, the output of this function is invalid.
Examples
The following example sets the new base location using the BASEprogram com­mand and then moves to the new base location.
BASE 100,100
MOVE BASE
Related Keywords
BASE (monitor command)
BASE (program command)
LISTL
SELECT (real-valued function)
SELECT (program command)
50 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
BCD
Real-valued function that converts a real value to Binary Coded Decimal (BCD) format.
Syntax
BCD (value)
Usage Considerations
The BCD function is most useful when used in conjunction with the BITS keyword.
Parameter
value Real-valued expression defining the value to be converted.
Details
The BCD function converts an integer value in the range 0 to 9999 into its BCD representation. This can be used to set a BCD value on a set of external output signals for example.
Example
The following example converts the real variable "digit" to a BCD value and applies it to external digital output signals 4 through 8.
BITS 4,4 = BCD(digit)
Related Keywords
DCB
BITS (program command)
BITS (real-valued function)
BITS (monitor command)
22353-000 Rev. C eV+3KeywordReferenceManual 51
3.1 Function Keywords

BELT

Real-valued function that returns information about a conveyor belt being tracked with the conveyor tracking feature.
Syntax
BELT (%belt_var, mode)
Usage Considerations
The BELT system switch must be enabled before this function can be used.
The SETBELT program command is generally used in conjunction with the BELT function to set the effective belt position to zero. This must be done each time the robot will perform a sequence of motions relative to the belt and must be done shortly before the first motion of such a sequence.
WARNING: It is important to execute the SETBELT program command each time the robot is going to track the belt to make sure the difference between the current belt position as returned by the BELT function and the belt position of the spe­cified belt variable does not exceed 8,388,607 (^H7FFFFF) during active belt tracking. Unpredictable robot motion may result if the difference does exceed this value while tracking the belt.
Parameters
%belt_var The name of the belt variable used to reference the con-
veyor belt. As with all belt variables, the name must begin with a percent symbol (%).
mode Control value that determines the information that will
be returned.
If the mode is omitted or its value is equal to zero, the BELT function returns the encoder reading in encoder counts of the belt specified by the belt variable. The value returned by this function is limited to an absolute value of 8,388,607 and will roll over to -8,388,608 after.
If the value is equal to -1, the BELT function returns the last latched encoder position in encoder counts of the belt specified by the belt variable. This value equivalent to the value returned by DEVICE(0, enc, stt, 4) except it is not bounded to 8,388,607.
If the value of the expression is greater than zero, the encoder velocity is returned in units of encoder counts per eV+ cycle (16 ms).
52 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
Examples
The following example will set the point of interest on the referenced conveyor to be that corresponding to the current reading of the belt encoder.
SETBELT %main.belt = BELT(%main.belt)
The folowing example will save the current speed of the belt associated with the belt variable "%b".
belt.speed = BELT(%b, 1)
Related Keywords
DEFBELT
DEVICE
SETBELT
22353-000 Rev. C eV+3KeywordReferenceManual 53
3.1 Function Keywords

BITS

Real-valued function that reads multiple digital signals and returns the value cor­responding to the binary bit pattern.
Syntax
BITS (first_sig, num_sigs)
Usage Considerations
External digital input or output signals or internal software signals can be ref­erenced.
A maximum of 32 signals can be read at one time.
Any group of up to 32 signals can be read provided that all the signals in the group are configured for use by the system.
Parameters
first_sig Real-valued expression defining the lowest-numbered sig-
nal to be read.
num_sigs Optional real-valued expression specifying the number of
signals to be affected. A value of 1 is assumed if none is spe­cified. The maximum valid value is 32.
Details
This function returns a value that corresponds to the binary bit pattern present on 1 to 32 digital signals.
The binary representation of the value returned by the function has its least-sig­nificant bit determined by signal numbered first_sig and its higher-order bits determined by the next num_sigs -1 signals.
Example
The example below assumes that the following input signal states are present.
Signal: 1008 1007 1006 1005 1004 1003 10021001 State: 1 1 0 1 0 1 1 0
The following statement will return a value of 5 for variable "x" because the four signals 1003, 1004, 1005, and 1006 can be interpreted as a binary representation of that value.
x = BITS(1003, 4)
Related Keywords
BITS (program command)
IO
54 eV+3KeywordReferenceManual 22353-000 Rev. C
RESET
SIG
SIG.INS
SIGNAL (monitor command)
SIGNAL (program command)
Chapter 3: Keyword Details
22353-000 Rev. C eV+3KeywordReferenceManual 55
3.1 Function Keywords

BMASK

Real-valued function that creates a bit mask by setting individual bits.
Syntax
BMASK (bit, bit, ..., bit)
Parameter
bit Integer value from 1 to 32 specifying a bit to turn ON. The
least-significant bit is number 1.
Details
This function creates a bit mask by turning ON the specified bits and leaving all other bits OFF (ON = 1, OFF = 0).
Bit 32 is the sign bit and yields a negative number when set.
Examples
The following example creates a bit mask ^B10001 and attaches to a diskLUN with mode bit 2 turned ON.
bm = BMASK(1, 5)
mode = BMASK(2) ATTACH (lun, mode) "DISK"
56 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details

BSTATUS

Real-valued function that returns information about the status of the conveyor tracking system.
Syntax
BSTATUS
Usage Considerations
The BSTATUS function returns information for the robot selected by the task executing the function.
Details
This function is normally used when the BELT.MODE systemparameter bit 4 is set.
This function returns a value that is equivalent to the binary value represented by a set of bit flags that indicate the following conditions of the conveyor tracking software.
Bit 1 (LSB) Tracking belt (mask value = 1)
When this bit is set, the robot is currently tracking a belt.
Bit 2 Destination upstream (mask value = 2)
When this bit is set, the destination location was found to be upstream of the belt window during the planning of the last motion.
Bit 3 Destination downstream (mask value = 4)
When this bit is set, the destination location was found to be downstream of the belt window during the planning of the last motion.
Bit 4 Window violation (mask value = 8)
When this bit is set, a window violation occurred while the robot was tracking a belt during the last belt-relative motion. This flag is cleared at the start of each belt-relative motion.
Related Keywords
BELT (real-valued function)
22353-000 Rev. C eV+3KeywordReferenceManual 57
3.1 Function Keywords
PARAMETER (monitor command)
PARAMETER (Program command)
PARAMETER (real-valued function)
WINDOW (program command)
WINDOW (real-valued function)
58 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
CAS
Real-valued function that compares a real variable to a test value and con­ditionally sets a new value as one indivisible operation.
Syntax
CAS (variable, test_value, new_value)
Usage Considerations
The eV+ system does not enforce any protection scheme for global variables that are shared by multiple program tasks. It is the programmer's responsibility to keep track of the usage of such global variables. The CAS real-valued function (or the similar TAS function) can be used to implement logical interlocks on access to shared variables.
This function can also be used to bypass a restriction on the simultaneous access of global arrays by multiple program tasks. Program execution can fail if two or more tasks attempt to increase the size of an array at the same time. Refer to the eV+3 User'sManual (Cat.No. I651) for more information about global array access restriction.
Parameters
variable Name of the real-valued variable to be tested and
assigned the new value given.
test_value Real value, variable, or expression that defines the com-
parison value.
new_value Real value, variable, or expression that defines the new
value to be assigned to the specified variable.
Details
If the variable is equal to the test value, the new value is stored in the variable. Otherwise the variable is not modified. The original value of the variable is returned as the function value.
The compare and set-new-value operations occur with interrupts locked so that the operation is indivisible. This function provides a way for setting semaphores between tasks, similar to the TAS real-valued function. Refer to TAS for more information.
If the variable is undefined when the function is executed, it is treated as having the value zero.
Related Keywords
TAS
22353-000 Rev. C eV+3KeywordReferenceManual 59
3.1 Function Keywords

$CHR

String function that returns a one-character string corresponding to a given ASCII value.
Syntax
$CHR(value)
Parameter
value Real-valued expression defining the value to be translated
into a character. The value must be in the range of 0 to 255 (decimal).
If the value is in the range 0 to 127 (decimal), the cor­responding ASCII character will be returned.
Example
The following example returns the character"A" (ASCII value 65).
$CHR(65)
Related Keywords
ASC
$DBLB
$FLTB
$INTB
$LNGB
60 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
COM
Perform the binary complement operation on a value.
Syntax
... COM value ...
Usage Considerations
The COM function is meaningful only when performed on an integer value. Only the integer parts of real values are used. Any fractional parts are ignored.
Parameter
value Real-valued expression defining the value to be com-
plemented.
Details
The COM function performs the binary complement operation on a bit-by-bit basis, resulting in a real value.
The COM operation consists of the following steps.
1.
Convert the operand to a sign-extended 32-bit integer, truncating any frac­tional part.
2.
Perform a binary complement operation.
3.
Convert the result back to a real value.
To review the order of evaluation for operators within expressions, refer to the eV+3 User'sManual (Cat.No. I651).
Examples
The following example returns the value of -41.
COM 40
Related Keywords
NOT
22353-000 Rev. C eV+3KeywordReferenceManual 61
3.1 Function Keywords

CONFIG

Real-valued function that returns a value providing information about the robot's geometric configuration or the status of the motion servo control features.
Syntax
CONFIG (select)
Usage Considerations
The CONFIG function returns information for the robot selected by the task executing the function.
If the eV+ system is not configured to control a robot, use of the CONFIG function causes an error.
Parameter
select Optional real value, variable, or expression interpreted as an
integer that has a value from 0 to 13 and selects the category of the configuration information to be returned.
Details
This function returns a value that is interpreted as a series of bit flags. The inter­pretation of the value returned by this function depends on the select parameter.
When the select parameter is omitted or has the value 0, 1, or 2, the CONFIG function returns a value that can be interpreted as bit flags indicating a geometric configuration of the robot. Each bit in the value represents one characteristic of a robot configuration.
When the select parameter is 3, 4, or 5, the CONFIG function returns a value that can be interpreted as bit flags indicating the settings of several robot motion servo control features. Each bit in the value represents the state of one motion servo control feature.
When the select parameter is 6, 7, or 8, the CONFIG function returns a value that represents the setting of the FINE tolerance. Limitations to this functionality apply when using FINE with the ALWAYS parameter. Refer to FINE on page 483for more information.
When the select parameter is 9, 10, or 11, the CONFIG function returns a value that represents the setting of the COARSE tolerance. Limitations to this func­tionality apply when using COARSE with the ALWAYS parameter. Refer to COARSE on page 429for more information.
The parameter values in this group determine which robot configuration is returned by the function.
select = 0
This returns the robot's current configuration. The default value is 0.
62 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
select = 1
This returns the configuration the robot will achieve at the completion of the cur­rent motion or the current configuration if no motion is in progress (while the robot is attached).
select = 2
This returns the configuration the robot achieves at the completion of the next motion assuming that it is a joint-interpolated and not straight-line motion.
The interpretations of the bit flags returned when Select = 1, 2, or 3 are shown in the table below.
Bit #
1 1 Robot has righty configuration.
2 2 Robot has below configuration.
3 4 Robot has flipped configuration.
Bit
Mask
Indication if Bit ON
select = 3
This returns the permanent settings of the robot motion servo control features that are defined by keywords that specify the ALWAYS qualifier.
select = 4
This returns the temporary settings for the motion currently executing or the last motion completed if no motion is in progress.
select = 5
This returns the temporary settings that will apply to the next motion performed.
The interpretations of the bit flags returned by selections 3, 4, and 5 are shown in the table below.
Bit# Bit Mask Indication if bit CLEAR Bit SET
1 1 None None
2 2 FINE asserted COARSE asserted
3 4 NULL asserted NONULL asserted
4 8 MULTIPLE asserted SINGLE asserted
5 ^H10 CPON asserted CPOFF asserted
22353-000 Rev. C eV+3KeywordReferenceManual 63
3.1 Function Keywords
Bit# Bit Mask Indication if bit CLEAR Bit SET
6 ^H20 OVERLAP asserted NOOVERLAP asserted
select = 6
This returns the FINE tolerance as the permanent setting as a percentage of the standard tolerance.
select = 7
This returns FINEtolerance as the setting used for the previous or current motion as a percentage of the standard tolerance.
Select = 8
This returns FINEtolerance as the setting to be used for the next motion as a per­centage of the standard tolerance.
select = 9
This returns COARSEtolerance as the permanent setting as a percentage of the standard tolerance.
select = 10
This returns COARSEtolerance as the setting used for the previous or current motion as a percentage of the standard tolerance.
select = 11
This returns the COARSEtolerance as the setting to be used for the next motion as a percentage of the standard tolerance.
select = 12
When select = 12, the available joint configuration options for the selected robot are returned as shown in the table below.
Bit # Bit Mask Indication if bit set
1 1 Robot can have lefty or righty configuration.
2 2 Robot can have above or below configuration.
3 4 Robot can have flipped or noflip configuration.
18 ^H20000 Robot supports the OVERLAP and NOOVERLAP
keywords.
22 ^H200000 Robot's last rotary joint can be limited to ±180
64 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
Bit # Bit Mask Indication if bit set
degrees with SINGLE program commands.
select = 13
When the select parameter is 13, the type of robot motion is returned. The bit val­ues returned are shown in the table below.
Bit # Bit Mask Description
1 1 This bit is set if the motionis joint interpolated. It is
cleared for straight-line motion.
Example
The following example will check the if the robot is moving to a righty or lefty configuration. Text will be displayed in the Monitor Window to indicate the con­figuration.
IF (CONFIG(1)==0) OR(CONFIG(1)==4 THEN
TYPE "Robot is moving to a lefty position." END IF (CONFIG(1)==1) OR(CONFIG(1)==5)THEN
TYPE "Robot is moving to a righty position." END
Related Keywords
ABOVE
BELOW
COARSE
CPOFF
CPON
FINE
FLIP
LEFTY
NOFLIP
NONULL
NOOVERLAP
NULL
OVERLAP
RIGHTY
SELECT
22353-000 Rev. C eV+3KeywordReferenceManual 65
3.1 Function Keywords
SELECT (real-valued function)
SINGLE
STATE
66 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
COS
Real-valued function that returns the trigonometric cosine of a given angle.
Syntax
COS(angle)
Usage Considerations
The angle parameter must be measured in degrees. The parameter is interpreted as modulo 360 degrees, but excessively large values may cause a loss of accuracy in the returned value.
Parameter
angle Real-valued expression that defines the angular value (in
degrees) to be considered.
Details
Returns the trigonometric cosine of the argument, which is assumed to be in degrees. The resulting value is always in the range of -1.0 to +1.0, inclusive.
Examples
The following example returns a value of 0.999962.
COS(0.5)
The following example returns a value of 0.9954596.
COS(-5.462)
The following example returns a value of 0.4999999.
COS(60)
The following example returns a value of -0.659345.
COS(1.3125E+2)
NOTE: TYPE, PROMPT, and similar commands output the results of the above examples as single-precision values. However, they are actually stored and manipulated as double-precision values. The LISTR monitor command will display real values to full pre­cision.
Related Keywords
ACOS
22353-000 Rev. C eV+3KeywordReferenceManual 67
3.1 Function Keywords
SIN
ASIN
TAN
ATAN2
68 eV+3KeywordReferenceManual 22353-000 Rev. C

CUBRT

Real-valued function that returns the cube root of a value.
Syntax
CUBRT(value)
Parameters
value Real-valued expression defining the value whose cube
root is to be computed.
Examples
The following example returns a value of 0.497319.
CUBRT(0.123)
The following example returns a value of 2.0.
Chapter 3: Keyword Details
CUBRT(8)
The following example returns a value of -1.7611.
CUBRT(-5.462)
The following example returns a value of 5.081982.
CUBRT(1.3125E+2)
NOTE: TYPE, PROMPT, and similar commands output the results of the above examples as single-precision values. However, they are actually stored and manipulated as double-precision values. The LIST and LISTR monitor commands display real values to full precision.
RelatedKeywords
SQR
SQRT
22353-000 Rev. C eV+3KeywordReferenceManual 69
3.1 Function Keywords

$DBLB

String function that returns an 8-byte string containing the binary representation of a real value in double-precision IEEE 754 floating-point format.
Syntax
$DBLB(value, littleEndian)
Parameter
value Real-valued expression which is converted to its
IEEE 754 floating-point binary representation.
littleEndian Optional value to specify the type of little endian. If
1, then it is a little end, otherwise it is big end.
Details
The primary use of this function is to convert a double-precision real value to its binary representation in an output record of a data file.
A real value is converted to its binary representation using the IEEE double-pre­cision standard floating-point format. This 64-bit value is packed as eight suc­cessive 8-bit characters in a string. Refer to the DBLB real-valued function for a more detailed description of IEEE 754 floating-point format.
Example
The following example will return a character string as shown below.
$DBLB(1.215)
Character string returned as:
$CHR(^H3F)+$CHR(^H3F)+$CHR(^H70)+$CHR(^HA3)+$CHR (^HD7)+$CHR(^H0A)+$CHR(^H3D)+$CHR(^H71)
Related Keywords
$CHR
FLTB
$FLTB
$INTB
$TRANSB
70 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
FractionExponentS
63
62 52 51 0
Bytes 1 and 2 Bytes 3 and 4 Bytes 5 and 6 Bytes 7 and 8

DBLB

Real-valued function that returns the value of eight bytes of a string interpreted as an IEEE double-precision floating-point number.
Syntax
DBLB ($string, first_char, litteEndian)
Parameters
$string String expression that contains the eight bytes to be
converted.
first_char Optional real-valued expression that specifies the
position of the first of the eight bytes in the string.
If first_char is omitted or has a value of 0 or 1, the first eight bytes of the string are extracted.
If first_char is greater than 1, it is interpreted as the character position for the first byte. For example, a value of 2 means that the second through ninth bytes are extracted.
If first_char specifies eight bytes that are beyond the end of the input string, an error is generated.
littleEndian Optional value to specify the type of little endian. If
1, then it is a little end, otherwise it is big end.
Details
The primary use of this function is to convert a binary floating-point number from an input data record to a value that can be used internally by eV+.
Floating-point Numbers
Eight sequential bytes of the given string are interpreted as being a double-pre­cision (64-bit) floating-point number in the IEEE standard format. This 64-bit field is interpreted as follows.
Figure 3-1. 64-bit Floating Point Format
22353-000 Rev. C eV+3KeywordReferenceManual 71
3.1 Function Keywords
Table 3-1. 64-Bit Floating Point Format Description
Item Description
S Sign bit (0 = positive, 1 = negative)
Exponent Binary exponent, biased by -1023
Fraction Binary fraction with an implied 1 to the left of the binary point
The value of a floating point number is shown below for 0 < exponent < 2047.
-1s* (1.fraction) * 2
exp -1023
Double-precision real values have the following special values.
Exponent Fraction Description
0 Zero Zero value
0 Nonzero Denormalized number
2047 Zero Signed infinity
2047 Nonzero Not a number
The range for normalized numbers is approximately 2.2 x 10
Example
-308
to 1.8 x 10
The following example returns a value of 1.0.
DBLB($CHR(^H3F)+$CHR(^HF0)+$CHR(0)+$CHR(0)+$CHR(0)+$CHR(0)+$CHR (0)+$CHR(0))
Related Keywords
ASC
$DBLB
FLTB
$FLTB
INTB
TRANSB
VAL
307
72 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
DCB
Real-valued function that converts BCD digits into an equivalent integer value.
Syntax
DCB(value)
Usage Considerations
No more than four BCD digits can be converted. The DCB function is most often used with the BITS real-valued function to decode input from the digital input signal lines.
Parameter
value Real value interpreted as a binary bit pattern representing up
to four BCD digits.
NOTE: An error is reported if any digit is not a valid BCD digit (if a digit is greater than 9).
Example
The following example sets the real variable "input" equal to the integer equi­valent of the BCD input on the specified signals if external input signals 1001­1008 (8 bits of input) receive two BCD digits from an external device.
input = DCB(BITS(1001, 8))
Related Keywords
BITS
BCD
22353-000 Rev. C eV+3KeywordReferenceManual 73
3.1 Function Keywords

$DECODE

String function that extracts part of a string as delimited by given break char­acters.
Syntax
$DECODE ($string_var, string_exp, mode)
Usage Considerations
$DECODE modifies the input $string_var variable as well as returning a string value.
The evaluation for break characters is always performed without regard for the case of the characters in the input string.
The break characters are treated as individual characters independent of the other characters in the string that defines them.
Parameters
$string_var String variable that contains the string to be scanned.
After the function is processed, this variable will con­tain the portion of the original string that was not returned as the function value.
NOTE: This parameter is modified by the function and cannot be spe­cified as a string constant or expression.
If the program causes the same variable to receive the function value, the variable contain the value returned by the function.
string_exp String constant, variable, or expression that defines
the individual break characters, which are to be con­sidered as separating the substrings of interest in the input string value. The order of the characters in this string has no effect on the function operation.
mode Optional real value, variable, or expression that con-
trols the operation performed by the function. Mode values are -3, -2, 0, and 1.
If the mode is negative, 0, or is omitted, characters up to the first break character are removed from the input string and returned as the output of the func­tion.
If the mode is greater than 0, characters up to the first non-break character are removed from the input string and returned as the output of the function. This case returns all the leading break characters in
74 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
the input string.
Details
This function is used to scan an input string and return the initial substring as delimited by any of a group of break characters. After the substring is returned by the function, it is deleted from the input string.
The string returned and deleted can either contain no break characters (mode 0), or all break characters (mode 1). $DECODE can return and delete all the char­acters up to the first break character for a desired substring or the function can return and delete all the leading break characters which are usually discarded.
By alternating the modes, groups of desired characters can be extracted from the input string (see the first example below).
The modes -2 and -3 copy all nonbreak characters up to the first break characters plus the first break character.
Mode -2 is equivalent to the following statements.
$s = $DECODE($i,$break,0) ;Extract up to the first break character $s = $s+$MID($i,1,1) ;Add on 1st break character $i = $MID($i,2,127) ;Remove the break character
The following statement has the same functionality.
$s = $DECODE($i,$break,-2) ;Extract through 1st break character
Mode -3 is equivalent to mode -2 if a break character is present. However, if no break character is contained in the input string, mode -3 returns an empty string and leaves the input string unchanged.
Examples
The examples below extract consecutive numbers from the string "$input", assum­ing that the numbers are separated by some combination of spaces and commas.
The first example within the DO structure sets the variable "$temp" to the sub­string from "$input" that contains the first number, and removes that substring from "$input". The VAL function is used to convert the numeric string into its cor­responding real value, which is assigned to the next element of the real array value. The $DECODE function is used a second time to extract the characters that separate the numbers. The characters found are ignored.
i = 0 ;Set array index DO
$temp = $DECODE($string_var," ,",0) ;Extract a number string value[i] = VAL($temp) ;Convert to real value $temp = $DECODE($string_var," ,",1) ;Discard spaces and commas i = i+1 ;Advance the array index
UNTIL $string_var == "" ;Stop when input is empty
In a case where "$string_var" contains a sequence of numeric values as strings separated by spaces, commas, or any combination of spaces and commas, execut-
22353-000 Rev. C eV+3KeywordReferenceManual 75
3.1 Function Keywords
ing the following statement results in the first four elements of the "value" array getting the values shown below.
$string_var = "1234. 93465.2, .4358,3458103"
value[0] = 1234.0 value[1] = 93465.2 value[2] = 0.4358 value[3] = 3458103.0
The string variable input ($string_var) also contains an empty string ("").
As shown above, use of the $DECODE function normally involves two string variables as the input variable and the output variable. If you are interested only in the characters up to the first break character, and want to discard all the char­acters that follow, the same variable can be used for both input and output. In the following example, the same variable is used on both sides of the equal sign because the programmer wants to discard all the white space (spaces and tabs) characters at the end of the input string.
NOTE: The break characters are specified by a string expression consisting of a space character and a tab character.
$line = $DECODE($line," "+$CHR(9),0) ;Discard trailing blanks
Related Keywords
$TRUNCATE
$MID
76 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details

$DEFAULT

String function that returns a string containing the current or initial system default device, unit, and directory path for disk file access.
Syntax
$DEFAULT (mode, empty_arg)
Usage Considerations
Parentheses must be included even when mode is omitted.
Parameter
mode Optional real value, variable, or expression (inter-
preted as an integer) that specifies the default path to be returned.
If the parameter is omitted, or has the value 0, the cur­rent system default path is returned.
If the parameter has the value 1, the default path returned is the one that was in effect immediately after the eV+ system was booted from disk.
empty_arg
Details
This should be NULL.
The system default device, unit, and directory path can be set by the CD or DEFAULT command. The $DEFAULT function returns the current or initial default values as a string as shown below.
device>disk_unit:directory_path
This string contains the portions of the following information that have been set.
device Can be one of the following.
DISK A local disk.
SYSTEM A disk device, drive, and subdirectory
path currently set with the DEFAULT monitor command.
Additional Information: Refer to the ATTACH command for more inform­ation on valid devices.
22353-000 Rev. C eV+3KeywordReferenceManual 77
3.1 Function Keywords
disk_unit The disk unit specified to the DEFAULT command.
The colon (:) is omitted if no unit was specified.
directory_path Any input to the DEFAULT command that followed
the device and unit. The directory path is omitted if no additional input was specified.
Example
The following example sets the default drive specification to DISK>D:\TEST\ and then displays it on the terminal for confirmation.
DEFAULT = DISK>D:\TEST\ LISTS $DEFAULT()
Related Keywords
CD
DEFAULT
78 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details

DEFINED

Real-valued function that determines if a variable has been defined.
Syntax
DEFINED (var_name)
Parameter
var_name The name of a location, string, or real variable. Both
scalar variables and array variables are permitted. A loc­ation variable can be a transformation, a precision point, or a belt variable.
Details
The value of the specified variable is tested. If the value is defined, the function returns the value TRUE. Otherwise, the value FALSE is returned.
If a specific array element is specified for array variables, the single array element is tested. If no array element is specified, this function returns a TRUE value if any element of the array is defined.
NOTE: For non-real arguments (i.e., strings, locations, trans­formations) that are passed in the argument list of a CALL state­ment, you can test to see if the variable is defined or not. You cannot assign a value to undefined non-real arguments within the called program. If you attempt to assign a value to an undefined non-real argument, an undefined value error message is returned.
When using DEFINED to test for user input, assign a default value to the vari­able before testing it as shown in the examples below.
Examples
The following statement returns a value of TRUE if the variable"base_part" is defined.
DEFINED(base_part)
The following statement returns a value of TRUE if any element of the array "corner" has been defined.
DEFINED(corner[])
Related Keywords
STATUS
TESTP
22353-000 Rev. C eV+3KeywordReferenceManual 79
3.1 Function Keywords

DEST

Transformation function that returns a transformation value representing the planned destination location for the current robot motion.
Syntax
DEST
Usage Considerations
The DEST function returns information for the robot selected by the task execut­ing the function.
NOTE: If the task executing this function does not have a robot selected, the output of this function is invalid.
Details
DEST returns the location to which a robot was moving when its motion was interrupted. This applies to motion keywords with the following considerations.
l
Motions to named locations.
MOVE start MOVES #part[10]
NOTE: Even though the second statement references a pre­cision-point location variable, the DEST function returns a transformation value during that motion.
l
Motions to locations defined relative to named locations or defined rel­ative to the current robot location.
APPROS drop, 50.00 DEPART 30.00 MOVE SHIFT(HERE BY 50,0,10)
l
Motions to special locations.
READY
The location value returned by the DEST function may not be the same as the loc­ation at which the robot stops if the motion of the robot is interrupted for some reason. For example, if an emergency stop operation occurs, the robot stops imme­diately, but the DEST function still returns the location to which the robot was moving.
If a motion is not started because eV+ detects the destination location cannot be reached, then the DEST function is not set to the goal location.
Example
The following example continues a motion that has been interrupted by a reac­tion initiated by a REACTI keyword. The subroutine automatically invoked can
80 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
contain steps such as the following to process the interruption and resume the original motion.
SET save = HERE SET old.dest = DEST old.speed = SPEED(3) DEPART 50.0
. .
. APPRO save, 50.0 MOVES save SPEED old.speed MOVES old.dest
Related Keywords
HERE
#PDEST
SELECT (real-valued function)
SELECT (program command)
22353-000 Rev. C eV+3KeywordReferenceManual 81
3.1 Function Keywords

DEVICE

Real-valued function that returns a real value from a specified device. The value may be data or status information, depending upon the device and the para­meters.
Syntax
DEVICE (type, unit, error, p1, p2,...)
Usage Considerations
The syntax contains optional parameters that may be useful only for specific device types and information requests.
Parameters
type Real value, variable, or expression interpreted as an integer
that indicates the type of device being referenced. The fol­lowing types are available.
0 = Belt encoder 1 = (Reserved for future use)) 2 = Force Processor Board 3 = Robot device 4 = Vision 5 = (Reserved for future use)
unit Real value that indicates the device unit number. The value
must be in the range 0 to -1, where -1 is the maximum num­ber of devices of the specified type. The value should be 0 if there is only one device of the given type.
error Optional real variable that receives a standard system error
number which indicates if this function succeeded or failed. If this parameter is omitted, any device error stops program exe­cution. If error is specified, the program must check it to detect errors.
p1, p2, ...
Details
Optional real values that are sent to the device as part of the request. The number of values specified and the meanings of the values depend upon the particular device type.
DEVICE is a function for returning data and status information from external devices.
82 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
Examples
The following example captures the current belt encoder position when the last parameter =1 and captures the next latched encoder position from the buffer when the last parameter = 4.
IF (sv.emulate.mode) THEN
latch.num = 1 latch.value = DEVICE(0,pick.encoder[0]-1,sts,1)
ELSE
latch.value = DEVICE(0,pick.encoder[0]-1,sts,4) END SETBELT %pick.belt[0] = latch.value
Related Keywords
SETDEVICE
22353-000 Rev. C eV+3KeywordReferenceManual 83
3.1 Function Keywords

DISTANCE

Real-valued function that determines the distance between the points defined by two location values.
Syntax
DISTANCE (location_1, location_2)
Usage Considerations
Only X, Y, and Z axes are considered.
Either location can be expressed as a compound transformation.
Parameter
location_1 Transformation value that defines the first point of
interest. This can be a function, a variable, or a com­pound transformation.
location_2 Transformation value that defines the second point of
interest. This can be a function, a variable, or a com­pound transformation.
Details
Returns the distance in millimeters between the points defined by the two spe­cified locations. The order in which the locations are specified does not matter. Also, the orientations defined by the locations have no effect on the value returned.
Example
The following example sets the value of the real variable x to be the distance between where the robot tool point is currently located and the point defined by the transformation part.
x = DISTANCE(HERE, part)
Related Keywords
IDENTICAL
84 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details

DURATION

Real-valued function that returns the current setting for one of the motion DURATION specifications.
Syntax
DURATION (select)
Usage Considerations
The DURATION function returns information for the robot selected by the task executing the function.
NOTE: If the task executing this function does not have a robot selected, the output of this function is invalid.
Parameter
select Real-valued expression whose value determines which dur-
ation value should be returned.
Details
This function returns the user-specified minimum robot motion duration in seconds corresponding to the select parameter value. Refer to the DURATION pro­gram command for an explanation of the specification of motion duration times.
Different select values determine when the duration time returned applies as described below. The acceptable range for the select parameter is 2 to 4. Other val­ues for this parameter are invalid.
Select DURATION value returned
2 Permanent minimum robot motion duration (set by a DURATION ...
ALWAYS statement)
3 Temporary motion duration for the current or last motion.
4 Temporary motion duration to be used for the next motion.
Examples
The following example will check if the DURATIONsetting is 2 using the real­valued function and if not, will set it to 2 using the program command.
SELECT ROBOT = 1
IFDURATION(2)<>2 THEN
DURATION 2 ALWAYS END
22353-000 Rev. C eV+3KeywordReferenceManual 85
3.1 Function Keywords
Related Keywords
CONFIG
DURATION (program command)
SELECT (program command)
SELECT (real-valued function)
86 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
DX
Real-valued function that returns the X-axis component of a given trans­formation value.
Syntax
DX (location)
Parameter
location Transformation value from which a component is desired.
This can be a function, a variable, or a compound trans­formation.
Details
This function returns the respective X-axis component of the specified trans­formation value.
NOTE: The DECOMPOSE command can also be used to obtain the displacement components of a transformation value. If the rota­tion components are desired, the DECOMPOSE command must be used. DECOMPOSE is more efficient if more than one element is needed and the location is a compound transformation.
Example
Consider the transformation "start" with the following components.
125, 250, -50, 135, 50, 75
The following example will return a value of 125.00.
DX(start)
Related Keywords
DECOMPOSE
DY
DZ
RX
RY
RZ
22353-000 Rev. C eV+3KeywordReferenceManual 87
3.1 Function Keywords
DY
Real-valued function that returns the Y-axis component of a given trans­formation value.
Syntax
DY (location)
Parameter
location Transformation value from which a component is desired.
This can be a function, a variable, or a compound trans­formation.
Details
This function returns the respective Y-axis component of the specified trans­formation value.
NOTE: The DECOMPOSE command can also be used to obtain the displacement components of a transformation value. If the rota­tion components are desired, the DECOMPOSE command must be used. DECOMPOSE is more efficient if more than one element is needed and the location is a compound transformation.
Example
Consider the transformation "start" with the following components.
125, 250, -50, 135, 50, 75
The following example will return a value of 250.00.
DY(start)
Related Keywords
DECOMPOSE
DX
DZ
RX
RY
RZ
88 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
DZ
Real-valued function that returns the Z-axis component of a given trans­formation value.
Syntax
DZ (location)
Parameter
location Transformation value from which a component is desired.
This can be a function, a variable, or a compound trans­formation.
Details
This function returns the respective Z-axis component of the specified trans­formation value.
NOTE: The DECOMPOSE command can also be used to obtain the displacement components of a transformation value. If the rota­tion components are desired, the DECOMPOSE command must be used. DECOMPOSE is more efficient if more than one element is needed and the location is a compound transformation.
Example
Consider the transformation "start" with the following components.
125, 250, -50, 135, 50, 75
The following example will return a value of -50.00.
DZ(start)
Related Keywords
DECOMPOSE
DX
DY
RX
RY
RZ
22353-000 Rev. C eV+3KeywordReferenceManual 89
3.1 Function Keywords

ENCLATCH

Real-valued function that returns the encoder position for any encoder in the system at the occurrence of the last latch.
Syntax
ENCLATCH(select)
Usage Considerations
If an encoder that is not configured is specified for the select parameter, executing the ENCLATCH keyword will return an error.
Parameter
select Optional integer, expression, or real variable specifying the encoder id. This
can be a value from 1 to 116.
Details
The ENCLATCH keyword returns a real-value that represents the location of the encoder when the last external trigger occurred. The LATCHED keyword should be used to determined when an external trigger has occurred and a valid location has been recorded. The DEVICE keyword may be also used to read the latched value of an encoder as well as other information of the encoder.
Operation of the external trigger can be configured with the Sysmac Studio. Refer to the Sysmac
Studio Robot Integrated System Building Function with Robot Integrated CPU Unit Operation Manual (Cat. No. W595) for more information.
Examples
The following example returns the encoder position of encoder 1 and assigns the value to "Latch_pos".
encoder_id = 1 Latch_sig = LATCHED(-1*encoder_id) Latch_pos = ENCLATCH(encoder_id)
Related Keywords
LATCHED
90 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details

$ENCODE

String function that returns a string created from output specifications.
Syntax
$ENCODE (output_specification, output_specification, ...)
Parameter
An output specification can consist of any of the following components in any order, separated by commas.
l
A string expression.
l
A real-valued expression that is evaluated to determine a value to be dis­played.
l
Format control specifier that determines the format of the output message.
Details
This function makes strings normally produced by the TYPE command available within a program. The $ENCODE function creates a string value but does not generate any output.
The following format specifiers can be used to control the display of numeric val­ues. These settings remain in effect for the remainder of the function parameter list unless another specifier is used.
For all these specifiers, if a value is too large to be displayed in the given field width, the field is filled with asterisk characters (*).
/D Use the default format, which is equivalent to /G15.8 (see
below), except trailing zeros and all but one leading space are omitted.
The following format specifications accept a 0 as the width field. This causes the actual field size to vary to fit the value and all leading spaces to be suppressed. This is useful when a value is displayed within a line of text or at the end of a line.
/En.m Format values in scientific notation (for example, -1.234E+02)
in fields n spaces wide with m digits in the fractional parts. If n is not zero, it must be large enough to include space for a minus sign (if the displayed value is negative), one digit to the left of the decimal point, a decimal point (if m is not zero), m digits, and four or five characters for the exponent.
22353-000 Rev. C eV+3KeywordReferenceManual 91
3.1 Function Keywords
/Fn.m Format values in fixed-point notation (for example, -123.4) in
fields n spaces wide, with m digits in the fractional parts.
/Gn.m Format values in F format with m digits in the fractional
parts if that can be done in fields n spaces wide. Otherwise /En.m format is used.
/Hn Format values as hexadecimal integers in fields n spaces
wide.
/In Format values as decimal integers in fields n spaces wide.
/On Format values as octal integers in fields n spaces wide.
The following specifiers can be used to insert special characters in the string.
/Cn Include the characters carriage return (CR) and line feed (LF)
n times.
If the string resulting from the $ENCODE function is output to the Mon­itor Window, this results in n blank lines if the format control specifier is at the beginning or end of the function parameter list. Otherwise, n -1 blank lines result.
/Un Include the characters necessary to move the cursor up n
lines if the resulting string is output to the Monitor Window.
/Xn Include n spaces.
Example
The following example adds a formatted representation of the value of count to the string contained in $output.
$output = $output+$ENCODE(/F6.2, count)
The following example provides a method of adding a format control specifier to the output from a PROMPT command. This example displays the value of the motor as part of the prompt message.
92 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
PROMPT $ENCODE("Start motor #",/I0,motor," (Y/N)? "), $answer
This PROMPT command displays the following user prompt when the value of motor is 3.
Start motor #3 (Y/N)?
Related Keywords
PROMPT
TYPE
22353-000 Rev. C eV+3KeywordReferenceManual 93
3.1 Function Keywords

$ERROR

String function that returns the error message associated with the given error code.
Syntax
$ERROR (error_code)
Parameter
error_code Real-valued expression, with a negative value, that
identifies an error condition.
Details
Any error code returned by the IOSTAT function or by message string and also by the ERROR real-valued function can be converted into their corresponding eV+ error message strings with this function. The ERROR real-valued function must be used to determine the variable portion of the error message for an error code less than or equal to -1000.
Refer to the eV+3 User'sManual (Cat.No. I651) for a list of all the eV+ error mes- sages and their error codes.
Example
The following example displays an error message if an I/O error occurs:
READ (5) $input IF IOSTAT(5) < 0 THEN
TYPE "I/O error during read: ", $ERROR(IOSTAT(5)) HALT
END
Related Keywords
ERROR
IOSTAT
REACTE
94 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details

ERROR

Real-valued function that returns the message number of a recent system mes­sage that caused program execution to stop or caused a REACTE operation.
Syntax
ERROR (source, select)
Usage Considerations
Executing a REACTE statement clears any system messages for the current task and prevents the ERROR function from returning messages as expected.
A first-in-first-out buffer is available that receives all asynchronous messages that occur from the time an enable high power request is issued until power is dis­abled for any reason. The buffer is accessed using the this function.
The asynchronous message buffer is not valid while the robot is in the power­down initialization state. User programs should wait until STATE(1) <> 0 before calling this function with a source parameter > 1000.
Additional Information: Refer to the eV+3 User'sManual (Cat.No. I651) for error details.
22353-000 Rev. C eV+3KeywordReferenceManual 95
3.1 Function Keywords
Parameters
96 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
source Real value, variable, or expression interpreted as an integer whose
value selects the source of the message code as follows.
-2 Return additional message code for current robot.
ERROR(-2, 0) Returns the standard eV+ message
ERROR(-2, 1) Returns the motor mask for the cur-
rent robot. This bit mask indicates the motor(s) referenced for the mes­sage number returned by the state­ment ERROR(-2,0). The LSB indicates motor 1, etc. If the state­ment ERROR(-2, 1)=0, the message is not associated with a specific motor.
-1 Return the number of the most recent message from the program in which the ERROR function is executed.
0 Return the number of the most recent message from
the program executing as task 0.
0 < source ≤ 63
Return the number of the most recent message from the program executing as the corresponding task number.
1001 < source < 1021
Asynchronous first-in-first-out buffer element n­1000, where n represents the following,
1 Most recent item
2 Next recent item, etc.
Returns 0 if no more first-in-first-out buffer elements exist. Valid select parameter values for the first-in­first-out buffer are 0, 1, and 3.
The asynchronous first-in-first-out buffer is not valid while the robot is in power-down initialization state. User programs should wait until STATE(1) returns a nonzero value before using ERROR with source >
1000.
2000 Returns the last eV+ system message.
2001 to 2008
Returns the last message associated with a specific robot where 2001 to 2008 corresponds with robots 1 to 8.
22353-000 Rev. C eV+3KeywordReferenceManual 97
3.1 Function Keywords
select Optional real value, variable, or expression interpreted as an
integer that selects the message information to be returned. The value 0 is assumed if this parameter is omitted.
0 Return the message number of the most recent pro-
1 If the most recent message for the specified program
gram execution error excluding I/O errors. Refer to IOSTAT for the specified program task.
task had a code in the range -1100 to -1199, return the variable part of the corresponding message as a numeric value. If the most recent message had an error code in the range -1000 to -1099, return the variable portion of the corresponding message as a bit mask indicating the joints or motors to which the message applies. Zero is returned if the message did not have a variable portion in its message. Refer to see select = 3 below.
2
3 Return the number of the robot associated with the
Details
Return the message number of the most recent mes-
sage from an MCS Program command executed by
the specified program task.
most recent message for the specified program task. Zero is returned if the message was not associated with a specific robot. Refer to select = 1.
An eV+ task can access any messages that result in robot power being disabled. These include the asynchronous messages that previously were output only to the Monitor Window.
This function is useful in a REACTE subroutine program to determine why the REACTE was triggered.
NOTE: The ERROR function does not report errors reported by the IOSTAT function.
Refer to the eV+3 User'sManual (Cat.No. I651) for a list of all the eV+ system mes- sages and their error numbers.
When the select parameter is 1, the value returned by this function should be interpreted as a 6-bit numeric value. The following example illustrates how the value should be interpreted.
Example
The example below will return the message corresponding to an error code where the following conditions are present.
98 eV+3KeywordReferenceManual 22353-000 Rev. C
Chapter 3: Keyword Details
l "code" is the basic error code from ERROR(n) or IOSTAT(lun) for example. l "vcode" is the variable part of the error code from ERROR (n,1) for
example.
l "robot" is the number of the robot associated wiht the error from ERROR
(n,3) for example.
l "$msg" is the corresponding error message. This may be null.
.PROGRAM error.string(code, vcode, robot, $msg)
AUTO i, n $msg = "" IF code < 0 THEN
$msg = $ERROR(code)
IF (-1100 < code) AND (code <= -1000) THEN
n = 1 FOR i = 1 TO 7
IF vcode BAND n THEN
$msg = $msg+$ENCODE(i) END n = 2*n
END
END
IF (-1200 < code) AND (code <= -1100) THEN
END
IF robot AND (SELECT(ROBOT,-1) > 1) THEN
END
END
RETURN
.END
Related Keywords
$ERROR
IOSTAT
MCS
REACTE
$msg = $msg+$ENCODE(vcode)
$msg = $msg+" (Robot"+$ENCODE(robot)+")"
22353-000 Rev. C eV+3KeywordReferenceManual 99
3.1 Function Keywords

FALSE

Real-valued function that returns the value used by eV+ to represent a logical false result.
Syntax
FALSE
Details
This named constant is useful for situations where true and false conditions need to be specified. The value returned is 0.
Example
The following example program loop will execute continuously until the sub­routine cycle returns a FALSE value for the real variable "continue".
DO
CALL cycle(continue)
UNTIL continue == FALSE
Related Keywords
OFF
ON
TRUE
100 eV+3KeywordReferenceManual 22353-000 Rev. C
Loading...