User`s guide

V+ Program Types
There are two types of V+ programs:
l Executable Programs
l Command Programs
Executable programs are described in this section. Command programs are similar to MS-
DOS batch programs or UNIX scripts, and they are described in the V+ Operating System
User's Guide.
Executable Programs
There are two classes of executable programs: robot control programs and general programs.
Robot Control Programs
A robot control program is a V+ program that directly controls a robot or motion device. It
can contain any of the V+ program instructions.
Robot control programs are usually executed by program task #0, but they can be executed
by any of the program tasks available in the V+ system. Task #0 automatically attaches the
robot when program execution begins. If a robot control program is executed by a task other
than #0, however, the program must explicitly attach the robot (program tasks are
described in detail later in this chapter).
For normal execution of a robot control program, the system switch DRY.RUN must be
disabled and the robot must be attached by the robot control program. Then, any robot-
related error will stop execution of the program (unless an error-recovery program has been
established [see REACTE in the V+ Language Reference Guide]).
1
Exclusive Control of a Robot
l Whenever a robot is attached by an active task, no other task can attach that robot or
execute instructions that affect it, except for the REACTI and BRAKE instructions. For
details, see Program Interrupt Instructions on page 122.
l When the robot control task stops execution for any reason, the robot is detached
until the task resumes, at which time the task automatically attempts to reattach the
robot. If another task has attached the robot in the meantime, the first task cannot
be resumed.
l Task #0 always attempts to attach robot #1 when program execution begins. No
other tasks can successfully attach any robot unless an explicit ATTACH instruction is
executed.
l Since task #0 attempts to attach robot #1, that task cannot be executed after
another task has attached that robot. If you want another task to control the robot
V+ Program Types
(Undefined variable: Primary.Product_Name_V)Language User's Guide, version
17.x
Page 33