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 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: Introduction9
1.1 Intended Audience
1.2 Related Manuals
1.3 System Overview
The eV+ Operating System10
The eV+Language10
1.4 eV+ Keywords
1.5 Monitor CommandPrograms and V+programs
1.6 eV+ File Management
File Name Requirements12
File Types12
Programs and Subroutines13
11
12
12
Chapter 2: Keyword Usage15
2.1 Using Function Keywords
Function Keyword Syntax15
Variable Assignments and Data Types15
Using Functions as KeywordParameters15
Function Keywords Used Within Expressions16
2.2 Using Monitor Command Keywords
Monitor Command Keyword Syntax16
2.3 Using Program Command Keywords
Program Command Keyword Syntax17
2.4 Using System Parameter Keywords
Available System Parameters18
Viewing and Setting System Parameters19
2.5 Using System Switch Keywords
Available System Switches20
Viewing and Setting System Switches21
Logical Unit Numbers25
I/O Operation Error Status25
Attaching and Detaching Logical Units26
Attaching and Detaching Disk Devices26
Reading and Writing with I/O Devices27
Input Wait Modes28
Output Wait Modes28
Disk File Operations28
Advanced Disk Operations31
Chapter 4: Motion Control Operations33
4.1 Motion Control Overview
4.2 Joint-interpolated Motion vs. Straight-line Motion
Interpretation of Context Specification for Variables58
51
52
52
55
56
Chapter 6: Monitor CommandPrograms59
6.1 Monitor Command Program Overview
6.2 Monitor CommandProgram Names
6.3 Monitor CommandProgram Contents
6.4 Executing Monitor CommandPrograms
Executing Monitor CommandPrograms from the Monitor Window60
Autostarting a Monitor CommandProgram60
Monitor CommandProgram Processing61
59
59
59
60
Chapter 7: V+programs63
7.1 V+program Format
Program Lines63
Program Structure64
7.2 V+ Program Execution
Program Tasks64
V+program Processing66
7.3 Program Control
Unconditional Branching67
Conditional Branching68
Looping Structures69
Loading Programs and Variables to SystemMemory71
Removing Programs and Variables from System Memory72
7.4 V+ Program Interrupts
WAIT Program Interrupts72
WAIT.EVENT Program Interrupts73
REACT and REACTI Program Interrupts73
REACTE Program Interrupts74
HALT, STOP, and PAUSE Program Interrupts74
Additional Program Interrupt Keywords75
Program Interrupt Example75
7.5 V+program Stacks
V+ Program Stack Requirements77
7.6 Exchanging Information Between V+programs
63
64
66
72
76
78
22352-000 Rev. BeV+3User'sManual5
Exchanging Information Using Global Variables78
Exchanging Information Using Soft-signals78
Exchanging Information Using the Program Argument List78
7.7 Reentrant and Recursive Programs
Reentrant Programs81
Recursive Programs81
7.8 Asynchronous Processing
Error Trapping82
80
81
Chapter 8: T20 Pendant Programming83
8.1 Attaching and Detaching the T20 Pendant
8.2 Writing to the T20 Pendant Display
8.3 Detecting User Input
Detecting Pendant Key Presses84
8.4 Other Pendant Programming Functions
83
83
84
85
Appendix87
A.1 Warning, Information, and Error Messages
System Warning Messages87
System Information Messages87
System Error Messages88
87
6eV+3User'sManual22352-000 Rev. B
Revision History
Revision
Code
AJuly, 2020Original release
BAugust, 2020Minor corrections and updates
ReleaseDateDetails
22352-000 Rev. BeV+3User'sManual7
This manual contains information that is necessary to use eV+. Please read this manual and
make sure you understand the functionality of eV+ before attempting to use it.
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.
1.2 Related Manuals
Use the following related manuals for reference.
ManualDescription
Chapter 1: Introduction
Table 1-1. Related Manuals
eV+3KeywordReferenceManual (Cat. No.
I652)
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
NJ-series Robot Integrated CPU Unit User's
Manual (Cat. No. O037)
Robot Safety Guide (Cat. No. I590)Contains safety information forOMRON indus-
1.3 System Overview
eV+ is an interpreted programming language and control system for OMRON industrial
robots. This system offers a variety of keywords supporting robot motion, I/O, vision, file operations, and communication with other devices. Real-time interpretation and forward processing of programs in parallel tasks provides continuous path trajectory generation, as well
as on-line program generation, debugging, and modification.
Provides references to eV+ Keyword use and
functionality.
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.
When the eV+ system is used with the NJ-series Robot IntegratedCPUUnit, I/O, logic, safety,
and motion control functions can be created using IEC 61131-3 programming language
22352-000 Rev. BeV+3User'sManual9
1.3 System Overview
NA-series
PT
Teaching pendant
T20
(with built-in EtherCAT
communications)
Slave
Terminal
Vision sensor
OMRON
robot
Robot Integrated CPU Unit
NJ501-R
I/O control
external devices
1S-series Servo Drives
G5-series Servo Drives
Server
Relational database
USB
Camera
FH-series Vision
Systems
Robots controllable by NJ Robotics function
EtherCAT
Application Controller
Sysmac Studio
EtherNet/IP
Front Panel
Safety
devices
Encoder,
digital I/O
specifications. With the addition of shared variables, shared signals, and function blocks for
interacting with V+ program execution, a user can develop an entire control solution from the
Sysmac Studio software.
The eV+ Operating System runs on OMRON robots while communicating with other system
objects to facilitate programming and runtime functionality. The general system overview is
shown below.
Figure 1-1. System Overview
The eV+ Operating System
The eV+ Operating System is automatically launched when the robot controller and NJ-series
Robot IntegratedCPUUnit are powered ON. The operating system accepts instructions from
application programs, input from workcell peripheral devices, and operator input from the
pendant. The tasks performed by the operating system include the following.
l Managing the execution of application programs.
l Managing the flow of information to and from storage devices.
l Monitoring external devices attached to the controller.
l Reporting errors generated during processing.
The eV+Language
The eV+ language is comprised of keywords that provide control, data manipulation, and
other application-specific functionality. These keywords are used in statements with specific
syntax detailed in this document with examples. Statements are executed in a consecutive
manner until the .END statement is reached. This is referred to as a program cycle. Keywords
may be used to create V+programs or issue individual commands in the Monitor Window.
Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for other syntax and statement
examples.
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
IntegratedCPUUnit as the Host System.
10eV+3User'sManual22352-000 Rev. B
1.4 eV+ Keywords
eV+keywords are a set of instructions that are used to perform various operations for a robotbased application. Keywords are used to create statements arranged in steps for the following
programmatic functionality.
l Robot motion control
l Error processing and handling
l Arithmetic functions
l System parameter and switch manipulation
l Data management
l I/O control and external device communication
l Logic and other conditional evaluations
l Subroutine execution and control
l Executing various system functions
l T20 Pendant functions
Depending on the type of keyword, they can be used to build a program or they can be issued
individually using the Monitor Window in the Sysmac Studio.
Keywords are categorized into six types as described below.
Chapter 1: Introduction
Table 1-2. eV+ Keyword Types
Keyword TypeUsage
FunctionkeywordsUsed to return values from the eV+ Operating System.
Refer to Using Function Keywords on page 15for more information.
Monitor command
keywords
Other keywordsUsed to specify units when using the SPEEDprogram command
Program command
keywords
System parameter
keywords
Used to issue individual operations in the Monitor Window or to create
Monitor CommandPrograms.
Refer to Using Monitor Command Keywords on page 16for more information.
keyword.
Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for more
information.
Used to command operations in V+programs.
Refer to Using Program Command Keywords on page 17for more
information.
Used to manipulate system parameters in V+programs or with the Monitor Window.
Refer to Using System Parameter Keywordsfor more information.
System switch
keywords
Used to manipulate system switches in V+programs or with
theMonitor Window.
Refer toUsing System Switch Keywords on page 20for more information.
22352-000 Rev. BeV+3User'sManual11
1.5 Monitor CommandPrograms and V+programs
Keywords andSyntax
In order for keywords to work with the eV+ operating system, they must be issued with a specific syntax. This syntax generally consists of a keyword and associated parameters in a specific order, separated by characters such as commas, brackets, and parentheses. This syntax is
detailed in this manual and also in the eV+3KeywordReferenceManual (Cat. No. I652). An
example of keyword syntax is shown below.
SET loc_name = SHIFT(loc_value BY 5, 5, 5)
When creating V+programs with the Sysmac Studio, syntax is checked and formatted as the
characters are input. Refer to theSysmac Studio Robot Integrated System Building Function withRobot Integrated CPU Unit Operation Manual (Cat. No. W595) for more information.
1.5 Monitor CommandPrograms and V+programs
There are two types of programs that the eV+ Operating System can execute: Monitor
CommandPrograms and V+programs.
V+programs contain the logic, motion control, and vision keywords that control a robot during run-time. Refer to V+programs on page 63 for more information.
Monitor CommandPrograms are used to perform system-level functions such as loading files,
changing the default directory path, and executing main eV+ programs after system boot up.
Refer to Monitor CommandPrograms on page 59 for more information.
1.6 eV+ File Management
The eV+ Operating System has a file management system very similar to other operating systems. Each file within a subdirectory must have a unique name. There are several file extensions that are used for different types of files in the eV+ system as described in File Types on
page 12.
New files can be created with the Sysmac Studio or by issuing specific keywords. Refer to the
Sysmac Studio Robot Integrated System Building Function with Robot Integrated CPU Unit Operation
Manual (Cat. No. W595) and the eV+3KeywordReferenceManual (Cat. No. I652) for more inform-
ation.
File Name Requirements
The eV+file name requirements are described below.
l File names can have a maximum of eight characters.
l File names must have an extension (file type) designation that is 1 to 3 characters in
length. Refer to File Types on page 12 for more information.
l File names can only include alphanumeric characters and the underscore (_) character.
No other special characters are permitted.
l File names cannot contain blank spaces.
l Keywords cannot be used as file names. Do not name files the same as any keywords.
NOTE: File names are not case-sensitive.
File Types
There are several file types that are used by the eV+ Operating System. File types that are used
during system development, commissioning, debugging, and other typical operations are listed below.
12eV+3User'sManual22352-000 Rev. B
Chapter 1: Introduction
IMPORTANT: Direct access and editing of these files is not necessary under normal use.
Table 1-3. eV+ File Type Descriptions
File
Type
.v2
.calSystem calibration data files.
.xmlRobot specification and other parameter files.
.rtfText files (Readme).
.pgV+program or group of programs (module)
V+ programs
Global variables referenced by the programs and subroutines can be stored in the file.
All of the subroutines referenced (directly or indirectly) by the specified program can be
stored in the file.
Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for information about
storing programs and variables in a disk file using the STOREkeyword.
Refer to the Sysmac Studio Robot Integrated System Building Function with Robot
Integrated CPU Unit Operation Manual (Cat. No. W595) for information about saving
programs and variables to the controller.
In addition to the programs specified to store in the file, any subroutines referenced by
those programs are also stored in the file.
Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for information about
storing programs and variables in a disk file using the STOREPand STOREM keywords.
Description
Programs and Subroutines
V+ is an interpreted language, therefore linking and compiling are not required. Main programs and subroutines always exist as separate programs. The eV+ file structure allows you to
keep a main program and all the subroutines it calls or executes together in a single file so that
when a main program is loaded, all the subroutines it calls are also loaded. A single file that
contains a program and subroutines is also referred to as a module.
If a program calls a subroutine that is not resident in system memory, the error *Undefined program or variable name* will result.
Additional Information: Refer to the STORE_andMODULEkeyword descriptions in the eV+3KeywordReferenceManual (Cat. No. I652) for more information.
Refer to the Sysmac Studio Robot Integrated System Building Function with RobotIntegrated CPU Unit Operation Manual (Cat. No. W595) for more information about
creating a program file.
22352-000 Rev. BeV+3User'sManual13
This chapter describes how to use the different types of keywords with the eV+ system.
2.1 Using Function Keywords
Function keywords are issued within V+ Program statements and can be used in several different ways as described below.
Additional Information: Refer to the eV+3KeywordReferenceManual (Cat. No.
I652) for more information about specific function keywords.
Function Keyword Syntax
eV+ provides you with a wide variety of predefined function keywords for performing string,
mathematical, and other data manipulation. In most cases, you must provide the data that is
input to a function keyword. The keyword then returns a value based on a specific operation
on that data. Function keywords can be used anywhere that a value or expression would be
used.
Correct syntax for function keywords must be observed when creating statements in V+ programs. If incorrect syntax is used, eV+ will return an *Illegal monitor command* error.
Chapter 2: Keyword Usage
Variable Assignments and Data Types
When a function keyword is issued, a value is returned by the eV+ Operating System. The data
type of the value that is returned must match the data type of the variable that is assigned to
the function. For example, if the $TIME function keyword is issued, eV+ will return a string
data type value. The examples below demonstrate various data types used with variable
assignments.
$current_time = $MID($TIME(,time),11,8)
SET #pos1 = #PHERE
SETBELT %main.belt = BELT(%main.belt)
Additional Information: Refer to Variables and Data Types on page 41 for more
information
Using Functions as KeywordParameters
A function keyword can be used as a parameter as long as the data type returned by that function is the correct type. For example, consider the SQRT function statement shown below. The
SQRT function keyword uses the syntax "SQRT(value)" for reference.
i = SQRT(SQR(x))
The statement above returns the absolute value of variable "x" and assignes it to variable "i".
Any function that returns a numerical value can be substituted for "SQR(x)"in the statement
above.
22352-000 Rev. BeV+3User'sManual15
2.2 Using Monitor Command Keywords
Function Keywords Used Within Expressions
A function keyword can be used as an expression as long as the data type returned by that
function is the correct type. For example, consider the IF ... THEN conditional statement shown
below. The IF ... THEN keyword uses the syntax "IF logical_expTHEN" for reference.
IFLEN($string_variable) > 12 THEN
The statement above evaluates the expression "LEN($string_variable) > 12". This expression
includes the LENfunction keyword that returns the number of characters in the variable
"$string_variable". Any function that returns a numerical value can be substituted for LEN
($string_variable) in the statement above.
2.2 Using Monitor Command Keywords
Monitor command keywords can be issued in the Monitor Window or with the use of a Command Program. Most monitorcommand keywords include at least one parameter that controls
how the eV+ system executes the operation. This additional information is specified when the
keyword is issued in the Monitor Window. Parameters must be entered in the order they are
listed and they must use correct syntax.
Additional Information: Refer to the eV+3KeywordReferenceManual (Cat. No.
I652) for more information about specific monitorcommand keywords.
Refer to the Sysmac Studio Robot Integrated System Building Function with Robot
Integrated CPU Unit Operation Manual (Cat. No. W595) for more information about
the Monitor Window.
Monitor Command Keyword Syntax
Correct syntax for monitorcommand keywords must be observed when creating statements in
V+ programs. If incorrect syntax is used, eV+ will return an *Illegal monitor command* error.
In general, monitorcommand keywords have the following formats. The keyword is shown in
uppercase and the arguments are shown in lowercase. Required keywords, parameters, and
symbols such as equal signs and parentheses are shown in bold text. Optional keywords, parameters, and symbols are shown in regular text.
KEYWORD
KEYWORD req_param
KEYWORD (req_param)
KEYWORD opt_param
KEYWORD opt_param1, opt_param2, ... , opt_paramX
KEYWORD req_param, opt_param = value
KEYWORD @task:program_step(expression)
KEYWORD req_param1 = req_param2
KEYWORD req_param1 = req_param2 KEYWORD opt_param
Additional Information: All required or optional monitorcommand keyword
parameters and associated syntax is described for each keyword in the
eV+3KeywordReferenceManual (Cat. No. I652). Refer to specific keyword details in
that manual for more information.
16eV+3User'sManual22352-000 Rev. B
Chapter 2: Keyword Usage
Monitor Command Keyword Parameter Entry
Monitor command keyword parameters can be optional or required. If a parameter is required,
a value must be entered on the command line or the command will not execute correctly. A
space is required between the keyword and the parameters that follow it. A comma is typically
used to separate parameters but some monitorcommand keywords may require an equal sign
(=) assignment operator.
If a parameter is optional, its value can be omitted and the system will substitute a default
value. For example, the STATUSmonitorcommand keyword can be issued as shown below.
The STATUSsyntax is "STATUSselect" for reference, where "select" is an optional parameter.
STATUS
Issuing the STATUS monitorcommand keyword as shown above will return status information for all the program tasks.
Issuing the STATUSmonitorcommand keyword with a parameter value as shown below will
return status information for only system task number 1.
STATUS 1
Spaces before and after parameter separators are optional. If one or more parameters follow an
omitted parameter, the parameter separator(s) must be typed. If all the parameters following an
omitted parameter are optional, and those parameters are also omitted, the separators do not
need to be typed. Refer to the example below that demonstrates these concepts. The XSTEP syntax is "XSTEP task program (param_list), cycles, step" with all parameters being optional, for
reference.
XSTEP assembly,,23
2.3 Using Program Command Keywords
Program command keywords are used to create V+ programs for robot control and other functions such as I/O control, file operations, error handling, and data management. This section
provides details about the usage of program command keywords when creating V+ programs.
Program Command Keyword Syntax
Correct syntax for program command keywords must be observed when creating statements in
V+ programs. If incorrect syntax is used, the statement will cause errors in the V+ Editor and
the program cannot be executed.
Symbols such as commas, brackets, and parentheses may be required for program
commandkeyword syntax when parameters are present. program command keywords may
contain parameters that define or specify information needed for the operation. Some program
command keywords do not require any parameters while other program command keywords
have required or optional parameters.
In general, program command keywords have the following formats (not an exhaustive listing). The keyword is shown in uppercase and the arguments are shown in lowercase.
Required keywords, parameters, and symbols such as equal signs and parentheses are shown
in bold text. Optional keywords, parameters, and symbols are shown in regular text.
KEYWORD
KEYWORD req_param
KEYWORD opt_param
KEYWORD (parameter)opt_param
22352-000 Rev. BeV+3User'sManual17
2.4 Using System Parameter Keywords
KEYWORD opt_param1, opt_param2, ... , opt_paramX
KEYWORD req_param, opt_param = value
KEYWORD req_param1 = req_param2
KEYWORD req_param1 = req_param2 KEYWORD opt_param
Additional Information: All required or optional program commandkeyword
parameters and associated syntax is described for each keyword in the
eV+3KeywordReferenceManual (Cat. No. I652). . Refer to a specific keyword
details in that manual for more information.
No Required Parameters
Some program commandkeywords do not require any parameters such as LEFTY, RIGHTY,
ABOVE, and BELOW. Keywords that do not require parameters can be used as shown below.
ABOVE
MOVE point1
BREAK
Required or Optional Parameters
Some program commandkeywords have parameters that are required or optional. When
using a keyword that uses multiple parameters, symbols such as commas, brackets, and parentheses may be required. If required parameters or syntax is incorrect, an error will occur.
Refer to Warning, Information, and Error Messages on page 87 for error information and the
eV+3KeywordReferenceManual (Cat. No. I652) for more information about the use of symbols to
complete the correct syntax for eV+.
NOTE: When program lines are entered, extra blank spaces can be used
between any elements in the line. The eV+ editor adds or deletes spaces in program lines to make them conform with the standard spacing. The editors also
automatically format the lines to uppercase for all keywords and lowercase for
all user-defined names.
2.4 Using System Parameter Keywords
System parameters determine certain operating characteristics of the eV+ system. These parameters have numeric values that can be changed from the Monitor Window or from within a
program to suit particular system configurations and needs. The various parameters are
described in this section along with the operations for displaying and changing their values.
Available System Parameters
Use the following table to understand the available system parameters and their basic functions. Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for setting details, examples,
and other information.
Table 2-1. System Parameter Details
ParameterDescription
BELT.MODESet characteristics of the conveyor 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.
18eV+3User'sManual22352-000 Rev. B
Chapter 2: Keyword Usage
ParameterDescription
NOT.CALIBRATED Represents the calibration status of the robot(s) controlled by the eV+ sys-
tem.
VTIMEOUTSets a timeout value so that an error message is returned if no response is
received following a vision command.
JOG.TIMESets the keep-alive time of a jog operation.
Each time a jog operation is executed, this parameter setting specifies the
time the axis or joint moves.
Viewing and Setting System Parameters
System parameters can be viewed and set in the Monitor Window. They can also be controlled
by V+ programs. Use this section to understand how to view and set system parameters.
Viewing and Setting System Parameters with the Monitor Window
The PARAMETERmonitorcommand keyword is used to view and set parameter values as
shown in the examples below.
Viewing Parameter Values
The following example will display all parameters and their current values in the Monitor
Window.
PARAMETER
The following example will display the BELT.MODEparameter current value in the
MonitorWindow.
PARAMETER BELT.MODE
Setting Parameter Values
The following example will set theBELT.MODEparameter to 4.
PARAMETER BELT.MODE = 4
Reading and Writing System Parameters with V+ Programs
Parameters can be set during V+ program execution by using the PARAMETER program command keyword.
NOTE: It is common practice to use a Monitor CommandProgram to set parameters. Refer to Monitor CommandPrograms on page 59 for more information.
The following program statement will set the BELT.MODE system parameter to have bits 1
and 3 set to 1 (mask values 1 + 4) using thePARAMETERprogram command keyword.
PARAMETER BELT.MODE = 5
A parameter value can be returned during V+ program execution or using the Monitor Window.
The following program statement will return the current setting of the BELT.MODE system
parameter in the Monitor Window.
22352-000 Rev. BeV+3User'sManual19
2.5 Using System Switch Keywords
TYPE "The BELT.MODE parameter is set to",PARAMETER(BELT.MODE)
2.5 Using System Switch Keywords
System switches determine certain operating characteristics of the eV+ system. These switches
can be turned ONor OFF from the Monitor Window or from within a program.. The various
system switches are described in this section along with the operations for displaying and controlling them.
Available System Switches
Use the following table to understand the available system switches and their basic functions.
Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for settings, details, examples, and
other information.
SwitchDescription
AUTO.POWER.OFFWhen this switch is ON, errors will disable high power. When this switch
is OFF, these errors stop the robot and signal the eV+ system, but do not
cause high power to be turned OFF.
The errors are defined as follows.
l (-624) *force protect limit exceeded*
l (-1003) *Time-out nulling errors* Mtr
l (-1006) *Soft envelope error* Mtr
CPEnables or disables continuous-path motion processing. Refer to Continu-
ous-Path Trajectories on page 34 for more information.
DECEL.100Enables or disables the use of 100 percent as the maximum deceleration
for the ACCEL program command keyword.
DELAY.IN.TOLControls the timing of coarse or fine nulling after eV+ completes a
motion segment (positioning tolerance). Refer to COARSEandFINE
programcommand keyword details.
DRY.RUNThis switch enables or disables the transmission of motion commands to
the robot. Turn this switch ON to test programs for proper logical flow and
external communication functionality to prevent collisions.
NOTE: The T20 pendant can still be used to move the
robot when DRY.RUN is enabled if there is no task attached
to the robot. Otherwise, a Robot Interlocked error (-621)
will occur.
MESSAGESSetting this switch to ON will allow messages to be displayed on the Mon-
itor Window while using theTYPE program command keyword.
Setting this switch OFFwill prevent messages from being displayed on
the Monitor Window with the TYPE program command keyword.
OBSTACLEEnables or disables up to 4 different obstacles that are defined for a robot.
POWERThis switch controls and displays the robot high power. This switch is
automatically enabled whenever robot high power is turned ON.
If the robot timing specifications in the system configuration is non-zero,
enabling high power is a two-step process. In this case, after enabling
high power from the T20 Pendant, Monitor Window, or software, the sys-
20eV+3User'sManual22352-000 Rev. B
Chapter 2: Keyword Usage
SwitchDescription
tem flashes the high power indicator for the duration of the timing specification setting (in seconds). If a timeout occurs, the message
*HIGHPOWERbutton not pressed*will appear.
Refer to Warning, Information, and Error Messages on page 87 for more
information.
Refer to the Sysmac Studio Robot Integrated System Building Functionwith Robot Integrated CPU Unit Operation Manual (Cat. No. W595) for
more information about robot timing specification settings.
ROBOTEnables or disables one robot or all robots.
SCALE.ACCELEnables or disables the scaling of acceleration and deceleration as a func-
tion of program speed as long as the program speed is below a preset
threshold.
SCALE.ACCEL.ROTSpecifies whether or not the SCALE.ACCEL system switch accounts for
the cartesian rotational speed during straight-line motions.
UPPERDetermines whether comparisons of string values will consider lowercase
letters the same as uppercase letters. When this switch is ON, all lowercase letters are considered as though they are uppercase.
Viewing and Setting System Switches
System switches can be viewed and set in theMonitorWindow. Then can also be controlled
by V+ programs. Use this section to understand how to view and set system switches.
Viewing and Setting System Switches from the Monitor Window
The SWITCH monitorcommand keyword is used to view and set switches as shown in the
examples below.
Viewing System Switches
The following example will display all switches and their current values in the Monitor Window.
SWITCH
The following example will display the POWER switch current state in the MonitorWindow.
SWITCH POWER
Setting SystemSwitches
The following example will turn ON the AUTO.POWER.OFF switch.
ENABLE AUTO.POWER.OFF
The following example will turn OFF the AUTO.POWER.OFFswitch.
DISABLE AUTO.POWER.OFF
22352-000 Rev. BeV+3User'sManual21
Chapter 3: eV+ System Operations
The following sections describe various eV+system operations.
3.1 System Messages
System messages have designated numbers and strings for identification. These can be used to
detect and recover from various eV+ conditions with V+ programs or using the Monitor Window.
Additional Information: Refer to Warning, Information, and Error Messages on
page 87
Message Types
There are three different message types:
l Informational messages (message numbers 0 to 49)
l Warning messages (message numbers 50 to 299)
l Error messages (messages with negative values)
System Behavior
The eV+ system will behave differently depending on the type of message and eV+ state when
the message occurs.
Informational andwarning messages do not impact the system operation and can be used for
observational purposes.
Errors messages have an impact on system operation. They will not completely stop the eV+
system, but individual tasks associated with the error will stop running.
System behavior after errors occur depend on the running task, robot status, and type of error.
If the robot is running and on the same task where an error occurs, the robot will be stopped
with maximum deceleration and an error message(s) will be generated. If an error occurs on a
task that is not running a robot, only this task will be stopped and the robot will not be
affected.
Message Handling
eV+ will internally store system message information in order to be accessed with the ERROR
and REACTEkeyword operations.
The following information is stored for access using the ERRORkeyword operation.
l The last system message of a task (current or selected)
l The last system message of each attached robot
l The last message of the eV+ system
l A category, source, and name for each system message.
Additional Information: Refer to the eV+3KeywordReferenceManual (Cat. No.
I652) for more information about the ERROR and REACTEkeyword operations.
22352-000 Rev. BeV+3User'sManual23
3.2 Digital I/O Control
3.2 Digital I/O Control
When eV+ starts, blocks of system memory are assigned to internal and external digital I/O
detected by the system.
Several program command keywords are available for digital I/Ocontrol purposes. Digital
input signals can be monitored for changes and outputs can be turned ON and OFF conditionally.
Refer to the robot user guide for more information about default signal allocation.
I/OUsageConsiderations
The RESETand DEF.DIO program command keywords have no effect on Host I/Osignal numbers 4001 to 4999.
The IOmonitor command keyword will return the value of signals that are mapped in the
host and returns "-"for signals that are not mapped.
The SIG.INSfunction keyword will return TRUE if the host signal is available and FALSEif it
is not available (not mapped).
Refer to the eV+3KeywordReferenceManual (Cat. No. I652) for more information.
Basic I/O Control
Use the following examples to understand basic I/Ocontrol functionality with program command keywords.
Input Signal Examples
The following example halts program execution until a switching device attached to digital
input channel 1001 is closed.
WAIT SIG(1001)
The following example evaluates input signal 1002 and calls a program "service.feeder" when
the signal turns ON.
IF SIG(1002) THEN
CALL service.feeder()
END
NOTE: The example above will call "service.feeder" if signal 1002 is ON only
when the condition is evaluated.
Output Signal Examples
The following example turns OFFdigital output signal 33.
SIGNAL(-33)
The following example turns ON digital output signal 33.
SIGNAL(33)
The following example controls multiple digital output signals with a single statement.
SIGNAL(33),(-34),(35)
24eV+3User'sManual22352-000 Rev. B
Soft Signals
Soft signals are provided in the range of 2001 to 2999. These signals are accessible with all V+
programs and can be used with the SIG and SIGNALkeywords for interaction between V+ programs on different tasks or interaction between V+ programs and functionality in an
ApplicationManager..
3.3 Disk I/O Operations
The following sections describe the basic procedures and functions for disk I/O operations.
Logical Unit Numbers
All eV+ disk I/Ooperations reference an integer value called a Logical Unit Number (LUN).
The LUN provides a method of identifying which device or file is being referenced by an
I/Ooperation. A LUN device can refer to a robot, a disk, a TCP protocol device driver, a
TFTPserver, or a UDP protocol device driver.
The LUNspecifier is a parameter used in several keywords listed below. Refer to the
eV+3KeywordReferenceManual (Cat. No. I652) for more information.
The following program command keywords use the LUN parameter.
Chapter 3: eV+ System Operations
l ATTACH
l DETACH
l FCMND
l FOPEN
l FSET
l READ
l WRITE
I/O Operation Error Status
Unlike most other eV+ keywords, I/O operations are expected to fail under certain circumstances. For example, when reading a file, an error status is returned to the program to
indicate when the end of the file is reached. The program is expected to manage this error and
continue execution.
For these reasons, eV+ I/O keywords normally do not stop program execution when an error
occurs. Instead, the success or failure of the operation is saved internally for access by the
IOSTAT real-valued function. For example, a reference to IOSTAT(5) returns a value indicating
the status of the last I/O operation performed on LUN 5. The values returned by IOSTAT fall
into one of following three categories.
Table 3-1. IOSTATKeyword Return Values
ValueDescription
1The I/O operation completed successfully.
0The I/O operation has not yet completed. This value appears only if
a pre-read or no-wait I/O operation is being performed.
<0The I/O operation completed with an error. The error code indic-
ates what type of error occurred.
Additional Information: Refer to Warning, Information, and Error Messages on
page 87 The $ERROR string function keyword can be used in a program (or with
22352-000 Rev. BeV+3User'sManual25
3.3 Disk I/O Operations
the LISTS monitor command keyword) to generate the text associated with most
I/O errors.
NOTE: It is not necessary to use IOSTAT after use of a GETC keyword since
errors are returned directly by the GETC keyword.
Attaching and Detaching Logical Units
An I/O device must be attached using the ATTACH program command keyword before it can
be accessed by a program. Once a specific device (such as the teach pendant) is attached by
one program task, it cannot be used by another program task.
Most I/O requests fail if the device associated with the referenced Logical Unit Number is not
attached. When a program is finished with a device, it detaches the device with the DETACH
program command keyword. This allows other programs to process any pending I/O operations.
A physical device type can be specified when the logical unit is attached. If a device type is
specified, it supersedes the default, but only for the logical unit attached. The specified device
type remains selected until the logical unit is detached.
When a control program completes execution normally, all I/O devices attached by it are automatically detached. If a program stops abnormally, most device attachments are preserved. If
the control program task is resumed and attempts to reattach these logical units, it may fail
because of the attachments still in effect.
Additional Information: The KILL monitorcommand forces a program to
detach all the devices that it has attached.
If attached by a program, the Monitor Window and teach pendant are detached whenever the
program halts or pauses for any reason, including error conditions and single-step mode. If the
program is resumed, the Monitor Window and the teach pendant are automatically reattached
if they were attached before the termination.
Attach Request Response Mode
An attach request can optionally specify immediate mode. Normally, an attach request is
queued and the calling program is suspended if another control program task is attached to
the device. When the device is detached, the next attachment in the queue will be processed. In
immediate mode, the ATTACH program command keyword completes immediately with an
error if the requested device is already attached by another control program task.
Attach requests can also specify no-wait mode. This mode allows an attach request to be
queued without forcing the program to wait for it to complete. The IOSTAT function must then
be used to determine when the attach has completed.
If a task is already attached to a logical unit, it will get an error immediately if it attempts to
attach again without detaching, regardless of the type of wait mode specified.
Attaching and Detaching Disk Devices
Use the sections below to understand how to attach and detach disk devices.
Attaching DiskDevices
The type of device to be accessed is determined by the DEFAULT monitor command keyword
or the ATTACH program command keyword. If the default device type set by the DEFAULT
26eV+3User'sManual22352-000 Rev. B
Chapter 3: eV+ System Operations
keyword is not appropriate at a particular time, the ATTACH keyword can be used to override
the default.
The following example attaches to an available disk logical unit and returns the number of the
logical unit in the variable "dlun", which can then be used in other disk I/O operations.
ATTACH (dlun, 4) "DISK"
If the device name is omitted from the keyword syntax, the default device for the specified
LUN is used. It is recommended that you always specify a device name with the ATTACH
keyword. The device SYSTEM refers to the device specified with the DEFAULT
monitorcommand. Once the attachment is made, the device cannot be changed until the
logical unit is detached. However, any of the units available on the device can be specified
when opening a file. For example, the eV+ DISK units are A, C and D. After attaching a DISK
device LUN, a program can open and close files on any of these disk units before detaching
the LUN.
Detaching Disk Devices
When a disk logical unit is detached, any disk file that was open on that unit is automatically
closed. However, error conditions detected by the close operation may not be reported. Therefore, it is good practice to use the FCLOSE keyword to close files and to check the error status
afterwards. FCLOSE ensures that all buffered data for the file is written to the disk, and
updates the disk directory to reflect any changes made to the file. The DETACH keyword frees
up the logical unit.
The following example will close a file and detach a disk LUN.
FLCOSE(dlun)
IFIOSTAT(dlun) THEN
TYPE $ERROR(IOSTAT(dlun))
END
DETACH(dlun)
Reading and Writing with I/O Devices
The READ program command keyword processes input from all devices. The basic READ
keyword issues a request to the device attached on the indicated LUN and waits until a complete data record is received before program execution continues. The length of the last record
read can be obtained with the IOSTAT function with its second argument set to a value of 2.
The GETC real-valued function returns the next data byte from an I/O device without waiting
for a complete data record. It is commonly used to read data from the Monitor Window. It also
can be used to read disk files in a byte-by-byte manner. Special mode bits to allow reading
with no echo are supported for Monitor Window read operations.
Monitor Window input can be performed using the PROMPT program command keyword.
The GET.EVENT real-valued function can be used to read input from the Monitor Window.
This may be useful in writing programs that operate on both graphics and non-graphics-based
systems. To read data from a disk device, a file must be open on the corresponding logical
unit. The FOPEN_ program command keywords open disk files.
The WRITE program command keyword processes output to disk devices and to the Monitor
Window. The basic WRITE keyword issues a request to the device attached on the indicated
LUN, and waits until the complete data record is output before program execution continues.
WRITE keywords accept format control specifiers that determine how output data is formatted,
and whether or not an end of record mark should be written at the end of the record.
Monitor Window output can be performed using the PROMPT or TYPE keywords. A file must
be opened using the FOPENW or FOPENA keywords before data can be written to a disk
22352-000 Rev. BeV+3User'sManual27
3.3 Disk I/O Operations
device. FOPENW opens a new file. FOPENA opens an existing file and appends data to that
file.
Additional Information: Refer to the eV+3KeywordReferenceManual (Cat. No.
I652) for usage considerations, details, and examples of the keywords described
above.
Input Wait Modes
Normally, eV+ waits until the data from an input keyword is available before continuing with
program execution. However, the READ keyword and GETC keyword accept an optional parameter that specifies no-wait mode.
In no-wait mode, these keywords return immediately with the error status -526 (No data
received) if there is no data available. A program can loop and use these operations repeatedly
until a successful read is completed or until some other error is received. The disk devices do
not recognize no-wait mode on input and treat such requests as normal input-with-wait
requests.
Output Wait Modes
Normally, eV+ waits for each I/O operation to be completed before continuing to the next program statement.
The following example causes eV+ to wait for the entire record of 50 spaces to be transmitted
(about 50 ms for 9600 baud rate) before continuing to the next program statement.
TYPE /X50
Similarly, WRITE program command keywords to disk files will wait for any required physical output to complete before continuing.
This waiting is not performed if the /N (no wait) format control specifier is used in an output
keyword. Instead, eV+ immediately executes the next program statement. The IOSTAT function
checks whether or not the output has completed. It returns a value of zero if the previous I/O
is not complete. If a second output keyword for a particular Logical Unit Number is
encountered before the first no-wait operation has completed, the second statement automatically waits until the first is done. This scheme means the no-wait output is effectively
double-buffered. If an error occurs in the first operation, the second operation is canceled, and
the IOSTAT value is correct for the first operation. The IOSTAT function can be used with a
second parameter of 3 to explicitly check for the completion of a no-wait write.
Disk File Operations
Disk file operations that are available with the eV+ system are described below.
The FDIRECTORY monitor command keyword is used to display the names of the files in a
directory. A disk file can be accessed either sequentially, where data records are accessed from
the beginning of the file to its end, or randomly, where data records are accessed in any order.
Refer to Advanced Disk Operations on page 31 for more information about sequential and random access for disk files.
The FCMNDprogram command keyword is used to perform the following operations.
l Rename a file
l Create a subdirectory
l Delete a subdirectory
Additional Information: The FCMND keyword is similar to other disk I/O
keywords in that a logical unit must be attached and the success or failure of the
28eV+3User'sManual22352-000 Rev. B
Chapter 3: eV+ System Operations
command is returned via the IOSTAT real-valued function. Refer to the
eV+3KeywordReferenceManual (Cat. No. I652) for more information about the
IOSTATfunction.
Accessing the Disk Directories
The eV+ directory structure is identical to that used by the IBM PC DOS operating system. For
each file, the directory structure contains the file name, attributes, creation time and date, and
file size. Directory entries may be read after successfully executing an FOPEND keyword.
Each directory record returned by a READ keyword operation contains an ASCII string with
the information shown in the following table.
Table 3-2. Disk DirectoryFormat Description
ByteSize (Bytes)Description
1 to 77Attribute codes that are padded with blanks on the right side. The
attribute field is blank if no special attributes are indicated.
The following characters are possible.
l D: Subdirectory
l P: File is protected and cannot be read or modified
l R:File is read-only and cannot be modified
l S:File is system file
91ASCII tab character (9 decimal).
10 to 1910ASCIIfile size in sectors, right justified.
201ASCIItab character (9 decimal).
20 to 289File revision date with the format of dd-mm-yy.
NOTE: The file revision date is blank if the system
date and time had not been set when the file was created or last modified.
291ASCIItab character (9 decimal).
30 to 389File revision time with the format hh:mm:ss.
NOTE: The file revision time is blank if the system
date and time had not been set when the file was created or last modified.
391ASCII tab character (9 decimal).
40+---ASCIIfile name and extension (size depends on file name length).
Opening a DiskFile
Before a disk file can be opened, the disk the file is on must be attached. The FOPEN_
keywords open disk files (and file directories). These keywords associate a LUN with a disk
file. Once a file is open, the READ, GETC, and WRITE keywords can be used to access the file.
These keywords use the assigned LUN to access the file so that multiple files may be open on
the same disk and the I/O operations for the different disk files will not affect each other.
22352-000 Rev. BeV+3User'sManual29
3.3 Disk I/O Operations
NOTE: While a file is open for write or append access, another control program
task cannot access that file. However, multiple control program tasks can access
a file simultaneously in read-only mode.
Writing to a Disk
The following example writes the string stored in "$in.string" to the disk file open on "dlun".
WRITE (dlun) $in.string
The following example returns any error generated during the write operation example above
to the "error" variable.
error = IOSTAT(dlun)
Reading from a Disk
The following example reads from the open file on "dlun" up to the first CR/LF or end of file if
it is encountered, and stores the result in "$in.string". When the end of file is reached, eV+ error
number -504 (Unexpected end of file) is generated. The IOSTAT function must be used to recognize this error and halt reading of the file.
DO
READ (dlun) $in.string
TYPE $in.string
UNTIL IOSTAT(dlun) == -504
Additional Information: The GETC function reads the file byte-by-byte if you
want to examine individual bytes from the file or if the file is not delimited by
CR/LFs.
Multi-functional Example
The following example creates a disk file, writes to the file, closes the file, reopens the file, and
reads back its contents.
AUTO dlun, i
AUTO $file.name
$file.name = "data.tst"
ATTACH (dlun, 4) "DISK"
IF IOSTAT(dlun) < 0 GOTO 100
FOPENW (dlun) $file.name
IF IOSTAT(dlun) < 0 GOTO 100
FOR i = 1 TO 10
WRITE (dlun) "Line "+$ENCODE(i)
IF IOSTAT(dlun) < 0 GOTO 100
END
FCLOSE (dlun)
IF IOSTAT(dlun) < 0 GOTO 100
FOPENR (dlun) $file.name
IF IOSTAT(dlun) < 0 GOTO 100
READ (dlun) $txt
WHILE IOSTAT(dlun) > 0 DO
30eV+3User'sManual22352-000 Rev. B
Loading...
+ 68 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.