Professional Documents
Culture Documents
Abstruct-A graphics robot simulator designed for an IBM munication device. This is the case, for example, with the
PC/XT/AT or PS/2 personal computer is presented. The simulator
is a terminate and stay resident (TSR) program that runs in the back-
Rhino XR-3 robot [8]. The simulator monitors the COMl
ground and intercepts commands that would normally go to the robot port from the background; and whenever a character is
controller through the COMl serial communication device. With the sent it intercepts the character and responds to it as the
use of the simulator, students can develop and test robot control pro- robot controller would. The status of the simulated robot
grams off line without a physical robot present using the language of is available to the user through a 3-D graphics display of
their choice. The status of the simulated robot is available through a
3-D graphics display and a one-line text window, each of which can be
the arm and also through a one-line text window. The ro-
activated from the keyboard or from within a user program. Data files bot controller that is simulated is a generalization of the
are used to specify the robot to be simulated and the environment or Rhino XR-3 controller [ 111. Therefore any program writ-
workcell within which it is to operate. Currently supported robots in- ten for the Rhino XR-3 robot should run on the simulator
clude the Rhino XR-3 educational robot and the Adept One and Intel- without modification.
ledex 660 industrial robots. The workcell, which can be customized by
the user, features an overhead camera and objects that can be sensed
The primary motivation for developing the simulator
by the camera and manipulated by the robot. was for teaching robotics at colleges and universities. The
simulator was developed and tested at Clarkson Univer-
I. INTRODUCTION sity over the past three years and has been used by stu-
dents of electrical engineering, mechanical engineering,
S IMULATION is a well-established engineering tool
for design, analysis, and control of physical systems.
Computer simulation can be used to provide safe and in-
and computer science. With the use of the simulator, stu-
dents develop and test robot control programs off line
expensive training for the operation of complex and dan- without a physical robot present using the language of
gerous equipment [5]. Robotics instruction is particularly their choice. Their final programs can then be tested on
well suited for the application of graphic computer sim- the physical robots. This tends to reduce hardware main-
ulation techniques [2], [3], [6], [9], [lo], [13]-[15]. In tenance costs substantially. Experience has shown that the
this paper we describe a graphics robot simulator that was simulator is both more convenient and more reliable than
designed to run on an IBM PC/XT/AT or PS/2 personal a mechanical manipulator. For schools which plan to in-
computer [14]. The simulator features a popular educa- troduce an instructional program in robotics, but do not
tional table top robotic arm, the five-axis Rhino XR-3 ro- have the resources needed to fully furnish a robotics lab-
bot. However, other robots can also be simulated includ- oratory, a graphic robot simulator is a cost effective al-
ing two industrial robots, the four-axis Adept One and the ternative. It does require that students have access to a
six-axis Intelledex 660. The information describing the personal computer with some graphics capability, but this
robot to be simulated is contained in a data file that is general purpose tool is widely available at most institu-
specified when the simulator is installed. A second data tions.
file describing the environment or workcell within which 11. BACKGROUND
the robot is to operate is also specified at installation time.
The workcell data file can be customized by the user and In order to develop the simulator, background theory
includes an overhead camera and several workcell objects from three disciplines was needed: computer graphics, ro-
which can be sensed by the camera and manipulated by botics, and assembly language programming using inter-
the robot. rupts. Both graphics and robotics employ four-dimen-
The simulator is a terminate and stay resident (TSR) sional homogeneous coordinates which use three position
program that runs in background and can be activated by coordinates plus a scale factor [12]. Through the use of
the user either through the keyboard or from within a user homogeneous coordinates, both rotations and translations
program [ 11. The basic assumption is that the robot to be can be represented by 4 X 4 coordinate transformation
simulated is controlled through the COMl serial com- matrices. In the field of robotics, a homogeneous coor-
dinate transformation matrix is expressed as follows:
Manuscript received March 25, 1988; revised July 6 , 1989. This work
was supported by a grant from the Westinghouse Educational Foundation.
R. B. White was with the Department of Electrical and Computer En-
gineering, Clarkson University, Potsdam, NY 13676. He is currently with
the ROTC. Fort Kiley, KS.
R. K. Read, M. W. Koch, and R . J . Schilling are with the Department
of Electrical and Computer Engineering, Clarkson University. Potsdam,
NY 13676.
IEEE Log Number 8930746.
A . Graphics
One of the main features of the simulator is its 3-D
graphics display which uses a wire-frame representation
of a robot. The type of projection displayed by the sim-
ulator is an orthographic projection. An orthographic pro-
jection is a parallel projection in which the projectors
which create the image on the view plane are parallel to
each other as well as being normal to the view plane [4].
Fig. 1 shows an orthographic projection of a 3-D object,
the Rhino XR-3 robot, onto a 2-D plane. The view plane Fig. 1 . The Rhino XR-3 robot from perspective ( 1 , 1, 1 )
in this example is orthogonal to a line between the origin
and a point with coordinates (1, 1, 1). and link parameters can be used to determine the relation-
The transformation matrix Tcomposite, which the simula- ship between the coordinate frames attached to adjacent
tor uses to obtain the graphics display, maps the three links of the manipulator. This is accomplished through
dimensional points of the wire-frame robot into two-di- the use of the following link coordinate transformation
mensional points representing the projection of the robot matrix which transforms the coordinates of frame k to the
onto a 2-D plane. This matrix is derived from a view vec- coordinates of frame k - 1:
tor which is specified by the user. This allows for a wide
variety of angles at which the simulated robot can be Tf- 1
[
viewed. The derivation uses the properties of orthogonal cos ek -cos ffk sin ek sin ffk sin Ok ak cos 8
vectors, and the specific calculations can be found in [ 141.
The wire-frame representation of the robot consists of
a number of 3-D points representing the vertices of the
physical links of the robot. These 3-D points are trans-
formed by the matrix Tcomposite to obtain the 2-D view co-
ordinates. The final transformation in displaying the robot
is applied by the graphics software package [ 7 ] . A trans-
=
sin Ok cos ffk cos 8 k -sin ffk cos 8 k ak sin 0
0
0
sin f f k
0
cos CYk
0 1
dk
form is applied in order to convert the view coordinates the motion of any robot in the graphics display. The
into the pixel coordinates to be plotted on the screen. The graphics data are maintained with respect to different co-
size of the world coordinate frame depends on the view ordinate frames. In order to display the data it must first
selected and the maximum extents of the x, y, and z axes be transformed into base coordinates so the orthographic
as specified in a work cell data file. and pixel transformations can be applied. The geometric
descriptions of the links, as well as the kinematic param-
B. Robotics eters for the robot, are specified in a robot data file.
The simulator itself is not robotic specific. However, it The link coordinate transformation matrices can be
does assume a particular form for the robot controller, one combined to form the transformation matrices necessary
that is upward compatible with the controller of the Rhino to convert between any two coordinate frames. The com-
XR-3 educational robot. Thus, the simulated controller positions used by the simulator transform the coordinates
will respond to all of the commands that the Rhino XR-3 of each frame into frame 0 which corresponds to the robot
controller would, plus some additional higher level com- base. For an n-axis robot, these matrices have the follow-
mands. The characteristics of any robot with up to six ing form where k specifies the coordinate frame attached
axes, plus a tool, can be simulated. This flexibility is to the kth link:
achieved through the use of general kinematic equations.
Ti = TAT: Tf-,, 1 Ik 5 n. (3)
The Denavit-Hartenburg representation can be used to
construct a link coordinate diagram for any robot [12]. The link coordinate transformation matrices are generic
Once a link coordinate diagram is obtained, the kinematic because they depend explicitly on the kinematic parame-
parameters of the robot can be determined. These include ters as shown in (2). One drawback of this generality is
vectors specifying: the joint angles 8, the joint distances the computation involved. These matrices must be con-
d, the link lengths a , and the link twist angles a . The joint stantly updated as the simulated robot moves. Whenever
WHITE er a l . : SIMULATOR FOR ROBOTIC ARM 419
joint k moves, the matrix T i - I must be updated because key. The original keyboard interrupt sets flags for the Shift
the joint variable ( Ok or d k )has changed. To further com- and Alt keys. So if the original interrupt routine is exe-
plicate matters, whenever T i - I changes, the matrices T i cuted first, it is simply a matter of checking these flags to
for k Ii In must also be updated because of their de- see if these keys were, hit. The original interrupt routine
pendence on the matrix T i - l . can be executed before the patch code by simulating an
The simulator models joint motion as if the joint actua- interrupt. An interrupt is actually just a specialized func-
tors were variable-speed motors with incremental position tion call, the only differences being that an interrupt saves
encoders. The move commands that the simulator uses are the status flags on the stack and disables further inter-
upward compatible with those of the Rhino XR-3 con- rupts. By pushing the flags onto the stack a patch can make
troller. The microswitches associated with each joint of a the stack look like it would upon entry into an interrupt.
Rhino XR-3 robot are simulated as well. However, there A call then passes control to the original interrupt routine.
is a slight difference with the simulator. Once closed, the When the iret (interrupt return) statement is encountered
switches on the simulator remain closed as long as the at the end of that code, it will pop the flags and return
robot continues to move in the direction which first closed control to the line following the call.
the switch. On the physical robots, the switches are closed
for a limited number of encoder counts due to the nature 111. DATAFILES
of the mechanical design. The simulator itself is not robot specific. Instead, data
Inter-axis coupling is another feature supported by the describing the robot to be simulated are contained in a
simulator. On the Rhino XR-3 robot, the shoulder joint is data file that is specified when the simulator is installed.
coupled to the elbow joint, and the elbow joint is coupled The environment or workcell within which this robot is to
to the wrist pitch joint. The inter-axis coupling informa- operate can also be specified using a second data file called
tion is also specified in the data file. the workcell data file. This section explains the structure
and contents of these data files which are used to custom-
C. Interrupts ize the simulator.
The simulator is designed to run under the MS-DOS
operating system. By patching into the software interrupts A . Robot Data File
the simulator is able to monitor 1 / 0 devices from the The data files used by the simulator contain comment
background and activate itself when certain events occur. lines (starting with a ‘*’) which document the contents of
A simple example is the activation of the graphics display each file. The simulator presently supports three different
when the key stroke ( Alt F1 ) occurs. robotic arms as summarized in Table I.
Every interrupt has associated with it a vector. The in- Each robot has its own data file describing the kine-
terrupt vectors are simply addresses to which control is matics and physical appearance of the manipulator. Al-
passed when a specific interrupt occurs. DOS maintains a though different robots can be simulated, they all use one
table of these interrupt vectors. Each is four bytes in controller, a generalization of the Rhino XR-3 controller.
length and specifies the segment and offset of the start of Thus programs developed specifically for the Rhino XR-
the interrupt routine. The segment address for the vector 3 robot should run on the simulator without modification.
table is 40H (hexadecimal), while the offset within the Joint Data: The first item in the robot data file specifies
segment is 4i for the ith interrupt. In order to patch into the number of axes or joints. The tool or gripper is not
the interrupts in a manner that does not interfere with nor- regarded as a separate axis even though it has an actuator
mal operation one must save the original interrupt vector, associated with it. Following the axis specification are
set the interrupt vector to point to the new patch code, blocks of data which contain information specific to the
and have the patch code, in some way, execute the orig- each joint of the arm as summarized in Table 11.
inal interrupt routine. The joint and link parameters (6, d, a , a ) are deter-
The simulator accomplishes these tasks and therefore mined from a link coordinate diagram. The position spec-
results in no conflict with the interrupt drivers already in ified by the default values of the joint variables defines
place. The first two steps can be accomplished through the soft home position of the simulated robot. This is dis-
direct memory access or via the use of DOS functions tinct from the hard home position, the position at which
35H and 25H, respectively. The third step can be accom- all the joint microswitches are closed.
plished in a number of ways. One approach is to jump to The joint variable specification jvar allows the simula-
the original interrupt routine after executing the patch tor to model both revolute and prismatic joints. The vari-
code. This is the fastest and most straight forward ap- able jvar specifies a number, either 1 or 2, which identi-
proach. However, it can only be done at the end of the fies which parameter in the set { 6, d } is the joint vari-
patch since the original interrupt routine ends with an iret able. Thus, a ‘1’ implies that the joint is revolute, while
(interrupt return) statement which ends interrupt process- a ‘2’ implies that the joint is prismatic. The two link pa-
ing. rameters { a , (Y } are constants whose values are deter-
The original interrupt driver may provide some useful mined when the manipulator is designed.
processing that may be difficult or uneconomical for the The joint actuators of the Rhino XR-3 robot are dc servo
new code to duplicate. One such example is processing a motors with incremental encoders. Since the position en-
420 IEEE TRANSACTIONS ON EDUCATION, VOL. 32, NO. 4, NOVEMBER 1989
TABLE 1 Tool Data: Following the data for each joint of the ro-
ROBOTS
SUPPORTED
BY T H E SIMULATOR
bot is the tool data. There are two types of tools sup-
Robot TY Pe Axes
ported, a parallel jaw type gripper in which the fingers
close in a prismatic fashion, and an angular jaw type grip-
Adept One SCARA 4 per in which the fingers close in a revolute fashion. In the
Rhino XR-3 articulated 5 first case, the tool variable is the distance between the
Intelledex 660 articulated 6
fingertips, while in the second it is the angle between the
fingers. Most of the data required for the robot joints is
TABLE I1
also specified for the tool including: tool precision, tool
DATAf:OR EACHJOINT speed, tool limits, microswitch position and mask, and
tool label. Unlike the links of the robot, the tool is not
Item Units one solid piece. Therefore, the parts of the tool that move
joint angle: 0 degree
when the tool is activated (opens/closes) are also specified
joint distance: d inch (mm) in the data file.
link length: a inch (mm) Link Data: Recall that coordinate frame k is attached
link twist angle: 01 degree to link k and moves with it. We define the points describ-
joint variable: jvar none
joint precision units/count ing the physical shape of link k using frame k coordinates.
joint limits counts Thus the base is defined with respect to frame 0, the
joint speed countsis shoulder is defined with respect to frame 1, and so on until
microswitch position counts
microswitch mask none we get to the tool which is defined with respect to frame
joint direction none n. A change in joint variable k causes a change in the
joint label none position and orientation of frames k through n . Since link
k is defined in terms of frame k , the position and orien-
tation of link k in the graphics display will change as joint
coders are incremental, the absolute joint position cannot variable k changes.
be determined directly, only the change in position can The links of the robot are specified as a series of 3-D
be measured. The joint precision is the amount of change points. Associated with each point is a command: move
in the joint variable corresponding to one change of state or draw. A point command of ‘1’ implies that the graphics
(count) of the incremental encoder. The precision is spec- cursor should move to this point, while a command of ‘0’
ified in jvar units per count. implies that a vector should be drawn to the point. Up to
The joint limits specify the valid range of travel for each 48 points can be used to specify the physical shape of each
joint. For a revolute joint the limits are specified as a min- link. A color index is also included for each link because
imum and maximum angle, while for a prismatic joint they adjacent links can be more easily distinguished when
are specified as a minimum and maximum extension. For drawn in different colors or different shades of a color.
a joint which has no limit, such as the wrist roil of the The 3-D graphics points for link k are mapped to base
Rhino XR-3, very large limits are specified. coordinates by the matrix Th specified in (3), and the 3-D
The joint speed, like the precision, is expressed in terms base coordinates are mapped to 2-D world coordinates by
of the simulated actuators. The speed is specified in units TcompoSlte. Finally, the world coordinates are translated to
of encoder counts per second. The values in the existing pixel coordinates by the graphics software package [7] and
data files are approximations of the observed speed of the the result is the wire-frame robot we see on the screen.
physical robot. General Data: There are some data that apply to the
In order to simulate the Rhino XR-3 controller as manipulator as a whole. For example, inter-axis coupling
closely as possible, microswitches have also been in- is a feature that was included in the simulator to allow for
cluded in the simulator. The microswitch positions are accurate simulation of the Rhino XR-3 robot. Since cou-
specified in encoder counts. Microswitch bit masks are pling between joints is robot specific, this is another char-
also included and are used to simulate the Rhino XR-3 acteristic which is defined in the robot data file. The mo-
commands which return the status of the microswitches. tion of any joint of the robot can be physically coupled
The joint direction indicator is used to define the direc- with any other joint. For the Rhino XR-3 robot the shoul-
tion of positive movement for the actuators. An indicator der is coupled to the elbow, and the elbow is coupled to
of ‘1’ implies that the positive direction of the actuator the wrist pitch. Both couplings are opposing, so a move-
corresponds to increasing values of the joint variable, ment of m counts in one joint results in a movement of
while a ‘ - 1’ indicates the opposite direction. -m counts in the other. In the data file this is specified
Joint labels are individual letters used to distinguish one by saying joint 2 is coupled to joint -3, and joint 3 is
joint from another. With the Rhino XR-3 robot, the tool is coupled to joint -4, the negative joint numbers indicating
labeled A , the wrist roll joint is labeled B , and so on an opposing motion due to the coupling.
through the base joint which is labeled F. These joint la- Another general feature included in the simulator is the
bels are used in commands which control the robot motion introduction of a protected region about the base of the
181. robot. If the tool enters this protected region, the simu-
WHITE er o l . : SIMULATOR FOR ROBOTIC ARM 42 1
lator will stall. The region is defined as a cylinder about of the block measured with respect to the x axis of the
the base axis of the robot. The height and radius of this base. The blocks are represented in the same manner as
cylinder are specified in the data file. Of course, the sim- the links of the robot, except that the vertices of each block
ulated robot does not have to worry about reaching inside are defined with respect to its centroid.
itself, but with a physical robot this can be hazardous to The simulated robot is able to manipulate the blocks. If
its health! a block is grasped by the tool, the vertices of the block
The last item in the robot data file is the specification are drawn with respect to the tool coordinate frame. When
of the net wrist roll. This information is used in conjunc- the block is released, the block centroid is updated to the
tion with manipulating blocks in the workcell. The net new tool tip position and the block orientation is updated
wrist roll is determined by summing joint variables of to reflect the current orientation (net wrist roll) of the tool.
joints specified in the data file where a negative joint in- To keep the simulator simple, dynamic effects including
dex indicates subtraction instead of addition. The net wrist gravity are not simulated. Therefore if a block is released
roll is a useful way to specify the global orientation of the in midair, it will remain there rather than fall to the work
tool when objects are being manipulated from directly surface.
above. Sensor Data: There is only one workcell sensor that is
simulated. It is a binary vision system with a single, sta-
B. Workcell Data File tionary camera mounted directly over the work surface.
Whereas the robot data file allows one to simulate dif- The information supplied in the data file includes the lo-
ferent manipulators. the workcell data file allows one to cation of the camera in base coordinates, the length and
simulate different rnvironmenrs for each manipulator. A width of the field of view, and the precision of the vision
customized workcell data file can be created by using an system in pixels the and y
interactive program called WORKCELL.COM. "The IV. INTERRUPTS
workcell data file specifies the size of the workspace, the
blocks or objects in the workspace, and the sensors used The simulator is a terminate and stay resident (TSR)
to locate these objects. program that runs in the background and is invoked au-
Workspace Data: The first item found in the workcell tomatically when certain events occur [l]. Each of these
events generates an interrupt on an IBM PC/XT/AT or
data file is the size of the workspace which is defined by
PS / 2 computer running MS-DOS. The simulator makes
three numbers: X , Y , Z. The workspace is defined as the
box with the following extents relative to the base coor- use of the four interrupts listed in Table 111.
The timer tick interrupt and INT 28H are used for tim-
dinate frame:
ing purposes. Through the use of these interrupts, the
0 I X S X , simulator is able to model the time-varying behavior of
-Y 5 y I Y , (4) the manipulator. The keyboard interrupt allows the user
to invoke certain functions of the simulator directly from
0 I Z I Z .
the keyboard. For example, ( Alt F1 ) invokes the graph-
Thus, a region in front of, above, and to both sides of ics display.
the robot base is specified. A small region behind the base The fourth interrupt the simulator uses is the Serial 1 / 0
axis ( x < 0 ) sufficient to display the back of the robot is interrupt. Recall that the simulator is based on the Rhino
also included. The values of X , Y , and Z determine the XR-3 controller. With this controller, all communication
view volume. The view volume is the volume in three- with the robot is through an RS232-C serial port. Thus
space which gets projected onto the view plane. What is the robot behaves as if it were a COMl device. When the
actually determined is the size of the view plane. The simulator is enabled, it intercepts all commands sent to
points ( X , 0, 0), (0, Y , 0 ) , (0, - Y , 0 ) , and (0, 0, 2 ) the COMl device and responds to them as if it were the
are transformed to 2-D coordinates and the minimum and actual controller.
maximum values of these points determine the minimum The Serial 1 / 0 interrupt occurs every time a character
and maximum extents of the view plane. This calculation is input from or output to a serial port via a BIOS function
is done every time the view vector changes, since this call. Upon entry to the interrupt routine, register DX con-
changes the line-of-sight and hence the orientation of the tains the serial card number ( 0 or 1 ), register AH contains
axes on the screen. the operation code (op code), and register AL contains the
Block Data: Following the workspace specifications are ASCII code of the character. A flowchart describing the
the block specifications, one per line. Up to five blocks actions taken by the simulator when the Serial 1 / 0 inter-
or workcell objects can be defined. In order to simplify rupt occurs is shown in Fig. 2.
the simulator, each block is assumed to be a rectangular The first thing the simulator does is to check if the ac-
box. The information that the simulator needs for each cess is for COM 1. This is done by checking to see if DX
block is its length, width, height, initial position, and ini- is equal to zero. If it is not, then we do not want to process
tial orientation. Position and orientation are specified with it so we simply pass control to the original interrupt rou-
respect to the robot base frame with orientation being the tine by jumping to it. If the access is for COM 1, we con-
angle of rotation about a vertical axis through the centroid tinue by checking to see if the op code is a 1. This tells
422 IEEE TRANSACTIONS ON EDUCATION, VOL. 32, NO. 4, NOVEMBER 1989
Function Default
A. Command Mode
In the command mode the simulator uses the function Alt KP- Enter/Exit Command Mode Menu inactive
keys ( Alt F1 ) - ( Alt F6 ) and the key ( Alt KP- ) where Alt F1 Display Robot display off
Alt F2 Change View Vector (1, 1, 1 )
KP- stands for the key pad “ - ” key. The functions of Alt F3 Home Robot home position
each of the command mode keys and their default condi- Alt F4 Select Status Line Option blank
tions are summarized in Table IV. Alt F5 EnableiDisable Simulator enabled
Alt F6 EnabldDisable Function Keys enabled
EntedExit Command Mode Menu: (Alt KP-) : The En-
cer/Exit Command Mode Menu option, ( Alt KP- ), al-
lows the user to review the options available in Command TABLE V
Mode. It displays a menu similar to Table IV and allows STATUS
LINEOPTIONS
the user to execute any of the functions or return to the
mode active when the menu was selected. The Alt prefix Option Display
allows the user to invoke the Command Mode options di-
Blank line
rectly. The Alt key should nor be used from within the Tool-Configuration Vector: HI
Most of these enhanced commands (plus some others) can uv Return the microswitch state for joint a 0, I
amS Set the speed ofjoint a to rn counts/sec -
be implemented on a physical Rhino XR-3 robot through
a change in the controller firmware [ l 11. The variable a
in Table VI specifies a joint label in the range of A through the robot data file. This command will change the speed
G, the variable n is a signed one-byte integer in the range for joint a to m counts/second. The valid range for m is
of [ - 128 * * 1271, and the variable m is an unsigned one- [ l * * 2551.
byte integer in the range [ 0 . . 255 ]. The program mode commands in Table VI are com-
Move Joint: an: This command is used to move joint a mands that control the motion of simulated robot. A sec-
by n encoder counts. The move is accomplished by add- ond group of program mode commands select simulator
ing n to the 8-bit error counter for the joint. Whenever an options and read workcell sensors. These program mode
error counter is nonzero, the simulator moves the joint environment commands are summarized in Table VI1
associated with it in the direction which reduces the mag- where square brackets [ ] denote optional arguments.
nitude of the error. The move command is not executed Graphics Display: A#: The A# command activated
instantaneously, but occurs over time as it does with the deactivates the graphics display of the robot. Once acti-
physical robot. vated, the graphics display will remain active and will be
Stop Joint: ax: The stop command is used to stop joint updated periodically until another A# command is sent.
a after it has been activated by a move command. This The default period for refreshing the graphics display is
command has the effect of setting the error counter for about three seconds, but this can be changed.
joint a to zero. Change View Vector: A!x, y , z!: The !x, y, z! com-
Query Joint: a?: The query joint command is used to mand changes the view vector for the graphics display to
determine exactly how far joint a has moved. This com- ( x , y, z ) . Here ( x , y, z ) are integer values in the range
mand provides a response on the COMl serial port (ad- [ -9 91 representing the coordinates of the end point
dress 3F8H) which can be read by the user program. The of the line-of-sight. For example, to look at the robot from
value returned is the magnitude of the error counter, plus the side along the y axis a view vector of ( 0 1 0 ) could
32. be used.
Interrogate Switches: AI, AJ: The interrogate switches Home Robot: A$: The A$ command puts the simulated
commands return the status of the microswitches associ- robot in the soft home position. This command is useful
~ ated with each of the joints of the robot, plus 32. The to recover from a stall, or in any robot control program
value (0 for open, 1 for closed) of each of the switches which assumes that the robot starts out in the home po-
can be masked out of the response to this command. The sition. The A$ command and ( Alt F3 ) can be used in-
switch masks are specified in the robot data file. The one- terchangeably.
byte response to this command is obtained through the Enable/Disable Simulator: A@: The A @ command en-
COMl serial port. ableddisables the simulator in the same manner that ( Alt
Extended Query: UT: The extended query command is F5 ) does in the Command Mode. If a physical robot is
a more versatile implementation of the query command. connected to the COMl port of the computer, then the
It returns the actual value of the error counter. For ex- simulator must be disabled when the robot is to be con-
ample, if the error counter for joint a was - 10, then the trolled directly. When the simulator is disabled all com-
query command would return 1 - 10 1 + 32 = 42, but the mand mode keys are still active so the simulator can sub-
extended query would return the value - 10, expressed as sequently be enabled at any time. The A @ command and
a one-byte two’s complement integer. ( Alt F5 ) can be used interchangeably.
Joint Switch: aV: The joint switch command is an en- Set Screen Updated Period: A.x: The A . x command
hanced implementation of the interrogate switches com- sets the update period for the graphics display to x / 2 sec-
mand. It returns the status of the switch associated with onds. The default value is x = 6 which updates the graph-
joint a. The status is 0 if the switch is open and 1 if it is ics display every 3 s. If x is set too small, the simulator
closed. will spend almost all of its time updating the graphics dis-
Set Joint Speed: mS: The set joint speed command is play, and will have little time left to execute the user pro-
used to control the speed of the individual joints of the gram that moves the robot.
robot. The simulator initially moves the joints at a default Path Option AI: The AI command toggles a flag which
speed, specified in counts per second, which is taken from tells the simulator whether or not to erase the screen be-
WHITE er al.: SIMULATOR FOR ROBOTIC ARM 425