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 construed as a commitment by Omron Robotics and Safety Technologies, Inc. The documentation is periodically 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: Introduction13
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 Designations16
Numeric Parameters16
COctober, 2020Updates for Viper robots and minor corrections
ReleaseDateDetails
22353-000 Rev. CeV+3KeywordReferenceManual11
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 creating 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 theeV+3 User'sManual (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 Integrated CPUUnit 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 TypeUsage
FunctionkeywordsUsed to return values from the eV+ Operating System.
Monitor command
keywords
Program command
keywords
System parameter
keyword
System switch
keywords
Other keywordsUsed to specify units when using the SPEEDprogram command
1.1 Intended Audience
This manual is intended for the following personnel, who must also have knowledge of common 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 create Monitor Commandprograms.
Used to command operations in V+ Programs.
Used to manipulate systemparameters in V+ Programs or with the
Monitor Window.
Used to manipulate system switches in V+ Programs or with
theMonitor Window.
keyword.
Refer to the eV+3 User'sManual (Cat.No. I651) for more inform-
ation.
22353-000 Rev. CeV+3KeywordReferenceManual13
1.2 Related Manuals
!
!
!
1.2 Related Manuals
Use the following related manuals for reference.
ManualDescription
eV+3 User'sManual (Cat.No. I651)Provides information that is necessary to use
Table 1-2. Related Manuals
eV+.
Sysmac Studio Robot Integrated System Building Function with Robot Integrated CPU Unit
Operation Manual (Cat. No. W595)
Robot User GuidesUser Guide for the robot in use.
T20 Pendant User's Manual (Cat. No. I601)Describes the use of the optional T20 manual
Robot Safety Guide (Cat. No. I590)Contains safety information forOMRON 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 Integrated 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.
14eV+3KeywordReferenceManual22353-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.
KEYWORDRequired and must be entered exactly as shown.
req_param1Required and must be replaced with a value, variable, or expres-
=Assignment operator. If required, follows the keyword and / or
req_param2Required 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_param2Optional and if used, must be replaced with a value, variable, or
1.6 Keyword Parameters
This section describes parameters and how they are used withkeyword 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. CeV+3KeywordReferenceManual15
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 program names.
Numeric Parameters
Several types of numeric parameters can appear in keyword syntax. For each type of parameter, the value can generally be specified by a numeric constant, a variable name, or a mathematical 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 theIPS 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 appropriate robot user's guide and the eV+3 User'sManual (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 -
16eV+3KeywordReferenceManual22353-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. CeV+3KeywordReferenceManual17
Chapter 2: Keyword QuickReference
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.
KeywordDescriptionReference
ABSReal-valued function that returns the absolute value (mag-
nitude) of the argument provided.
ACCELReal-valued function that returns the current setting for robot
acceleration, deceleration, or the maximum allowable percentage limits defined in the robot configuration profile.
ACOSReal-valued function that returns the arc cosine of its argu-
ment.
ALIGNTransformation function that aligns the input location with the
nearest axis of the world coordinate system.
ASCReal-valued function that returns an ASCII character value
from within a string.
ASINReal-valued function that returns the arc sine of its argument.Page 46
ATAN2Real-valued function that returns the size of the angle in
degrees that has its trigonometric tangent equal to value_
1/value_2.
BASETransformation function that returns the transformation value
that represents the translation and rotation set by the last
BASE program command or monitor command.
BCDReal-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
BELTReal-valued function that returns information about a con-
veyor belt being tracked with the conveyor tracking feature.
BITSReal-valued function that reads multiple digital signals and
returns the value corresponding to the binary bit pattern.
BMASKReal-valued function that creates a bit mask by setting indi-
vidual bits.
BSTATUSReal-valued function that returns information about the status
of the conveyor tracking system.
CASReal-valued function that compares a real variable to a test
value and conditionally sets a new value as one indivisible operation.
Page 52
Page 54
Page 56
Page 57
Page 59
22353-000 Rev. CeV+3KeywordReferenceManual19
2.1 Function Keyword Summary
KeywordDescriptionReference
$CHRString function that returns a one-character string cor-
responding to a given ASCII value.
COMPerform the binary complement operation on a value.Page 61
CONFIGReal-valued function that returns a value providing information
about the robot's geometric configuration or the status of the
motion servo control features.
COSReal-valued function that returns the trigonometric cosine of a
given angle.
CUBRTReal-valued function that returns the cube root of a value.Page 69
$DBLBString function that returns an 8-byte string containing the bin-
ary representation of a real value in double-precision IEEE 754
floating-point format.
DBLBReal-valued function that returns the value of eight bytes of a
string interpreted as an IEEE double-precision floating-point
number.
DCBReal-valued function that converts BCD digits into an equi-
valent integer value.
$DECODEString 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
$DEFAULTString function that returns a string containing the current or
initial system default device, unit, and directory path for disk
file access.
DEFINEDReal-valued function that determines if a variable has been
defined.
DESTTransformation function that returns a transformation value
representing the planned destination location for the current
robot motion.
DEVICEReal-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.
DISTANCEReal-valued function that determines the distance between the
points defined by two location values.
DURATIONReal-valued function that returns the current setting for one of
the motion DURATION specifications.
DXReal-valued function that returns the X-axis component of a
given transformation value.
DYReal-valued function that returns the Y-axis component of a
given transformation value.
DZReal-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
20eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
ENCLATCHReal-valued function that returns the encoder position for any
encoder in the system at the occurrence of the last latch.
$ENCODEString function that returns a string created from output spe-
cifications.
$ERRORString function that returns the error message associated with
the given error code.
ERRORReal-valued function that returns the message number of a
recent system message that caused program execution to stop
or caused a REACTE operation.
FALSEReal-valued function that returns the value used by eV+ to rep-
resent a logical false result.
$FLTBString function that returns a 4-byte string containing the bin-
ary representation of a real value in single-precision IEEE floating-point format.
FLTBReal-valued function that returns the value of four bytes of a
string interpreted as an IEEE single-precision floating-point
number.
FRACTReal-valued function that returns the fractional part of the argu-
ment.
FRAMETransformation 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
FREEReal-valued function that returns the amount of unused free
memory of storage space.
GETCReal-valued function that returns the next character (byte)
from a device or input record on the specified logical unit.
GET.EVENTReal-valued function that return events that are set for the spe-
cified task.
HERETransformation function that returns a transformation value
that represents the current location of the robot tool point.
HOUR.METERReal-valued function that returns the current value of the
robot hour meter.
$IDString function that returns the system ID string.Page 113
IDReal-valued function that returns values that identify the con-
figuration of the current system.
IDENTICALReal-valued function that determines whether two location val-
ues are exactly the same.
INRANGEReal-valued function that returns a value that indicates if a spe-
cific location can be reached by the robot and provides additional information when a location cannot be reached.
$INTBString 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. CeV+3KeywordReferenceManual21
2.1 Function Keyword Summary
KeywordDescriptionReference
ary representation of a 16-bit integer.
INTReal-valued function that returns the integer part of the value.Page 128
INTBReal-valued function that returns the value of two bytes of a
string interpreted as a signed 16-bit binary integer.
INVERSETransformation function that returns the transformation value
that is the mathematical inverse of the given transformation
value.
IOSTATReal-valued function that returns status information for the
last input / output operation for a device associated with a
logical unit.
LASTReal-valued function that returns the highest index used for an
array (dimension).
LATCHTransformation function that returns a transformation value
representing the location of the robot at the occurrence of the
last external trigger.
LATCHEDReal-valued function that returns the status of the position
latch and which input triggered it.
LENReal-valued function that returns the number of characters in
the given string.
$LNGBString function that returns a 4-byte string containing the bin-
ary representation of a 32-bit integer.
LNGBReal-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
MAXReal-valued function that returns the maximum value con-
tained in the list of values.
$MIDString function that returns a substring of the specified string.Page 146
MINReal-valued function that returns the minimum value con-
tained in the list of values.
NETWORKReal-valued function that returns network status and
IPaddress information of the robot controller.
NORMALTransformation function that corrects a transformation for any
mathematical round-off errors.
NOTOperator that performs logical negation of a value.Page 151
NULLTransformation function that returns a null transformation
value (one with all zero components).
OFFReal-valued function that returns the value used by eV+ to rep-
resent a logical false result.
ONReal-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
22eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
OUTSIDEReal-valued function that tests a value to determine if it is out-
side a specified range.
PARAMETERReal-valued function that returns the current setting of the
named system parameter.
#PDESTPrecision-point function that returns a precision-point value rep-
resenting the planned destination location for the current robot
motion.
#PHEREPrecision-point function that returns a precision-point value rep-
resenting the current location of the currently selected robot.
PIReal-valued function that returns the value of the math-
ematical constant pi (3.141593).
#PLATCHPrecision-point function that returns a precision-point value rep-
resenting the location of the robot at the occurrence of the last
external trigger.
POSReal-valued function that returns the starting character pos-
ition of a substring in a string.
#PPOINTPrecision- point function that returns a precision-point value
composed from the given components.
PRIORITYReal-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
RANDOMReal-valued function that returns a pseudo-random number.Page 165
RXTransformation function that returns a transformation describ-
ing a rotation about the X-axis.
RYTransformation function that returns a transformation describ-
ing a rotation about the Y-axis.
RZTransformation function that returns a transformation describ-
ing a rotation about the Z-axis.
SCALETransformation function that returns a transformation value
equal to the transformation parameter with the position scaled
by the scale factor.
SELECTReal-valued function that returns information about the device
specified for the currently selected task. .
#SET.POINTPrecision point function that returns the commanded joint-
angle positions computed by the trajectory generator during
the last trajectory-evaluation cycle.
SHIFTTransformation function that returns a transformation value
resulting from shifting the position of the transformation parameter by the given shift amounts.
SIG.INSReal-valued function that returns an indication of whether a
digital I/O signal is installed in the system or whether a software 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. CeV+3KeywordReferenceManual23
2.1 Function Keyword Summary
KeywordDescriptionReference
SIGNReal-valued function that returns the value 1, with the sign of
the value parameter.
SIGReal-valued function that returns the logical AND of the states
of the indicated digital signals.
SINReal-valued function that returns the trigonometric sine of a
given angle.
SOLVE.FLAGSReal-valued function that returns bit flags representing the
robot configuration specified by an array of joint positions.
SPEEDReal-valued function that returns one of the system motion
speed factors.
SQRTReal-valued function that returns the square root of the para-
meter.
SQRReal-valued function that returns the square of the parameter.Page 186
STATEReal-valued function that returns a value to provide inform-
ation about the robot system state.
STATUSReal-valued function that returns status information for an
application program.
STRDIFReal-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
SWITCHReal-valued function that returns information about the set-
ting of a system switch.
TANReal-valued function that returns the trigonometric tangent of
a given angle.
TASReal-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.
TASKReal-valued function that returns information about a program
execution task.
$TIMEString function that returns a string value containing either the
current system date and time or the specified date and time.
$TIME4String function that returns a string value containing either the
current system four-digit date and time or the specified fourdigit date and time.
TIMEReal-valued function that returns an integer value rep-
resenting either the date or the time specified in the given
string parameter.
TIMERReal-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
TOOLTransformation function that returns the value of the trans-Page 216
24eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
formation specified in the last TOOL operation.
TPSReal-valued function that returns the number of ticks of the
system clock that occur per second (Ticks Per Second).
TRANSTransformation function that returns a transformation value
computed from the given X, Y, Z position displacements and y,
p, r orientation rotations.
$TRANSBString function that returns a 48-byte string containing the bin-
ary representation of a transformation value.
TRANSBTransformation function that returns a transformation value
represented by a 48-byte or 96-byte string.
TRUEReal-valued function that returns the value used by eV+ to rep-
resent a logical true result.
$TRUNCATEString function that returns all characters in the input string
until an ASCII NUL (or the end of the string) is encountered.
$UNPACKString function that returns a substring from an array of 128-
character string variables.
VALReal-valued function that returns the real value represented by
the characters in the input string.
VLOCATIONTransformation 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
VPARAMETERTransformation function that returns the current value of a vis-
ion tool parameter.
VRESULTReal-valued function that returns a specified result of a vision
tool, or returns the status of a specified tool.
VSTATEReal-valued function that returns the state of the execution of
a sequence.
WINDOWReal-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.
KeywordDescriptionReference
ABORTMonitor command that terminates execution of an execut-
able program.
BASEMonitor command that translates and rotates the world ref- Page 240
Page 230
Page 232
Page 234
Page 235
Page 238
22353-000 Rev. CeV+3KeywordReferenceManual25
2.2 Monitor Command Keyword Summary
KeywordDescriptionReference
erence frame relative to the robot.
CALIBRATEMonitor command that initializes the robot positioning sys-
tem.
CDMonitor command that displays or changes the default path
for disk access.
COMMANDSMonitor command that initiates processing of a Monitor
Commandprogram.
COPYMonitor command that creates a new program as a copy of
an existing program.
CYCLE.ENDMonitor 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 program until a program completes execution.
DEFAULTMonitor 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.
DELETEMonitor command that deletes the specified programs from
the system memory.
DELETELMonitor command that deletes the named location vari-
ables from the system memory.
DELETEMMonitor 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
DELETEPMonitor command that deletes the named programs from
the system memory.
DELETERMonitor command that deletes the named real-valued vari-
ables from the system memory.
DELETESMonitor command that deletes the named string variables
from the system memory.
DIRECTORYMonitor command that displays the names of some or all of
the programs in the system memory.
DISABLEMonitor command that turns OFF one or more system
switches.
DOMonitor 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.
ENABLEMonitor command that turns ON one or more system
switches.
ESTOPMonitor command that stops the robot in the same manner
as if an emergency stop signal was received.
EXECUTEMonitor 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
26eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
gram.
FCOPYMonitor command that copies the information in an existing
disk file to a new disk file.
FDELETEMonitor command that deletes one or more disk files match-
ing the given file specification.
FDIRECTORYMonitor 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.
FLISTMonitor command that lists the contents of the specified
disk file on the Monitor Window.
FREEMonitor command that displays the percentage of available
system memory not currently in use.
FRENAMEMonitor command that changes the name of a disk file.Page 293
FSETMonitor command that sets or modifies attributes of a net-
work device.
HEREMonitor command that defines the value of a trans-
formation or precision-point variable to be equal to the current robot location.
IDMonitor 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
IOMonitor command that displays the current states of
external digital input / output signals or internal software
signals.
JOGMonitor 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.
KILLMonitor command that clears a program execution stack
and detaches any I/O devices that are attached.
LISTMonitor command that displays the value of the expression. Page 307
LISTLMonitor command that displays the values of the listed loc-
ations.
LISTPMonitor command that displays all the steps of the listed
user programs.
LISTRMonitor command that displays the values of the real
expressions specified.
LISTSMonitor command that displays the values of the specified
strings.
LOADMonitor 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. CeV+3KeywordReferenceManual27
2.2 Monitor Command Keyword Summary
KeywordDescriptionReference
MDIRECTORYMonitor 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.
MODULEMonitor command that creates a new program module, or
modifies the contents of an existing module.
NETMonitor command that displays status information about
the network. Also displays details about the remote mounts
that are currently defined in the eV+ system.
PANICMonitor command that simulates an external E-stop button
press, stops all robots immediately but does not turn
OFFrobot high power.
PARAMETERMonitor command that sets or displays the values of
systemparameters.
PINGMonitor command that tests the network connection to a
node.
PRIMEMonitor command that prepares a program for execution
but does not start execution.
PROCEEDMonitor command that resumes execution of an application
program.
RENAMEMonitor 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
RESETMonitor command that will turn OFFall the digital output
signals.
RESET.LOCKMonitor command that detaches a robot from the applic-
ation program.
RETRYMonitor command that repeats execution of the last inter-
rupted statement and continues execution of the program.
SELECTMonitor command that selects a robot for subsequent Mon-
itor Window operations
SIGNALMonitor command that turns ON or OFF digital output sig-
nals, internal software signals, or host signals.
SPEEDMonitor command that specifies monitor speed.Page 343
SRV.RESETMonitor command that restarts and resets eV+.Page 345
SSTEPMonitor command that executes a single step or an entire
subroutine of a control program.
STACKMonitor command that specifies the amount of system
memory reserved for a program task to use for subroutine
calls and automatic variables.
STATUSMonitor 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
28eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
STOREMonitor command that stores programs and variables in a
disk file.
STORELMonitor command that stores location variables in a disk
file.
STOREMMonitor command that stores a specified program module
to a disk file.
STOREPMonitor command that stores program files to a disk file.Page 360
STORERMonitor command that stores real variables in a disk file.Page 362
STORESMonitor command that stores a string variable in a disk file.Page 364
SWITCHMonitor command that displays the settings of system
switches in theMonitor Window.
TESTPMonitor command that tests for the presence of the named
program in the system memory.
TOOLMonitor 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.STARTMonitor command that puts a Monitor Commandprogram
into a wait state until a condition is satisfied.
Page 354
Page 356
Page 358
Page 366
Page 368
Page 369
Page 371
WHEREMonitor command that displays the current location of the
robot and the hand opening.
XSTEPMonitor command that executes a single step of a program.Page 374
ZEROMonitor 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 command, program command, system parameter, or system switch keywords.
KeywordDescriptionReference
.ENDKeyword that marks the end of an eV+ program.Page 379
IPSSpecify the units for a SPEED program command as inches
per second.
MMPSSpecify 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. CeV+3KeywordReferenceManual29
2.4 Program Command Keyword Summary
KeywordDescriptionReference
ABORTTerminate execution of an executing program task.Page 382
ABOVERequest a change in the robot configuration during the
next motion so that the elbow is above the line from the
shoulder to the wrist.
ACCELSet acceleration and deceleration for robot motions and
optionally specify a defined acceleration profile.
ALIGNAlign the robot tool Z-axis with the nearest world axis.Page 389
ALTERSpecify the magnitude of the real-time path modification
that is to be applied to the robot path during the next trajectory computation.
ALTONEnable real-time path-modification mode (alter mode) and
specify the way in which alter coordinate information will
be interpreted.
ANYSignal the beginning of an alternative group of commands
for the CASE structure.
APPROStart a robot motion toward a location defined relative to
specified location with joint-interpolated motion.
APPROSStart 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
ATTACHMake a device available for use by the application program.Page 398
AUTODeclare temporary variables that are automatically created
on the program stack when the program is entered.
BASETranslate and rotate the world reference frame relative to
the robot.
BELOWRequest a change in the robot configuration during the
next motion so that the elbow is below the line from the
shoulder to the wrist.
BITSSet or clear a group of digital signals based on a value.Page 409
BRAKEAbort the current robot motion.Page 411
BREAKSuspend program execution until the current motion com-
pletes.
BYCompletes the syntax of theSCALE andSHIFT functions.Page 414
CALIBRATEInitialize the robot positioning system with the robot's cur-
rent position.
CALLSuspend execution of the current program and continue
execution with a new subroutine program.
CALLSSuspend 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
30eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
string value.
CASEInitiate processing of a CASE structure by defining the
value of interest.
CLEAR.EVENTClear an event associated with the specified task.Page 427
CLEAR.LATCHESEmpties the latch buffer for the selected device.Page 428
COARSEEnable a low-precision nulling tolerance for the robot.Page 429
CPOFFInstruct 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.
CPONInstruct the eV+ system to execute the next motion oper-
ations (or all subsequent motion operations) as part of a
continuous path.
CYCLE.ENDTerminate the executing program in the specified task the
next time it executes a STOP program command (or its
equivalent).
DECOMPOSEExtract the real values of individual components of a loc-
ation value.
DEF.DIOAssign virtual digital I/O to standard eV+ signal numbers
for use by keywords.
DEFBELTDefine a belt variable for use with a conveyor tracking
robot.
Page 424
Page 431
Page 433
Page 435
Page 437
Page 439
Page 441
DEPARTStart a robot motion away from the current location with
joint-interpolated motion.
DEPARTSStart a robot motion away from the current location with
straight-line motion.
DETACHRelease a specified device from the control of the applic-
ation program.
DISABLETurn OFF one or more system switches.Page 449
DOIntroduce a DO program structure.Page 451
DOSExecute a keyword defined by a string expression.Page 453
DRIVEExecute a keyword defined by a string expression.Page 453
DURATIONSet the minimum execution time for subsequent robot
motions.
ELSESeparate the alternate group of statements in an IF ...
THEN control structure.
ENABLETurn ON one or more system switches.Page 460
ENDMark the end of a control structure.Page 462
Page 443
Page 445
Page 447
Page 457
Page 459
22353-000 Rev. CeV+3KeywordReferenceManual31
2.4 Program Command Keyword Summary
KeywordDescriptionReference
ESTOPStop the robot in the same manner as if an emergency-
stop signal was received.
EXECUTEBegin execution of a control program.Page 465
EXITBranch to the statement following the nth nested loop of a
control structure.
EXTERNALDeclare a variable that is shared between eV+ and the NJ-
series Robot Integrated CPUUnit.
FCLOSEClose the disk file currently open on the specified logical
unit.
FCMNDGenerate a device-specific command to the input / output
device specified by the logical unit.
FCOPYCopy the information in an existing disk file to a new disk
file.
FDELETEDelete the specified disk file.Page 479
FEMPTYEmpty any internal buffers in use for a disk file by writing
the buffers to the file if necessary.
FINEEnable a high-precision nulling tolerance for the robot.Page 483
FLIPRequest 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
FOPENCreate and open a new TCPconnection.Page 488
FOPENAOpens a file for read-write-append access. If the specified
file does not already exist, the file is created.
FOPENDOpens a disk directory for reading.Page 494
FOPENROpens a file for read-only access.Page 497
FOPENWOpens a file for read-write access. If the file already exists,
an error occurs.
FORExecute a program loop a specified number of times.Page 503
FSEEKPosition a file open for random access and initiate a read
operation on the specified record.
FSETSet or modify attributes of a network device.Page 507
GLOBALDeclare a variable to be global and specify the type of the
variable.
GOTOPerform an unconditional branch to the program step iden-
tified by the given label.
HALTStop program execution and do not allow the program to
be resumed.
Page 491
Page 500
Page 505
Page 509
Page 511
Page 512
32eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
HERESet the value of a transformation or precision-point vari-
able equal to the current robot location.
IF ... GOTOBranch to the specified step label if the value of the logical
expression is TRUE (non-zero).
IF ... THENConditionally execute a group of keywords (or one of two
groups) depending on the result of a logical expression.
IGNORECancel the effect of a REACT or REACTI program com-
mand.
JMOVEMoves all robot joints to positions described by a list of joint
values. The robot performs a coordinated motion in jointinterpolated mode.
JOGJogs the specified joint of the robot or moves the robot tool
along the specified cartesian direction.
KEYMODESet the behavior of a group of keys on the pendant.Page 525
KILLClear a program execution stack and detach any I/O
devices that are attached.
LEFTYRequest 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
LOCALDeclare permanent variables that are defined only within
the current program.
LOCKSet the program reaction lock-out priority to the value
given.
MCIntroduce a monitor command within a Monitor
Commandprogram.
MCSInvoke a monitor command from an application program.Page 536
MOVEInitiate a robot motion to the position and orientation
described by the given location with joint-interpolated
motion.
MOVECInitiate a circular / arc-path robot motion using the pos-
itions and orientations described by the given locations.
MOVESInitiate a robot motion to the position and orientation
described by the given location with straight-line motion.
MULTIPLEAllow full rotations of the robot wrist joints.Page 538
NEXTBranch to the END statement of the nth nested loop, per-
form the loop test, and loop if appropriate.
NOFLIPRequest a change in the robot configuration during the
next motion so the pitch angle of the robot wrist has a positive value.
Page 530
Page 532
Page 534
Page 539
Page 540
Page 547
Page 548
Page 549
22353-000 Rev. CeV+3KeywordReferenceManual33
2.4 Program Command Keyword Summary
KeywordDescriptionReference
NONULLInstruct the eV+ system to not wait for position errors to
be nulled at the end of continuous-path motions.
NOOVERLAPInstruct the eV+ system to not wait for position errors to
be nulled at the end of continuous-path motions.
NULLInstruct the eV+ system to wait for position errors to be
nulled at the end of continuous path motions.
OVERLAPDisable the NOOVERLAP limit-error checking either for the
next motion or for all subsequent motions.
PACKReplace a substring within an array of (128-character)
string variables, or within a (non-array) string variable.
PANICSimulate an external E-Stop button press to stop all robots
immediately, but do not turn off high power.
PARAMETERSet the value of a systemparameter.Page 561
PAUSEStop program execution but allow the program to be
resumed.
PDNT.CLEARClears 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.NOTIFYCreates a pendant notification.Page 565
Page 550
Page 550
Page 554
Page 556
Page 558
Page 560
Page 563
Page 564
PDNT.WRITESets the pendant's Custom Message screen.Page 566
PENDANTReturn input from the manual control pendant.Page 568
PROCEEDResume execution of an application program.Page 571
.PROGRAMDefine the arguments that are passed to a program when
it is invoked.
PROMPTDisplay a string on the Monitor Window and wait for oper-
ator input.
REACTInitiate continuous monitoring of a specified digital signal
and automatically trigger a subroutine call if the signal
transitions.
REACTEInitiate the monitoring of system messages that occur dur-
ing execution of the current program task.
REACTIInitiate continuous monitoring of a specified digital signal.
Automatically stop the current robot motion if the signal
transitions properly and optionally trigger a subroutine call.
READRead 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.
READYMove the robot to the ready location.Page 589
Page 573
Page 576
Page 578
Page 581
Page 583
Page 585
34eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 2: Keyword QuickReference
KeywordDescriptionReference
RELEASEAllow the next available program task to run.Page 591
RESETTurn OFF all external output signals.Page 592
RETRYRepeat execution of the last interrupted program com-
mand and continue execution of the program.
RETURNTerminate execution of the current subroutine and
resume execution of the suspended program at its next
step.
RETURNETerminate 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.
RIGHTYRequest 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.
RUNSIGTurn ON or OFF the specified digital signal as long as exe-
cution of the invoking program task continues.
SELECTSelect a unit of the named device for access by the current
task.
SET.EVENTSet an event associated with the specified task.Page 603
SETSETPage 604
SETBELTSet 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
SETDEVICEInitialize a device or set device parameters. The operation
performed depends on the device referenced.
SIGNALTurn ON or OFF external digital output signals or internal
software signals.
SINGLELimit rotations of the robot wrist joint to the range -180
degrees to +180 degrees.
SOLVE.ANGLESCompute the robot joint positions for the current robot
that are equivalent to a specified transformation.
SOLVE.TRANSCompute the transformation equivalent to a given set of
joint positions for the current robot.
SPEEDSet the nominal speed for subsequent robot motions.Page 622
STOPTerminate execution of the current program cycle.Page 625
SWITCHEnable or disable a system switch based on a value.Page 626
TIMERSet the specified system timer to the given time value.Page 628
TOOLSet 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. CeV+3KeywordReferenceManual35
2.5 System Parameter Keyword Summary
KeywordDescriptionReference
TYPEDisplay the information described by the output spe-
cifications on the Monitor Window.
UNTILIndicate 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.
VALUEIndicate the values that a CASE statement expression
must match in order for the program statements immediately following to be executed.
VPARAMETERSets the current value of a vision tool parameter.Page 635
VRUNInitiates the execution of a vision sequence.Page 637
VWAITIWaits until the specified vision sequence reaches the state
specified by the type parameter.
WAITPut the program into a wait loop for one trajectory cycle. If
a condition is specified, wait until the condition is TRUE.
WAIT.EVENTSuspend program execution until a specified event has
occurred or until a specified amount of time has elapsed.
WHILEInitiate 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
WINDOWSet the boundaries of the operating region of the specified
belt variable for conveyor tracking.
WRITEWrite 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.
KeywordDescriptionReference
BELT.MODESystem parameter that sets the characteristics of the con-
veyor tracking feature of the eV+system.
DEVIATIONAdds a path deviation from 1 to 100% to the motion in the
singularity region when a robot is in singularity.
JOG.TIMESystemparameter that sets the keep-alive time of a jog oper-
ation.
NOT.CALIBRATED Systemparameter that indicates or asserts the calibration
status of the robots connected to the system.
VTIMEOUTSystemparameter 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
36eV+3KeywordReferenceManual22353-000 Rev. C
KeywordDescriptionReference
ion command.
2.6 System Switch Keyword Summary
The table below provides a summary of all systemswitch keywords.
KeywordDescriptionReference
Chapter 2: Keyword QuickReference
AUTO.POWER.OFF This system switch disables high power when certain
motion errors occur.
CPSystem switch that controls the continuous-path function
of a robot.
DECEL.100SystemSwitch that enables or disables the maximum decel-
eration of 100% for the ACCEL program command
keyword.
DELAY.IN.TOLSystem switch that controls the timing of coarse or fine
nulling after the eV+ system completes a motion segment.
DRY.RUNSystem switch that controls whether or not eV+ com-
municates with the robot.
MESSAGESSystemSwitch to enable or disable output to the Monitor
Window from TYPE Program Commands.
OBSTACLESystem Switch that enables or disables up to four obstacles
for a selected robot.
POWERSystem Switch that controls or monitors the status of the
robot high power.
ROBOTSystem 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.ACCELSystem 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 rotational speed during straight-line motions.
UPPERSystem switch that controls whether or not the case of
each character is ignored when string comparisons are performed.
Page 673
Page 675
Page 676
22353-000 Rev. CeV+3KeywordReferenceManual37
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. CeV+3KeywordReferenceManual39
3.1 Function Keywords
ACCEL
Real-valued function that returns the current setting for robot acceleration, deceleration, or the maximum allowable percentage limits defined in the robot configuration profile.
Syntax
ACCEL (value)
Usage Considerations
The ACCEL 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
valueReal-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 setting 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)
40eV+3KeywordReferenceManual22353-000 Rev. C
SELECT (program command)
Chapter 3: Keyword Details
22353-000 Rev. CeV+3KeywordReferenceManual41
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 values. The LISTR monitor command will display real values to full
precision.
Related Keywords
COS
42eV+3KeywordReferenceManual22353-000 Rev. C
SIN
ASIN
TAN
ATAN2
Chapter 3: Keyword Details
22353-000 Rev. CeV+3KeywordReferenceManual43
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
locationTransformation 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)
44eV+3KeywordReferenceManual22353-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
stringString expression from which the character is to be picked. If
the string is empty, the function returns the value -1.
indexOptional 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. CeV+3KeywordReferenceManual45
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
valueReal-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 precision.
Related Keywords
COS
46eV+3KeywordReferenceManual22353-000 Rev. C
ACOS
SIN
TAN
ATAN2
Chapter 3: Keyword Details
22353-000 Rev. CeV+3KeywordReferenceManual47
3.1 Function Keywords
ATAN2
Real-valued function that returns the size of the angle in degrees that has its trigonometric 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_1Real-valued expression.
value_2Real-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 trigonometric 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 precision.
Related Keywords
COS
ACOS
SIN
48eV+3KeywordReferenceManual22353-000 Rev. C
ASIN
TAN
Chapter 3: Keyword Details
22353-000 Rev. CeV+3KeywordReferenceManual49
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 command.
Syntax
BASE
Usage Considerations
The BASE function returns information for the robot selected by the task executing 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 BASEprogram command 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)
50eV+3KeywordReferenceManual22353-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
valueReal-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. CeV+3KeywordReferenceManual51
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 specified 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_varThe 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 (%).
modeControl 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).
52eV+3KeywordReferenceManual22353-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. CeV+3KeywordReferenceManual53
3.1 Function Keywords
BITS
Real-valued function that reads multiple digital signals and returns the value corresponding 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 referenced.
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_sigReal-valued expression defining the lowest-numbered sig-
nal to be read.
num_sigsOptional real-valued expression specifying the number of
signals to be affected. A value of 1 is assumed if none is specified. 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-significant 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.
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
54eV+3KeywordReferenceManual22353-000 Rev. C
RESET
SIG
SIG.INS
SIGNAL (monitor command)
SIGNAL (program command)
Chapter 3: Keyword Details
22353-000 Rev. CeV+3KeywordReferenceManual55
3.1 Function Keywords
BMASK
Real-valued function that creates a bit mask by setting individual bits.
Syntax
BMASK (bit, bit, ..., bit)
Parameter
bitInteger 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 diskLUN
with mode bit 2 turned ON.
bm = BMASK(1, 5)
mode = BMASK(2)
ATTACH (lun, mode) "DISK"
56eV+3KeywordReferenceManual22353-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 systemparameter 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 2Destination 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 3Destination 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 4Window 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. CeV+3KeywordReferenceManual57
3.1 Function Keywords
PARAMETER (monitor command)
PARAMETER (Program command)
PARAMETER (real-valued function)
WINDOW (program command)
WINDOW (real-valued function)
58eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
CAS
Real-valued function that compares a real variable to a test value and conditionally 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'sManual (Cat.No. I651) for more information about global array access
restriction.
Parameters
variableName of the real-valued variable to be tested and
assigned the new value given.
test_valueReal value, variable, or expression that defines the com-
parison value.
new_valueReal 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. CeV+3KeywordReferenceManual59
3.1 Function Keywords
$CHR
String function that returns a one-character string corresponding to a given ASCII
value.
Syntax
$CHR(value)
Parameter
valueReal-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 corresponding 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
60eV+3KeywordReferenceManual22353-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
valueReal-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 fractional 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'sManual (Cat.No. I651).
Examples
The following example returns the value of -41.
COM 40
Related Keywords
NOT
22353-000 Rev. CeV+3KeywordReferenceManual61
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
selectOptional 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 interpretation 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
483for 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 functionality apply when using COARSE with the ALWAYS parameter. Refer to
COARSE on page 429for 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.
62eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
select = 1
This returns the configuration the robot will achieve at the completion of the current 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 #
11Robot has righty configuration.
22Robot has below configuration.
34Robot 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 MaskIndication if bit CLEARBit SET
11NoneNone
22FINE assertedCOARSE asserted
34NULL assertedNONULL asserted
48MULTIPLE assertedSINGLE asserted
5^H10CPON assertedCPOFF asserted
22353-000 Rev. CeV+3KeywordReferenceManual63
3.1 Function Keywords
Bit#Bit MaskIndication if bit CLEARBit SET
6^H20OVERLAP assertedNOOVERLAP asserted
select = 6
This returns the FINE tolerance as the permanent setting as a percentage of the
standard tolerance.
select = 7
This returns FINEtolerance as the setting used for the previous or current motion
as a percentage of the standard tolerance.
Select = 8
This returns FINEtolerance as the setting to be used for the next motion as a percentage of the standard tolerance.
select = 9
This returns COARSEtolerance as the permanent setting as a percentage of the
standard tolerance.
select = 10
This returns COARSEtolerance as the setting used for the previous or current
motion as a percentage of the standard tolerance.
select = 11
This returns the COARSEtolerance 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 MaskIndication if bit set
11Robot can have lefty or righty configuration.
22Robot can have above or below configuration.
34Robot can have flipped or noflip configuration.
18^H20000Robot supports the OVERLAP and NOOVERLAP
keywords.
22^H200000Robot's last rotary joint can be limited to ±180
64eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
Bit #Bit MaskIndication 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 values returned are shown in the table below.
Bit #Bit MaskDescription
11This bit is set if the motionis 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 configuration.
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. CeV+3KeywordReferenceManual65
3.1 Function Keywords
SELECT (real-valued function)
SINGLE
STATE
66eV+3KeywordReferenceManual22353-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
angleReal-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 precision.
Related Keywords
ACOS
22353-000 Rev. CeV+3KeywordReferenceManual67
3.1 Function Keywords
SIN
ASIN
TAN
ATAN2
68eV+3KeywordReferenceManual22353-000 Rev. C
CUBRT
Real-valued function that returns the cube root of a value.
Syntax
CUBRT(value)
Parameters
valueReal-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.
RelatedKeywords
SQR
SQRT
22353-000 Rev. CeV+3KeywordReferenceManual69
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
valueReal-valued expression which is converted to its
IEEE 754 floating-point binary representation.
littleEndianOptional 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-precision standard floating-point format. This 64-bit value is packed as eight successive 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.
Bytes 1 and 2Bytes 3 and 4Bytes 5 and 6Bytes 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
$stringString expression that contains the eight bytes to be
converted.
first_charOptional 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.
littleEndianOptional 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-precision (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. CeV+3KeywordReferenceManual71
3.1 Function Keywords
Table 3-1. 64-Bit Floating Point Format Description
ItemDescription
SSign bit (0 = positive, 1 = negative)
ExponentBinary exponent, biased by -1023
FractionBinary 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.
ExponentFractionDescription
0ZeroZero value
0NonzeroDenormalized number
2047ZeroSigned infinity
2047NonzeroNot a number
The range for normalized numbers is approximately 2.2 x 10
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
valueReal 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 equivalent of the BCD input on the specified signals if external input signals 10011008 (8 bits of input) receive two BCD digits from an external device.
input = DCB(BITS(1001, 8))
Related Keywords
BITS
BCD
22353-000 Rev. CeV+3KeywordReferenceManual73
3.1 Function Keywords
$DECODE
String function that extracts part of a string as delimited by given break characters.
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_varString variable that contains the string to be scanned.
After the function is processed, this variable will contain 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 specified 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_expString constant, variable, or expression that defines
the individual break characters, which are to be considered 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.
modeOptional 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 function.
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
74eV+3KeywordReferenceManual22353-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 characters 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", assuming 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 substring 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 corresponding 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. CeV+3KeywordReferenceManual75
3.1 Function Keywords
ing the following statement results in the first four elements of the "value" array
getting the values shown below.
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 characters 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.
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
modeOptional 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 current 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.
deviceCan be one of the following.
DISKA local disk.
SYSTEMA disk device, drive, and subdirectory
path currently set with the DEFAULT
monitor command.
Additional Information: Refer to the
ATTACH command for more information on valid devices.
22353-000 Rev. CeV+3KeywordReferenceManual77
3.1 Function Keywords
disk_unitThe disk unit specified to the DEFAULT command.
The colon (:) is omitted if no unit was specified.
directory_pathAny 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
78eV+3KeywordReferenceManual22353-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_nameThe name of a location, string, or real variable. Both
scalar variables and array variables are permitted. A location 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, transformations) that are passed in the argument list of a CALL statement, 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 variable 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. CeV+3KeywordReferenceManual79
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 executing 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 precision-point location variable, the DEST function returns a
transformation value during that motion.
l
Motions to locations defined relative to named locations or defined relative 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 location 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 immediately, 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 reaction initiated by a REACTI keyword. The subroutine automatically invoked can
80eV+3KeywordReferenceManual22353-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. CeV+3KeywordReferenceManual81
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 parameters.
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
typeReal value, variable, or expression interpreted as an integer
that indicates the type of device being referenced. The following 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)
unitReal value that indicates the device unit number. The value
must be in the range 0 to -1, where -1 is the maximum number of devices of the specified type. The value should be 0 if
there is only one device of the given type.
errorOptional 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 execution. 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.
82eV+3KeywordReferenceManual22353-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.
latch.value = DEVICE(0,pick.encoder[0]-1,sts,4)
END
SETBELT %pick.belt[0] = latch.value
Related Keywords
SETDEVICE
22353-000 Rev. CeV+3KeywordReferenceManual83
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_1Transformation value that defines the first point of
interest. This can be a function, a variable, or a compound transformation.
location_2Transformation value that defines the second point of
interest. This can be a function, a variable, or a compound transformation.
Details
Returns the distance in millimeters between the points defined by the two specified 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
84eV+3KeywordReferenceManual22353-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
selectReal-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 program 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 values for this parameter are invalid.
SelectDURATION value returned
2Permanent minimum robot motion duration (set by a DURATION ...
ALWAYS statement)
3Temporary motion duration for the current or last motion.
4Temporary motion duration to be used for the next motion.
Examples
The following example will check if the DURATIONsetting is 2 using the realvalued function and if not, will set it to 2 using the program command.
SELECT ROBOT = 1
IFDURATION(2)<>2 THEN
DURATION 2 ALWAYS
END
22353-000 Rev. CeV+3KeywordReferenceManual85
3.1 Function Keywords
Related Keywords
CONFIG
DURATION (program command)
SELECT (program command)
SELECT (real-valued function)
86eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
DX
Real-valued function that returns the X-axis component of a given transformation value.
Syntax
DX (location)
Parameter
locationTransformation value from which a component is desired.
This can be a function, a variable, or a compound transformation.
Details
This function returns the respective X-axis component of the specified transformation value.
NOTE: The DECOMPOSE command can also be used to obtain
the displacement components of a transformation value. If the rotation 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. CeV+3KeywordReferenceManual87
3.1 Function Keywords
DY
Real-valued function that returns the Y-axis component of a given transformation value.
Syntax
DY (location)
Parameter
locationTransformation value from which a component is desired.
This can be a function, a variable, or a compound transformation.
Details
This function returns the respective Y-axis component of the specified transformation value.
NOTE: The DECOMPOSE command can also be used to obtain
the displacement components of a transformation value. If the rotation 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
88eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
DZ
Real-valued function that returns the Z-axis component of a given transformation value.
Syntax
DZ (location)
Parameter
locationTransformation value from which a component is desired.
This can be a function, a variable, or a compound transformation.
Details
This function returns the respective Z-axis component of the specified transformation value.
NOTE: The DECOMPOSE command can also be used to obtain
the displacement components of a transformation value. If the rotation 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. CeV+3KeywordReferenceManual89
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
selectOptional 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".
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 displayed.
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 values. 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 (*).
/DUse 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.mFormat 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. CeV+3KeywordReferenceManual91
3.1 Function Keywords
/Fn.mFormat values in fixed-point notation (for example, -123.4) in
fields n spaces wide, with m digits in the fractional parts.
/Gn.mFormat 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.
/HnFormat values as hexadecimal integers in fields n spaces
wide.
/InFormat values as decimal integers in fields n spaces wide.
/OnFormat values as octal integers in fields n spaces wide.
The following specifiers can be used to insert special characters in the
string.
/CnInclude the characters carriage return (CR) and line feed (LF)
n times.
If the string resulting from the $ENCODE function is output to the Monitor 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.
/UnInclude the characters necessary to move the cursor up n
lines if the resulting string is output to the Monitor Window.
/XnInclude 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.
92eV+3KeywordReferenceManual22353-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. CeV+3KeywordReferenceManual93
3.1 Function Keywords
$ERROR
String function that returns the error message associated with the given error
code.
Syntax
$ERROR (error_code)
Parameter
error_codeReal-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'sManual (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
94eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
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.
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 disabled for any reason. The buffer is accessed using the this function.
The asynchronous message buffer is not valid while the robot is in the powerdown 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'sManual (Cat.No.
I651) for error details.
22353-000 Rev. CeV+3KeywordReferenceManual95
3.1 Function Keywords
Parameters
96eV+3KeywordReferenceManual22353-000 Rev. C
Chapter 3: Keyword Details
sourceReal value, variable, or expression interpreted as an integer whose
value selects the source of the message code as follows.
-2Return 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 message number returned by the statement ERROR(-2,0). The LSB
indicates motor 1, etc. If the statement ERROR(-2, 1)=0, the message
is not associated with a specific
motor.
-1Return the number of the most recent message from
the program in which the ERROR function is
executed.
0Return 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 n1000, where n represents the following,
1Most recent item
2Next recent item, etc.
Returns 0 if no more first-in-first-out buffer elements
exist. Valid select parameter values for the first-infirst-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.
2000Returns 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. CeV+3KeywordReferenceManual97
3.1 Function Keywords
selectOptional 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.
0Return the message number of the most recent pro-
1If 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
3Return 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'sManual (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.
98eV+3KeywordReferenceManual22353-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. CeV+3KeywordReferenceManual99
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 subroutine cycle returns a FALSE value for the real variable "continue".
DO
CALL cycle(continue)
UNTIL continue == FALSE
Related Keywords
OFF
ON
TRUE
100eV+3KeywordReferenceManual22353-000 Rev. C
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.