NIST TECHNICAL NOTE 1250

(formerly National Bureau of Standards)

.^eW^°'^CQ

\^f-ATES 0^ ./

U.S. DEPARTMENT OF COMMERCE

National Institute of Standards and Technoloqy

(formerly National Bureau of Standards

Robot Systems Division

Quoo

NIST Technical Note 1250

The NBS Real-time Control System

User^s Reference Manual

Stephen A. Leake and Roger D. Kilmer

Center for Manufacturing Engineering

National Engineering Laboratory

National Institute of Standards and Technology

(formerly National Bureau of Standards)

Gaithersburg, MD 20899

NOTE: As of 23 August 1988, the National Bureau of Standards (NBS) became the National Institute of Standards and Technology

(NIST) when President Reagan signed into law the Omnibus Trade

and Competitiveness Act.

October 1988

U.S. Department of Commerce

C. WiUiam Verity, Secretary

National Institute of Standards and Technology

(formerly National Bureau of Standards)

Ernest Ambler, Director
National Institute of Standards U.S. Government Printing Office For sale by the Superintendent

and Technology Washington: 1988 of Documents,

Technical Note 1250 U.S. Government Printing Office,

Tech. Note 1250 Washington, DC 20402

381 pages (Oct. 1988)

CODEN: NBTNAE
ERGO® is a registered trademark of Micro-Term, Inc.

MULTIBUS® is a registered trademark of Intel Corporation.

Polaroid^'^ is a trademark of Polaroid Corporation.

polyFORTH 1 is a licensed product of FORTH, Inc.

VAL^'^is a trademark of Unimation, Inc., A Westinghouse Company, Danbury,

Connecticut.

The material presented in this document was prepared by United States

Government employees as part of their official duties and is therefore a work

of the U.S. Government not subject to copyright.

Commercial equipment is identified in this paper in order to adequately

describe the systems under development. In no case does such identification

imply recommendation by the National Bureau of Standards, nor does it imply

that this equipment was necessarily the best for the purpose.

Ill

FORTHInc 111 N. Sepulveda Blvd. Manhattan Beach, CA 90266

(213)372-8493

ORDER FORM AND LICENSE AGREEMENT

FOR FORTH. INC. PROGRAM PRODUCTS

FORTH, INC. by acceptance of this Order and Agreennent by signature at its headquarters agrees to grant and Custonner

agrees to accept on the terms and conditions of the agreement, including those set forth on the reverse side, a non-transferable

and non-exclusive license to use the Licensed Programs, listed below, and those v^/hich are ordered from time to time by

the Customer subject to v\/ritten confirmation by FORTH, INC.

PROGRAM PRODUCTS

FORTH, Inc. Product Code

polyFORTH system to be provided

by the National Bureau of Standards

Designated Computer System

NBS Real-time Control System

Charges

$150.00

California Sales Tax

TOTAL

THE CUSTOMER ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS IT AND AGREES TO BE

BOUND BY ITS TERMS AND, FURTHER. AGREES THAT IT IS THE COMPLETE AND EXCLUSIVE STATEMENT OF THE

AGREEMENT BETWEEN THE PARTIES. WHICH SUPERSEDES ALL PROPOSALS, ORAL OR IMPLIED AND ALL OTHER

COMMUNICATIONS BETWEEN THE PARTIES RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.

FORTH, INC.

Company Name

Address

Signature Authorized Signature

Name and Title Name of Signer and Title

Date Date
LICENSED PROGRAMS

Licensed Programs means the FORTH software and related materials furnished to Customer under this Agreement. Software may include without

limitation: subroutines, dictionaries, peripheral handlers/drivers, source listings, compiler, meta-assembler, assembler, interpreter, utility routines, mathematical

routines, optional routines, multiprogrammer, and text editor, Related materials

refer to all materials and documentation furnished to Customer in support of software such as, without limitation, training manuals, specifications, drawings, and the like.

OPTIONAL MATERIALS

For certain Licensed Programs FORTH, Inc. will offer to Customer

related Optional Materials as a separate item under this Agreement. When

Optional Materials are ordered by the Customer, the term "Licensed Programs"

shall also refer to the Optional Materials.

LICENSE

Each license granted to the Customer hereunder authorizes the Customer only to use the Licensed Program on or for the designated single Computer System for which it was ordered. Customer understands and agrees

that a separate license and license fee is required to use Licensed Programs

or any part thereof on or for any other Computer System.

COPYING

Customer may copy Licensed Programs solely for archival purposes on the designated single Computer System, No other right to reproduce or copy Licensed Programs in whole or in part is granted hereby except in a

target-compiled form which contains neither assembler nor compiler. FORTH,

Inc. has no liability or obligation with respect to any such target-compiled Licens- ed Programs.

TITLE

Title to and ownership of Licensed Programs, or any copies thereof,

shall at all times remain in FORTH, Inc.

PROTECTION OF LICENSED PROGRAMS

Licensed Programs include valuable information which is proprietary and confidential. Customer agrees to maintain the confidentiality of Licensed Programs and to not reproduce, provide, disclose, distribute, or otherwise make

available any item of Licensed Programs, in any form, to any person other than Customer or FORTH, Inc. employees without prior written consent of FORTH, Inc., except that Licensed Programs may be included in Customer's

products in a cross-compiled or compressed form which is not extensible. Additional copies of Licensed Programs may be licensed from FORTH, Inc. at charges then in effect. Customer agrees to take appropriate action by instruction, agreement,

or othenwise with his employees or other persons permitted access to Licensed Programs to satisfy his obligations with respect to use, copying, protection, and security of Licensed Programs.

TERM AND TERMINATION

This Agreement is effective from the date on which it is accepted by

FORTH, Inc and shall remain in force until the Agreement is terminated as

hereinafter provided.

In the event Customer neglects or fails to perform or observe any of the obligations or conditions under this Agreement, and if such obligations

or conditions are not remedied within twenty (20) days after written notice therof has been given to Customer, this Agreement and all licenses granted hereunder

shall immediately terminate. Within two (2) weeks after any such termination. Customer shall certify

in writing to FORTH, Inc. that through its best efforts and to the best of its knowledge, the original and any and all copies, in any form, including partial copies or modifications, of Licensed Programs have been destroyed,

WARRANTY

Licensed Program ordered by Customer shall be free from defects in material and workmanship and shall operate in accordance with applicable

FORTH, Inc. specifications. This warranty is for sixty (60) days following receipt

of Licensed Programs by Customer. During this warranty period, FORTH, Inc.

will at Its option, repair or replace any software which proves to be defective THE FOREGOING WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES,

EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR

PURPOSE and the stated express warranty is in lieu of all liabilities or obligations of FORTH, Inc. for damages including, but not limited to, consequential

damages occurring out of or in connection with the use or performance of Licensed Programs. The Customer acknowledges that it has not been induced to enter into

this Agreement by any representations or statements, oral or written, not ex-^M

pressly contained herein or expressly incorporated by reference. ^^

LIMITATION OF LIABILITY FORTH, Inc. will refund the purchase price or replace or correc! any

defective item at FORTH, Inc 's expense provided prompt written notice of the defect is given to FORTH, Inc. The Licensed Programs licensed hereunder are for use on the stan- dard Computer System designated by the Customer FORTH, Inc. assumes

no liability for any malfunction resulting from the use of Licensed Programs

with other than such a standard Computer System or from equipment defects. Should Customer desire to have such a malfunction corrected. Customer shall pay for all work performed by FORTH, Inc. in defining and correcting the malfunction based upon FORTH, lnc!s standard consulting rates then

prevailing. Customer agrees that FORTH, lnc!s liability hereunder for damages

including but not limited to liability for patent and copyright infringement shall not exceed the charges paid by Customer for the particular Licensed Pro- gram involved Customer further agrees that FORTH, Inc. will not be liable

for any lost profits, nor for any claim or demand against the Customer by any

other party. No action, regardless of form, arising out of the transactions under

this Agreement, may be brought by either party more than one year after the cause of action has accrued, except that an action for non-payment may be

brought within one year after the date of last payment. IN NO EVENT WILL FORTH, INC. BE LIABLE FOR INDIRECT OR CONSEQUENTIAL DAMAGES

EVEN IF FORTH, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH

DAMAGES.

DELIVERY

Licensed Programs will be shipped to Customer generally with one ( 1

)

month after order confirmation unless Customer requests a later delivery date. However, FORTH, Inc. does not represent nor warrant any such shipment

date and in no case will FORTH, Inc. be liable for late or nondelivery due to war, acts of God, strikes, shortages of equipment, or other causes beyond

its reasonable control. TRAINING

^

FORTH, Inc. will provide with the Licensed Programs furnished to Customer reasonable training materials for use of the Licensed Programs on

the designated Computer System. Upon the Customer's request, FORTH, Inc.

will provide additional training at charges then prevailing. CONSULTING

Upon request, FORTH, Inc. will provide consulting services to Customer

at FORTH, Inc.'s standard rates then prevailing. TERMS

The changes for the Licensed Programs set forth on the reverse side hereof are payable on delivery unless designated otherwise, RETURN POLICY

NO RETURNS ACCEPTED WITHOUT PRIOR WRITTEN AUTHORIZATION. Normal restocking charge on returns is 25% of P.O. amount. Merchandise held over 30 days from invoice date is not subject to return. ASSIGNMENT—SUBLICENSE

This Agreement, the Licenses granted hereunder, and Licensed Pro- grams transferred hereunder may not be assigned, sublicensed, or transferred by the Customer without prior written consent from FORTH, Inc. GENERAL

The term "this Agreement" as used herein includes any future written amendments, modifications, or supplements thereto. The terms of this Agreement will take precedence over the terms of any present or future order from the Customer for any license hereunder. Customer agrees that acceptance of future delivery of any Licensed Programs

from FORTH, Inc. is conclusive evidence of his agreement that the license

for such Program is governed by the terms of this Agreement.

If any of the provisions, or portions thereof, of this Agreement are in- ^^ valid under any applicable statute or rule of law, they are to that extent to be|j^^

deemed omitted. This Agreement will be governed by the laws of the State of California.

VI
INSTRUCTIONS FOR ORDERING RCS SOFTWARE

Required Items to be Sent to NBS:

(1) Copy of valid Order Form and License Agreement from FORTH, Inc. This is obtained by

submitting an Order Form and License Agreement form for polyFORTH (a copy is provided on the next page) to FORTH, Inc. at the listed address. There is a fee of $150

which must be sent to FORTH along with the Order Form and License Agreement.

(2) Four (4) Intel Model D2732A EPROMs (or equivalent) for each single-board computer in

the system. For a complete RCS system (four single-board computers), a total of sixteen

(16) EPROMs are required.

(3) One (1) DataTech Model QuadPlus 1/2" tape (or equivalent), 2400-foot length and 6250

bpi rating.

(4) Completed Order Form from the bottom of this page.

Send these items to the following address:

Robot Systems Division

National Bureau of Standards

Building 220, Room B 127

Gaithersburg, MD 20899

^x ATTN: RCS User's Group

Include the following with your order;

NBS RCS SOFTWARE ORDER FORM

Company Name:

Mailing Address:

Telephone No.:

Person to Contact:

Vll
m
TABLE OF CONTENTS

Page

Chapter 1 INTRODUCTION

1 .

The Purpose of RCS 1-1

1.2 About This Manual 1-1

How This Manual is Organized 1-1

Documentation Conventions 1-2

System Word Conventions 1-3

1 .

3

Who Should Use This Manual 1-3

Entering Data for an Existing Application 1-4

Modifying an Existing Application 1-4

Creating New Applications 1-4

Chapter 2

RCS OVERVIEW

2.1 What is RCS? 2-1

Multiprocessor System 2-1

Hierarchical Control Levels 2-1

Modular Architecture 2-1

Control Function Techniques 2-2

2.2 The Attributes of RCS 2-2

Modularity 2-2

Flexibility 2-3

Understandability 2-3

2 .

3

RCS as an Input-Process-Output Structure 2-3

2.4 Processing Within a Generic Control Level 2-4

Preprocessing 2-5

Decision Processing 2-5

Postprocessing 2-7

Chapter 3

RCS ARCHITECTURE

3 .

Hierarchical Control Architecture 3-1

Structure of a Control Level 3-1

Cyclical Control-Level Processing 3-2

Control-Level Decision Processing 3-2

Interlevel Communications 3-4

3.2 RCS Programs 3-4

XX
Page

3 . 3 RCS Common Memory 3-4

System Dictionary 3-4

Communication Buffers 3-5

Data in Common Memory 3-5

Pose data 3-6

Object data 3-7

Location data 3-7

Trajectory data 3-8

Chapter 4

RCS COMPONENTS

4.1 Hardware Components of RCS 4-1

MULTIBUS Address Space Organization 4-2

MULTIBUS I/O Space Organization 4-2

RCS Interrupt Structure 4-2

RCS Disk Block Organization 4-2

4 .

2

Software Components of RCS 4-2

The Operating System 4-3

System utilities > 4-3

Multiprocessor operation 4-3

Background tasks 4-3

Interrupt routines 4-4

Operating modes 4-4

RCS SMACRO Language 4-4

SMACRO Files 4-4

Disk Files 4-5

Robot Sensor Language ( RSL

)

< 4-5

System Dictionary Vocabularies 4-5

The Communications Utility (COMM) 4-5

Chapter 5

RCS INSTALLATION PROCEDURES

5 .

1

Hardware Requirements 5-1

Minumum Hardware Requirements 5-2

Unimate Puma 760 Robot Requirements 5-2

Additional Components 5-3

5 .

2

Robot Interface Requirements 5-3

5 .

3

Software Requirements 5-4

5 .

4

Hardware Installation Procedures 5-4

Configuring the Processor Boards 5-4

Installing processor-board jumpers 5-4

Installing the FORTH PROM circuits 5-5

Installing the 8087 numeric data processors 5-5

Installing heat sinks 5-5

Installing the bus clock 5-5

Configuring interprocessor communications 5-6

X
Page

Configuring the Common Memory Board 5-6

Configuring the Disk and Tape Controller Board 5-6

Configuring the Disk Drive 5-7

Configuring the Terminal 5-8

Configuring the Printer 5-9

Preparing to Install the RCS Software 5-10

5 . 5 Software Installation Procedure 5-10

Chapter 6

BASIC RCS OPERATIONS

6 .

1

Starting the System 6-1

6 .

2

Moving From One Board to Another 6-2

Using Software Switches 6-3

Using a Hardware Switch 6-3

Changing Vocabularies 6-3

6 .

3

Locating Source Code 6-4

Using the LOC Command 6-4

Using the Locate Mode 6-4

Understanding Directory Block Conventions 6-4

Using Relative and Absolute Block Addresses 6-5

Specifying an Offset 6-5

An Example of Using the RCS Directory Block System 6-5

6 .

4

Loading Code 6-9

Editing and Reloading a Routine 6-10

Loading Routines Under Development 6-10

6 .

5

Executing Tasks and Routines 6-11

Executing Robot Tasks 6-11

Executing Routines 6-11

Understanding Modes 6-12

Controlling Screen Output 6-12

Aborting an Executing Task 6-12

6.6 Saving and Rebooting the System 6-12

Saving and Restoring Disk Images 6-13

Saving and Restoring the System Dictionary 6-16

Saving and Restoring User Files 6-16

6.7 Editing a Block of Code 6-16

Using Screen-Editor Commands 6-17

Character operations 6-19

Line operations 6-20

Block operations 6-20

Special operations 6-22

Using Line-Editor Commands 6-22

6.8 Example RCS Dialogue 6-24

6 .

9

Using Printing Utilities 6-28

Printing a Range of Blocks 6-28

Printing Block Directories and Programs 6-29

xi
Page

6.10 Using Tape Utilities 6-29

Backing Up the System on Tape 6-29

Solving Bad-Tape Problems 6-29

Reading a Tape 6-29

6.11 Shutting Down the System 6-30

Chapter 7

SMACRO

7 .

1

Overview 7-1

7.2 SMACRO Syntax 7-1

Programming Conventions 7-2

Variable Declarations 7-3

Members and Owners 7-^

Variable owners 7-^

Sequential variable owners 7-6

List owners 7-7

File Declaration 7-8

SMACRO Operators for Standard Programming Operations 7-8

Arithmetic operators 7-9

Assignment operators 7-10

Relational operators 7-10

File operators 7-11

Additional SMACRO Operators 7- 1 ^ Bit operators 7-15

1/0 operators 7-15

Stack operators 7-15

Matrix, pose, quaternion, and vector operators 7-16

Other SMACRO operators 7-16

SMACRO Statements 7-17

7 .

3

SMACRO Routines 7-18

7.4 Modes 7-18

7 .

5

Board Level Processes 7-19

7 .

6

Interrupts and Assembly Language 7-19

Chapter 8

COMMUNICATIONS

8 .

1

Using Memory Files to Pass Data 8-1

8.2 Using COMM to Pass Command and Status Information 8-1

8.3 Programming COMM 8-3

8 .

4

Communicating on the Same Board 8-4

XXI
Page

Chapter 9

ROBOT SENSOR LANGUAGE (RSL)

i

9.1 What is RSL? 9-1

9.2 RSL Overview 9-3

The Pose Statement 9-3

The Movetable Statements 9-4

The Location Statement 9-4

The Array Statement 9-4

The Object Statement 9-4

The Path Statements 9-4

The Path-Point Statement 9-5

The Round-Robin Statement 9-6

Example RSL Code 9-6

9 .

3

Entering and Editing RSL Source Code 9-7

9 .

4

Compiling RSL Source Code 9-8

9 .

5

Executing RSL Commands 9-8

Chapter 10

RSL CONTROL LEVELS

10.1 Overview of RSL Control Levels 10-1

10.2 RSL Data Structures 10-3

The Pose Data Structure 10-4

The Movetable Data Structure 1 0-4

The Location Data Structure 1 0-5

The Array Data Structure 1 0-6

The Object Data Structure 10-7

The Path Data Structure 10-8

The move-to path type 1 0-8

The approach-pickup path type 1 0-9

The depart-pickup path type 1 0-9

The approach-release path type 10-10

The depart-release path type 10-10

The Path-Point Data Structure 10-10

The Trajectory Data Structure 10-11

The Round-Robin Data Structure 10-12

10.3 RSL Compiler 10-14

Utility Routines 10-15

Environmental Data Routines 10-16

Routines to Compile Trajectories 10-16

Routines to Compile Path-Points 10-17

Routines to Compile Paths 10-18

10.4 The Task Level 10-19

TASK Commands 10-19

TASK Input Command Buffer 1 0-2

1

TASK Status Information 10-22

TASK Variables 10-22

TASK Errors 1 0-23

TASK Utilities 10-2^

Xlll
Page

TASK Processing 10-26

TASK preprocessing 10-26

TASK decision processing 10-27

TASK postprocessing 10-29

10.5 The Path Level 10-29

PATH Commands 10-29

PATH Input Command Buffer 10-30

PATH Status Information 10-31

PATH Errors 10-31

PATH Processing 10-32

PATH preprocessing 1 0-32

PATH decision processing 10-33

PATH postprocessing 1 0-36

10.6 The Prim Level 10-36

PRIM Commands 10-37

PRIM Input Command Buffer 1 0-38

PRIM Status Information 10-38

PRIM Trajectory Information 10-39

Joystick HOLD-SET and HOLD-CLEAR Buttons 10-40

PRIM Variables 10-40

PRIM Errors 10-42

PRIM Processing 10-42

PRIM preprocessing 1 0-42

PRIM decision processing 10-44

PRIM postprocessing 10-46

10.7 The Joint Level 10-47

JOINT Commands 10-48

JOINT Input Command Buffer 1 0-50

JOINT Status Information 10-50

JOINT Errors 10-51

JOINT Processing 10-51

JOINT preprocessing 1 0-5

1

JOINT decision processing 10-52

JOINT postprocessing 10-54

JOINT Robot-Dependent Routines 10-54

Chapter 1

1

RSL EXTENSIONS

11.1 Understanding the Types of Extensions 11-1

11.2 Adding a Task to RSL 11-1

11.3 Adding a Path to RSL 11-2

11.4 Adding a Path-Point to RSL 11-3

Adding Code on the RSL Board 1 1-4

Adding Code on the TASK&PATH Board 11-5

11.5 Adding a Trajectory Type to RSL 11-6

Adding Code on the RSL Board 1 1-6

Adding Code on the TASK&PATH Board 11-7

Adding Code on the PRIM Board 1 1-8

XIV
Page

Chapter 12

RCS APPLICATION EXAMPLES

12.1 A Machining Station in the Automated Manufacturing

Research Facility 12-1

The Horizontal Machining Workstation 12-1

Hardware configuration of the T3 RCS 12-3

Software configuration of the T3 RCS 1 2-5

T3 UNLOAD Tray Example 12-9

12.2 The Field Materiel-Handling Robot Control System 12-11

Hardware Configuration for the FMR 12-11

Software Configuration for the FMR 12-14

FMR Transfer Example 12-18

Chapter 13

DEBUGGING TECHNIQUES

13.1 Debugging Interactively Using Show Mode 13-1

13.2 Single-Stepping Through a Routine 1 3-3

13.3 Single-Stepping Through the RSL Control Levels 1 3-4

13.4 Isolating Problems 1 3-9

13.5 Creating Debugging Routines 13-13

13.6 Using Other Debugging Techniques 13-14

RCS Hardware Debugging Techniques 13-15

RCS Software Debugging Techniques 13-15

RSL Software Debugging Techniques 13-15

Appendix A

RCS, 8087, AND DISK AND TAPE ERROR MESSAGES

A.I RCS Error Messages A-1

A. 2 8087 Error Messages A-4

A . 3 Rimfire Disk and Tape Error Messages A-4

Appendix B

USER WORD SUMMARY

B.I RCS Words B-19

Operating System Words B-19

MBOOT/CUSTOM words B-19

Terminal words B-24

Printing words B-26

Tape words B-28

Editing words B-29

Remote-slave words B-33

Miscellaneous RCS words B-35

FORTH Words B-46

SMACRO Words B-54

SMACRO declaration words B-54

XV
Page

Predefined SMACRO variable words B-57

SMACRO operator words B-59

SMACRO vector-operator words B-68

SMACRO quaternion-operator words B-70

SMACRO matrix-operator words B-7

SMACRO pose-operator words B-72

SMACRO Boolean-operator words B-74

SMACRO file-operation variable words B-78

SMACRO file-operation header variable words B-78

SMACRO file-operation words B-80

SMACRO Boolean file-operation words B-83

SMACRO statement words B-84

Miscellaneous SMACRO words B-90

COMM Words B-92

B.2 RSL Words B-94

RSL Operating System Words B-9^

Language Words . . . e B-98

TASK Command Words B-104

RSL System Parameter Words B-105

JOINT parameters B-105

PATH parameters B-107

PRIM parameters B-107

RSL parameters B- 108

Control-Level Words B-108

Appendix C

SYSTEM MAPS

C. 1 Multibus Address Space .C-1

C.2 Multibus I/O Space Organization C-1

C . 3 RCS Interrupt Assignments C-2

C.4 Timers C-2

Appendix D

RCS DISK BLOCK ORGANIZATION

Appendix E

8087 OPERATION CODES FOR RCS

Appendix F

JOYSTICK SCHEMATICS

Appendix G

GLOSSARY

#

XVI
Page

Appendix H

BIBLIOGRAPHY

Robotics H-1

Robot Interface Specifications H-1

Real-Time Control System (RCS) H-2

FORTH H-3

General FORTH Documents H-3

FORTH Reference Manuals H-3

Hardware Reference Manuals H-^

Processor and I/O Boards H-4

Memory Boards H-5

Disk and Tape Controller Board H-5

Tape Drive H-5

Winchester Disk Drive H-5

MULTIBUS Chassis H-6

Terminals H-6

Printers H-6

•

xvii

LIST OF FIGURES

Figure 2-1.

Figure 2-2.

Figure 2-3.

Figure 2-k.

Figure 3-1.

Figure 3-2.

Figure 3-3.

Figure 3-^.

Figure 3-5.

Figure 3-6.

Figure 5-1.

Figure 6-1.

Figure 6-2.

Figure 6-3.

Figure 6-4.

Figure 6-5.

Figure 7-1.

Figure 7-2.

Figure 7-3.

Figure 7-4.

Figure 7-5.

Figure 7-6.

Figure 7-7.

Figure 7-8.

Figure 8-1.

Figure 9-1.

Figure 10-1.

Figure 10-2,

Figure 12-1.

Figure 12-2.

Figure 12-3.

Figure 12-4.

Figure 12-5.

Figure 12-6.

Figure 12-7.

Page

The input-process-output structure 2-4

The processing structure within a module 2-5

The general form of a state table 2-6

Example of a state table 2-7

Components of a functionally bounded module 3-1

Inputs and outputs from control-level decision

processing 3-3

Examples of poses 3-6

Example object data specifications 3-7

Example location 3-8

Examples of trajectories 3-9

Example RCS hardware configuration 5-1

Directory blocks for a 1000-block section of the disk.... 6-6

Restoring and saving code 6-13

Example D>M map block 6-14

Using continuation blocks 6-17

RCS screen-editor display for the VT 1 00 6-18

Example SMACRO routine 7-2

Example variable owner 7-5

Example sequential variable owner 7-6

Example list owner 7-7

An example SMACRO file in common memory 7-13

SMACRO file after the execution of add-record 7-14

Example SMACRO routine 7-18

Setting up an interrupt routine 7-20

Command and status communication paths 8-2

RSL control levels 9-2

RSL files and control levels 1 0-2

Using a round-robin to transfer information between

control levels 10-13

Major robot-related components of the horizontal

machining workstation 1 2-2

T3 RCS hardware configuration 1 2-4

T3 RCS control-level hierarchy 1 2-5

Control level commands for the T3 RCS 1 2-7

The QC-DETACH routine 12-8

Example UNLOAD situation for the T3 robot 12-9

Pseudocode example of a T3 UNLOAD command 12-10

XIX
Page

Figure 12-8. Fork and sensor hardware for the FMR 12-12

Figure 1 2-9 . RCS hardware configuration for the FMR 12-13

Figure 12-10. RCS software configuration for the FMR 12-14

Figure 12-11. FMR path-point examples 12-1?

Figure 13-1. Single-step output 1 3-5

Figure 13-2. Display routine and List-display list owner for

the PATH level 13-14

Figure F- 1 . Joystick switch layout F-2

Figure F-2. Joystick switch wiring diagram F-3

Figure F-3. Joystick to interface electronics cable diagram F-4

Figure F-4(a). Joystick switch debounce circuitry (page 1 of 2) F-5

Figure F-4(b). Joystick switch debounce circuitry (page 2 of 2) F-6

Figure F-5. Emergency stop and hold set/clear circuitry F-7

XX
LIST OF TABLES

Page

Table 5- 1 . Processor-Board Jumper Modifications 5-^

Table 5-2. Processor-Board Starting-Address Jumpers 5-5

Table 5-3 . Common Memory Board Jumper Modifications 5-6

Table 5-^. Common Memory Board Switch Settings for RSL 5-6

Table 5-5. Disk and Tape Controller-Board Jumper Modifications 5-7

Table 5-6. Disk and Tape Controller-Board Switch Settings 5-7

Table 5-7 . Disk Drive Switch Settings 5-7

Table 5-8. Function Keys Defined on the Micro-Term ERGO 301 5-8

Table 5-9. Function Keys Defined on the TeleVideo 950 5-9

Table 6- 1 . Board Names and Prompts 6-2

Table 6-2 . Character-Editing Commands 6-19

Table 6-3 . Line-Editing Commands 6-20

Table 6-4 . Block-Operation Commands 6-20

Table 6-5 . Special Editing Commands 6-22

Table 6-6 . Line-Editor Commands 6-23

Table 7-1 . SMACRO Variables 7-3

Table 7-2. Matrix, Pose, Quaternion, and Vector Declarations .....7-4

Table 7-3 • The Variable Owner VO-Example 7-5

Table 7-4 . The Sequential Variable Owner SVO-Example 7-7

Table 7-5. The List Owner LO-EXAMPLE 7-8

Table 7-6 . SMACRO Arithmetic Operators 7-9

Table 7-7. SMACRO Assignment Operators 7-10

Table 7-8 . SMACRO Relational Operators 7-11

Table 7-9 . SMACRO Stack Operators 7-15

Table 7-10. Syntax for SMACRO Statements 7-17

Table 7-11. SMACRO Words in Run and Show Modes 7-19

Table 10-1 . Movetable Line Types 10-5

Table 1 0-2 . Data Type Compiling Words 10-14

Table 10-3. Data Type Search Routines 10-15

Table 11-1. Additions for the MOVE-TO Task 11-2

Table 12-1. Functions of the Major Robot-Related Components of the

Horizontal Machining Workstation 12-3

Table B-1. List of Abbreviations Used in the Syntax Descriptions B-1

Table B-2. List of Phrases Used in the Syntax Descriptions B-2

Table B-3. Complete List of RCS and RSL User Words in ASCII Order B-3

XXX

Chapter 1 INTRODDCTION

This chapter gives a brief description of the Real-time Control System (RCS)

developed by the National Bureau of Standards (NBS) and describes how this

manual is organized. The chapter also describes the documentation conventions

used throughout the manual to indicate different types of information. The

conventions include how the manual presents syntax descriptions of the languages within RCS. Finally, the chapter describes who should read this manual

and points out which chapters will be most useful to you, depending on your

purpose in using RCS.

1.1 THE PURPOSE OF RCS

RCS is a microprocessor-based system for the real-time control of automated

systems. The applications described in this manual are for robotic systems;

however, RCS can be used to control other types of automated devices.

RCS has two unique features that generally are not found in other control systems. First, because of the hierarchical control architecture of RCS, you can adapt RCS to control different systems. The hierarchical architecture makes

RCS modular, with well-defined interfaces. NBS has been developing these

interfaces using RCS for over 10 years. Second, RCS provides for real-time

control based on sensor measurements. This feature enables you to modify RCS

control commands, in real time, based on this sensor data.

1.2 ABOUT THIS MANUAL

This section introduces the organization of the manual, the documentation con- ventions used in the manual, and the conventions used for RCS words.

How This Manual is Organized

This manual is organized into 13 chapters, six appendices, a glossary, a bibliography, and an index. This chapter, "Introduction", introduces RCS and

explains how to use this manual.

Chapter 2, "RCS Overview", provides a brief description of RCS, including its

purpose and the basic processing structures implemented.

Chapter 3? "RCS Architecture", is a detailed description of RCS processing

structures. This chapter provides the theoretical background necessary for

understanding the design of RCS and how it operates.

Chapter 4, "RCS Components", describes the required and optional hardware and

software for RCS.

1.2 ABOUT THIS MANUAL

1-1
Chapter 5, "RCS Installation Procedures", explains how to configure and

install the hardware required to run RCS. It also explains how to install the

RCS software supplied on magnetic tape by NBS, and how to get the system run- ning for the first time.

Chapter 6, "Basic RCS Operations", provides step-by-step procedures for several RCS operations and utilities. It explains how to start up and shut down

the system, edit and execute code, and use printer and tape utilities.

Chapter 7, "SMACRO", is a complete description of the SMACRO language created

by NBS for use with RCS. SMACRO consists of word extensions to the FORTH programming language and operating system.

Chapter 8, "Communications", is a detailed description of the RCS communications process that enables communication of real-time data between the various

parts of the system.

Chapter 9, "Robot Sensor Language (RSL)", describes RSL, a task-description

language developed by NBS as an application for RCS.

Chapter 10, "RSL Control Levels", describes the structure of the four levels

of the RSL application. Using this information, you can modify the RSL code

for your own application.

Chapter 11, "RSL Extensions", explains how to create your own extensions to

RSL.

Chapter 12, "RCS Application Examples", provides two example robot

applications that use RCS. Each example is a step-by-step description of an application, including a partial listing of the SMACRO or RSL code with

explanations. Each example traces the execution of a robot task.

Chapter 13, "Debugging Techniques", describes the interactive debugging procedures you can use with RCS.

Appendix A contains information on error messages. Appendices B through F

include a user word summary, system maps, a disk directory, information on the

8087 operation codes relevant to RCS, and joystick schematics and interfacing

information.

Finally, the manual includes a glossary of RCS and RSL terms, a bibliography

listing additional reference material, and an index.

Documentation Conventions

This manual uses the following documentation conventions:

• The name of each keyboard key mentioned in the text appears in uppercase

letters. For example, the carriage-return key appears as RETURN.

• In a control-key sequence, a caret (") represents the CONTROL key. For

example, control-C appears as ''C.

1.2 ABOUT THIS MANUAL

1-2
• Information that appears on the terminal screen appears in bold print. For

example, the ;R rsl> prompt appears on the terminal when the system is

awaiting input from the terminal keyboard.

• Information that you must enter exactly as it appears in the manual is

underlined. For example, "Enter 3 LOAD" means to type 3 LOAD and press

RETURN.

• Variable data that you are to enter is represented within square brackets

([ ]). The instruction "Enter [block #] LOAD" indicates that you are to

replace [block //] with a specific block number when you enter the LOAD command. For example, you might type 3 LOAD and press RETURN.

• The default string delimiter is a carriage return. The characters ", \,

and a space may also delimit strings. You need to use the correct

character delimiter to include strings in source code blocks. String

delimiters are listed in syntax descriptions.

Note: Memory address locations, board numbers, and port addresses are hexadecimal numbers.

Syst«n Word Conventions

RCS defines many words to perform real-time task decomposition but you do not

need all of these words to create application programs. This manual describes

only the RCS, RSL, and FORTH words used to create application programs.

For the syntax descriptions of RCS, RSL, and FORTH words, this manual shows

each command and its operands in the order in which you enter them.

1.3 WHO SHODLD USE THIS MANUAL

This manual is for NBS personnel and for robotics researchers in government,

industry, and universities. The manual assumes that you are conducting

research and developing applications for the real-time control of robots using

sensors, hierarchical task decomposition, and multiple CPUs. This manual is

intended for system developers and not for factory-floor operators of robotic

systems. Although the manual includes the basic RCS operating procedures, it

does not include the information these operators would need for the daily

operation of a turnkey system.

This manual assumes that you are familiar with the concepts and terminology of

robotics and with the FORTH programming language used extensively in RCS. The

polyFORTH 1 Reference Manual and the polyFORTH 8086 Operations Manual from

FORTH, Inc., of Hermosa Beach, California, provide in-depth information on the

FORTH language and operating system used for RCS.

Also, if you intend to create or modify any RCS 8086 or 808? assembler code

for research or applications, the manual assumes you are already familiar with

assembly language programming. Appendix E, "8087 Operation Codes for RCS",

lists the 8087 operation codes that affect RCS operation.

1.3 WHO SHOULD USE THIS MANUAL

1-3
Researchers using RCS can be divided into three classes: those who want to

enter data for an existing application, those who want to modify an existing

application while retaining the basic configuration, and those who want to

create new applications.

Entering Data for an Existing Application

To use the sample application written in RSL, you need to edit the blocks of

RSL code to enter the specific application data for your system. This robotcontrol data is specific for each application at a specific installation, and

includes defined or recorded robot poses, defined locations and objects, and

defined trajectories.

If you want to use RCS to enter specific data for the supplied sample application, be sure to read Chapter 6, "Basic RCS Operations", which describes how

to edit blocks of code, and Chapter 9, "Robot Sensor Language (RSL)", which

describes the data types used with RSL and how to edit RSL code.

Modifying an Existing Application

A typical modification to an existing application is to add a simple sensor,

such as a ranging sensor or switch. When you add a simple sensor, the basic

structure and configuration of RSL do not change. You need to edit approximately 100 lines of SMACRO or RSL code.

If you want to use RCS to add a sensor to an existing application, be sure to

read Chapter 6, "Basic RCS Operations"; Chapter 7, "SMACRO", which describes

SMACRO code; Chapter 9, "Robot Sensor Language (RSL)"; Chapter 10, "RSL Control Levels", which includes information on sensor preprocessing; and Chapter

11, "RSL Extensions", which describes how you can add RSL extensions.

Creating New Applications

To create new applications, you need to modify the basic structures (such as adding a new control level). Be sure to read Chapters 1 through 11 for a com- plete understanding of RCS and RSL.

1.3 liHO SHOULD USE THIS MANUAL

1-4
Chapter 2

RCS OVERVIEW

Chapter 2 briefly describes the purpose and theory of RCS, and outlines the

basic processing structure of RCS architecture. This overview is presented

without technical detail; Chapter 3, "RCS Architecture", describes the archi*

tecture in greater detail.

2.1 WHAT IS RCS?

RCS is a research tool for investigating the use of real-time sensoryinteractive control. The current implementation of RCS uses a multiprocessor, hierarchically structured architecture for control of robotic

systems. RCS is a stand-alone system that enables you to develop, compile,

and test all necessary programs without a host. RCS provides an interactive

programming environment, while retaining the run-time speed of a compiled

system.

thiltlprocessor System

RCS is designed around a multiprocessor computer system to provide the highspeed processing required to control a multi-axis robot in real time. The

multiprocessor architecture also provides a natural modularity, which helps

divide the control function of the system into easily understood control

levels.

Hierarchical Control Levels

Each hierarchical control level receives a task from the level above and

decomposes this task into a set of more primitive tasks, which it sends to the

level below. The lowest control level (the robot controller) supplies the

machine Instructions to the robot. Each control level communicates with the

adjacent levels through a common memory that all control levels share.

Modular Architecture

The modularity of RCS also simplifies the task of integrating different kinds

of hardware into the system. For example, you can design a module to accept

and process input from sensors and then modify existing modules to use this

sensory information.

2.1 WHAT IS RCS?

2-1
Control Function Techniques

RCS uses the following techniques to simplify the programming of control

functions:

• Software modularization into well-bounded functions with clearly defined

interfaces to enhance extensibility of the system by clarifying the information that passes between two "black box" modules.

• Use of generic software module structures to simplify module creation,

debugging, and maintenance.

• Specification of well-defined data interfaces.

• Use of a common memory structure to simplify integration of independently

developed modules, provide access to additional processes, and provide

extensive diagnostic and status reporting capabilities.

• Replacement of separate internal looping structures with cyclic execution

that repeats at globally specified periodic intervals to ensure that state

changes within the system are synchronized with each other.

• Use of state table programming structures that provide an explicit representation of branch conditions. A state table provides an advantage over a nested IF-THEN-ELSE structure because a state table for a complex branch

condition is easier to understand and modify.

2.2 THE ATTRIBUTES OF RCS

RCS provides a modular, flexible, and easily understandable computer hardware

and software architecture for experimenting with sensory systems and robotic

devices operating in real time.

Modularity

Just as a structured program consists of a series of well-defined modular com- ponents, the RCS hardware and software is modular. This modularity makes the

system more manageable, enabling developers to concentrate their efforts on one module at a time.

The modular nature of the system software lets you reconfigure all or part of

the system software simply by loading different software modules. This modularity ensures that if you make changes to one module you do not necessarily

have to reconfigure other modules.

2.2 THE ATTRIBUTES OF RCS

2-2
The following are examples of RCS modules:

• Initialization procedures

• Real-time control function execution

• Communications

• Preprocessors and postprocessors

• Device drivers

• Diagnostics

• Monitor systems

• Error reporting

Flexibility

To provide hardware flexibility and extensibility, RCS uses the Intel

MULTIBUS. The MULTIBUS can support multiple processors, and compatible board

products are widely available.

The RCS software is flexible and extensible by its modular nature. Developers

can create sample input data for each module and examine the resulting output

data to analyze the operation of the module.

Understandabillty

NBS designed a generic software module structure as the basis for the various

modules operating within the system. After you understand the generic module

structure, you can more easily understand the specific modules within the system, which are derived from this generic structure.

The modular design of RCS reduces the considerable complexity of a real-time

control system to a set of simple, well-defined, and easily understood segments. You can comprehend the operation of the entire system by analyzing the

operation of each module separately.

RCS simplifies the analysis of system operation by providing you with Interactive diagnostic software tools to monitor system operation continuously,

display the system status, and capture data In real time.

2.3 RCS AS AN INPOT-PROCESS-ODTPOT STRUCTDRE

The fundamental building block of the RCS architecture is the input-processoutput structure, which specifies functional modules that communicate through

well-defined data interfaces. The input-process-output structure is shown in

Figure 2-1.

2.3 RCS AS AN INPDT-PROCKSS-OOTPDT STROCTURK

2-3
Input

Data Process

Output

Data

Figure 2-1. The input-process-output structure.

In this model structure, a functional module processes its input data set to

generate a set of output data. The function that each module performs is

independent of other processing that might occur within the system. Information required by more than one module passes through the interface data sets

stored in common memory. You can understand the function of a module by

examining its input data, its output data, and a description of the processing

that occurs within the module.

You can define new modules to provide new capabilities, such as new sensors,

end effectors, or robot trajectory algorithms, and integrate these modules

with existing components of the system through the appropriate data

interfaces.

In addition to providing a clear understanding of the system, well-bounded

modules facilitate module testing and debugging. Simply by supplying input

data to a module, you can test that module in isolation before adding it to

the system or when diagnosing a problem.

2.4 PROCESSIHG WITHIN A GENERIC CONTROL LEVEL

Although using the basic input-process-output structure is an efficient method

of organizing a complex system, the large number of such structures is a problem in itself.

An effective solution to this problem is the use of generic software module

structures. This method helps you understand the system by standardizing the

basic operation of a module because you can view each module function as a variation of the generic processing structure.

Within a module, you can view processing as a sequence of three processing

operations—preprocessing, decision processing, and postprocessing. (See

Figure 2-2.)

2.4 PROCESSING WITHIN A GENERIC CONTROL LEVEL

2-4
Input

Data # i^ Output

Data

Pr»- Decision PostProcessing Processing Process ing

Processing

Figure 2-2. The processing structure within a module.

Preprocessing

In the preprocessing stage, the system evaluates, scales, and reduces the

input data, and transforms it into the appropriate set of variable values

required for decision processing.

Decision Processing

Decision processing is the primary mechanism that directs program execution

within a module. Decision processing selects the appropriate procedures for

execution based on the values of several high-level variables.

Decision processing defines the various test conditions and the corresponding

output procedures for the system to execute if the input from preprocessing

satisfies the test conditions. In RCS, state tables usually control this

decision-making process.

For a real-time control system, state table programs are preferable to

control-path diagrams and IF-THEN-ELSE structures because state tables provide

explicit representation of the branch conditions occurring during decision

processing. This representation makes branching easier to follow. The state

table is an enclosed version of the case statement used in programming languages such as Pascal and C.

2.H PROCESSING WITHIN A GENERIC CONTROL LEVEL

2-5
Figure 2-3 illustrates the general form of a state table!

Inputs Outputs

A B C D

T X T T 5

T X T F t

T X F X 3

F T X X 2

F F X X 1

T = TRUE F = FALSE X = DON'T CARE

Figure 2-3. The general form of a state table,

The state table in Figure 2-3 contains four input variables: A, B, C, and D,

each of which can be either true or false. The system executes the first output where the values of the input variables match all the listed inputs on that line. For example, assume inputs A, B, and C are true and input D is

false. When you look through the table, you see that this set up condition

generates output 4. In this case, since input B does not affect the outcome,

it could be either true or false.

Figure 2-4 shows an implementation of a state table that determines an output

command for controlling a robot gripping an object based on the status of

touch and force sensors and the position of the gripper.

In this example, there are five input variables: INPUT COMMAND, TOUCH SENSOR

#1, TOUCH SENSOR #2, GRIPPER OPENING, and GRIPPER FORCE. The output consists

of the command to be executed, OUTPUT COMMAND, and the status of the task cur- rently being executed, OUTPUT STATUS. Each line in the state table corre- sponds to a set of conditions that can occur when the robot tries to grasp an object with its gripper.

For example, the third row of state table conditions corresponds to a situation where the object is touching one of the gripper fingers (TOUCH SENSOR #1

has contact) but not the other. In this case, the output commands the robot

to move 0.05 mm to try to center the object between the gripper fingers and

also commands the gripper to close 0.1 mm to grasp the object. The OUTPUT

STATUS indicates that RCS is executing the GRASP command and that contact with

the object has been made. Other lines in the state table correspond to other

situations, including errors which might occur, and the corresponding output

response that the robot and gripper should make.

2.^ PROCESSING WITHIN A GENERIC CONTROL LEVEL

2-6
INPUT

COMMAND

TOUCH

SENSOR #1 TOUCH SENSOR #2

GRIPPER

OPENING

GRIPPER

FORCE

OUTPUT

COMMAND

OUTPUT

STATUS

GRASP NO CONTACT NO CONTACT X X CLOSE .

1

MM GRASP-EXECUTING

GRASP NO CONTACT CONTACT X X CLOSE . 1 MOVE +.05 MM

MM GRASP-EXECUTINGCONTACT

GRASP CONTACT NO CONTACT X X CLOSE . 1 MOVE -.05 MMMM GRASP-EXECUTING

CONTACT

GRASP CONTACT CONTACT

> object

size

< grip

force

CLOSE .

1

MM GRASP-EXECUTING

FORCE

GRASP CONTACT CONTACT 2_ object

size

>. grip

force

PAUSE GRASP-FINISHED

OBJ-IN-HAND

GRASP CONTACT CONTACT < obj. size

i closed

X PAUSE GRASP-FINISHED

NOT-OBJ,

SIZE-VALUE

GRASP CONTACT CONTACT CLOSED X PAUSE GRASP-FINISHED

NO-OBJ-INHAND

Figure 2-4. Example of a state table.

Postprocessing

The postprocessing stage performs any additional processing required after

decision processing is complete. Saving internal variables and reformatting

algorithm results for output or transfer to other modules are examples of

postprocessing tasks.

2.^ PROCESSING WITHIN A GENERIC CONTROL LEVEL

2-7
rr6
Chapter 3

RCS ARCHITECTURE

This chapter describes the ways the control-level software running on the

single-board computers can communicate and cooperate to perform control functions. It includes descriptions of the independence of data, program structures, hierarchical control architecture, interlevel communications, decision

processing, and the contents of common memory.

3.1 HIERARCHICAL CONTROL ARCHITECTURE

Hierarchical control levels enable you to break a complex control task into

manageable procedures. Each control level represents a well-defined, clearly

bounded control function with a small number of inputs and outputs.

In this control scheme, you enter a high-level command such as "transfer the

part" to the top level of a hierarchical system of control levels. The top

level decomposes the task into sequences of more primitive commands (sub tasks)

to the next lower control level in the hierarchy. The bottom level in the

control-level hierarchy generates the outputs to the actuator that performs

the action.

Structure of a Control Level

The atomic unit within a control level is a functionally bounded module. This

module consists of inputs, a process, and outputs (see Figure 3-1).

Input

Data # ^

Output

Data

Pi

Pre- Decision Post-

'-ocessing Processing Process!ing

Processing

Figure 3-1. Components of a functionally bounded module.

The process shown in this figure includes the preprocessing, decisionprocessing, and postprocessing stages described in Chapter 2, "RCS Overview".

The preprocessing stage accepts and conditions the inputs for the decisionprocessing stage of the module, and the postprocessing stage prepares the output and performs the handshaking required for data transmission.

3.1 HIERARCHICAL CONTROL ARCHITECTURE

3-1
You can group functionally bounded modules under a named high-level routine (a

routine containing a series of statements that execute other routines). You

can then execute this group of modules by entering the name of the high-level

routine. RCS uses this method to maintain hierarchical relationships between

routines.

A control level consists of groups of routines. The routines perform the

functions of preprocessing the input, decision processing based on the input,

and postprocessing the output.

Cyclical Control-Level Processing

RCS does not require the use of interrupts to respond to external events.

Instead, RCS performs its processing in a cycle based on the periodic communications it conducts between different control levels. This cycle is called

the communications cycle.

Real-time control depends on producing a response to changes in input data

quickly enough for that response to be stable and effective. The system can provide continuous real-time control without interrupts only if the communications cycle repetition rate is fast enough (that is, the period of the communications process is short enough) to give the processing modules time to

respond to the new input data.

RCS uses multiple processors to achieve the high-speed parallel processing

needed to support a fast repetition rate. Each control level executes once during every communications cycle.

Cyclic execution has a major impact on the way control-level decision processing is implemented. Because a typical task takes many cycles to complete, the

level must enable you to enter the algorithm description each cycle without

losing track of what has already been done. RCS uses state variables to

accomplish cyclic execution. State variables record the state of the algorithm at the end of each cycle and are used at the beginning of the next cycle

to pick up algorithm execution.

Control-Level Decision Processing

You can program the decision-processing stage of a control level using a state

table and state variables or using a series of IF-THEN-ELSE control structures. Each of these options provides certain benefits.

A state table has the advantage of separating the definition of a function

from the timing of its execution. However, this separation can be a disadvantage when you are trying to trace the sequence of program execution. A series

of IF-THEN-ELSE statements is easy to follow when you are tracing the sequence

of program execution, but hard to understand and follow if it becomes long and

complex.

3.1 HIERARCHICAL CONTROL ARCHITECTURE

3-2
The SMACRO language developed by NBS supports the following format for state

tables:

state-table [state-varl] [state-var2]

state: [test-varl] [test-var2]

state: [test-var8] [test-var9]

[state-var7]

[test-var?] [routine A]

[test-varl4] [routine B]

default-state: [default-routine]

end-state-table

During execution, the system searches through the state table until it finds a line in which the values of all test variables match the values of the corresponding state variables. After the state table finds a line with matching

variable values, it executes the routine at the end of that line. All lines

after the first matching line are ignored. The state table executes the

default routine if no line matches.

The following list contains examples of questions that a state table can answer for the decision-processing stage by examining test-variable status

information:

• Has the level received a new command from the next higher level?

• Has the lower level returned its status to the current level?

• Has the lower level confirmed that it has received the last command?

• How far has the procedure progressed through its execution sequence?

• Have the sensors specified values for all symbolic variables?

• Has a specified event occurred?

Figure 3-2 illustrates the sources of information that a control-level procedure uses to determine the command to send to the next lower level and the

status to send to the next higher level.

Status Report to^s^

Next Higher Level \

>v Input Command from \ Next Higher Level

PrftCftusffd ^ Control Level

Sensor Feedback Decision Process

Status Kleport from X

Lover Level

^

S. Output Command to

^*^Next Lover Level

Figure 3-2. Inputs and outputs from control-level

decision processing.

3.1 HIERARCHICAL CONTROL ARCHITECTURE

3-3
Each control level may require multiple cycles to complete a command. After a control level completes its command, it sends a done status message to the

next higher level, commands the lower levels to pause, and waits for a new

command.

Interlevel CCTumunlcations

The information that the communications process transfers to any control level

consists of commands issued from the level above and status information

returned from the level below.

The commands passed to a control level from the level above vary greatly from

level to level and from application to application. However, the status

information passed to a control level from the level below (or from other com- ponents such as sensor systems) usually reflects one of three possible

results: executing, done, or error. The error status message can also indicate the reason for the failure.

The communications process is described in more detail in Chapter 8,

"Communications".

3.2 RCS PROGRAMS

A complete control system based on RCS includes multiple programs running in

parallel on the various boards within the system. These programs access the

data they require from variables stored in common memory. To make the programs data-independent, you must use symbolic variables to represent the physical system and the objects manipulated by the system.

Programs also use common memory to pass command and status information to programs running on other boards. To enable communications between levels to be

asynchronous, common memory provides double buffering for the input and output

of the different control levels in the system.

3.3 RCS COMMON MEMORY

The common memory of RCS contains three major components: the system dictionary, the communication* buffers, and the data files.

System Dictionary

The system dictionary contains records for every variable, procedure, state

table, and list of variables in the system while it is operating. The system

dictionary makes the interactive features of RCS possible by enabling you to

locate, modify, and test any section of code quickly without having to modify

the entire system.

3.3 RCS COMfON MEMORT

3-4
After loading the application software, the contents of the system dictionary

enable you to perform the following functions:

• Execute procedures (functionally bounded modules)

• Create and initialize new variables

• Define lists of variables

• Show the value of a variable or a list of variables

The system dictionary maintains pointers to procedures and RCS updates these

pointers automatically when you reload a procedure. This automatic updating

enables you to modify a procedure, reload the procedure, and then run the system without having to modify other procedures to integrate the altered

procedure.

CCTBmunicatlon Buffers

The communication buffers provide communication paths between control levels,

sensor systems, robots, grippers, and other subsystems. RCS simplifies the

transfer of information between control levels by providing high-level com- mands that make the details of the communications process transparent to the

control-level procedure.

To program a level to receive input commands or status, you identify the name

of the sending level and the name of the list of variables to be transferred.

Similarly, to program a level to send output commands or status, you identify

the name of the receiving level and the name of the list of variables to be

transferred.

The communications cycle reads output buffers every cycle and fills input

buffers on the same cycle only if those buffers are ready to accept input.

The communications protocol is described in more detail in Chapter 8,

"Communications"

.

Data In CCTumon Memory

The factory of the future will maintain a database that describes every system

and object within its domain, and this data will be supplied to the control

algorithms during the manufacturing process. However, for RCS you must enter

manually the data required to specify the geometry of each object, the location of each critical point, the approach path, the departure path, and intermediate trajectories for each application of the system.

To maintain the data independence of a control algorithm, you should always

separate data from the algorithm that uses the data. Separating the data and

task definitions ensures that only the data, and not the algorithm, will

require alteration if the physical aspects of the system or the object change.

The common memory stores the data for all control levels and serves as the

interface between communicating control levels and between the control levels

and input/output systems. When a procedure requires data, its control level

assigns data from common memory to the appropriate symbolic variables within

the procedures.

3.3 RCS C0M40N MEFfORY

3-5
Chapter 9, "Robot Sensor Language (RSL)", describes the NBS-developed language

for robot-control applications. Therefore, this chapter presents only a brief

overview of the kinds of information RCS needs in common memory to control a robot. Consider the example of a robot wrist and gripper. The kind of data

you place in common memory to define the physical characteristics of a system

with a robot wrist and gripper would include poses, objects, locations, and

trajectories.

Pose data

Poses comprise the most fundamental data required to control a robot. You use

the name of each pose to identify a specific position and orientation in the

workspace of the robot.

To create a pose, you enter numerical information from the keyboard or use a joystick to describe a specific position and orientation. Alternatively, you

can program the robot system to "learn" poses by using sensor systems to capture a pose you select manually.

A pose in the example robot gripper system consists of a specific position and

orientation for the wrist and gripper. Figure 3-3 illustrates some different

poses for this system.

vv. wi . jr„^„^^,, ,,, ,.^,j^.,, .,

, r~^, ^ '.».^^^».^^^^.^\^^.'_'.v'.'.w^.^\^.^^.^'.v.^.^ POSE A POSE B POSE C POSE D

Figure 3-3. Examples of poses.

I

3.3 RCS COIMON MEMORY

3-6
m

Object data

Object data specifies such things as the grip size and grip location on an object that the robot is manipulating. The grip size specifies the width that

the gripper needs to accommodate and the grip location specifies the location

at which to grip the object. Figure 3-^ illustrates the grip size and grip

location on an object.

Grip Size Specification

Object

Grip

Location

lecification

Figure 3-4. Example object data specifications.

Location data

Location specifications refer to coordinates within the workspace of the

robot. These specifications describe points such as the goal point of a move-to command.

3.3 RCS COUPON MEMORY

3-7
Figure 3-5 illustrates an example of a location where the robot is to place an object.

Figure 3-5. Example location.

Trajectory data

Trajectories define how the robot is to move from one location to another.

Each object and location has specific requirements as to how the gripper

should approach and depart. You also need to provide intermediate trajectory

data to guide the gripper from one departure to the next approach.

Trajectory data can refer to objects, location points, or arrays of location

points. The specifications for a trajectory can include specific beginning or end location points (as well as objects or arrays), maximum acceleration, maximum velocity, and braking distance.

3.3 RCS C0M40N MEMORY

3-8
Figure 3-6 illustrates some of the possible components of trajectory data,

T3 ROBOT

' ""'ill

Approach

Trajectory

i li 1^;

Intermediate

Trajectory

Departure

Trajectory

Figure 3-6. Examples of trajectories.

3.3 RCS C(»»«N MEMORY

3-9

Chapter 4

RCS COMPONENTS

This chapter describes the hardware and software components of RCS, including

the organization of the memory address space, I/O space, and disk blocks.

4.1 HARDWARE COMPONENTS OF RCS

RCS is a MULTIBUS-based multiprocessor microcomputer system. The MULTIBUS

defines a bus structure supported by many vendors with compatible board

products. RCS currently supports up to seven Intel 86/30 single-board

computers, each with an 808? floating point coprocessor. Each 86/30 computer

can run one or more RCS control levels, depending on timing considerations.

Each single-board computer includes local RAM and contains the FORTH operating

system in PROM. All computers in the system share access to a common memory

and Winchester disk.

One of the single-board computers is the master board; the others are slave

boards. The user terminal attaches to the master board. Except for unusual

circumstances (such as a system crash), all user communication with the slave

boards occurs indirectly through the master board. If necessary, you can add

a terminal switch box to the system to communicate directly with a slave

board.

In addition to one or more single-board computers, RCS includes the following

components:

• Shared-memory boards

• Numeric data processors

• Disk/tape controller board

• Winchester disk drive

• Nine-track tape drive

• Terminal

Depending on the RCS application, it may also contain optional components,

such as:

• Serial I/O boards

• Parallel I/O boards

• Analog I/O boards

• Joystick

• Printer

RCS can connect directly to, and control the operation of, a wide variety of

robotic equipment. See Chapter 5, "RCS Installation Procedures", for a com- plete description of the system hardware.

4.1 HARDWARE COMPONENTS OF RCS

4-1
MDLTIBOS Address Space Organization

In RCS, the address space for the disk control block, FORTH PROMs, and

semaphores are fixed. The user allocates address space for processors and

common memory. RCS supports either 20-bit or 24-bit addressing (24-bit

addressing requires the P2 connector on the MULTIBUS).

With 24-bit addressing, the address space is divided into 16 one-megabyte

pages. Processors must be in page 0. You can distribute common memory over

any two (but only two) other pages.

The RSL application uses 20-bit addressing. See Section C.I, "Multibus

Address Space", for the exact addresses.

MOLTIBOS I/O Space Organization

RCS allocates the MULTIBUS I/O space as shown in Section C.2, "Multibus I/O

Space Organization". All unused I/O address space and the J3 and J4 ports are available for user applications.

RCS Interrupt Structure

Each processor board in the system uses interrupts to control RCS operation.

See Section C.3, "RCS Interrupt Assignments", for the use of each interrupt.

RCS Disk Block Organization

RCS uses the FORTH block structure for all source code. The disk block map in

Appendix D, "RCS Disk Block Organization", shows how RCS allocates blocks on

the Winchester disk for the RSL 1.6 application.

RCS uses a 10-block directory structure within these source code blocks. The

system does not automatically maintain this directory information; you must

update the block-directory blocks when you add, delete, or move blocks. For

more information on directories, see Section 6.3> "Locating Source Code".

4.2 SOFTWARE COMPONENTS OF RCS

The RCS operating system software developed by NBS is based on a compiled

version of the FORTH programming language. This operating system supports

multiple processors, interprocessor communications, and a mid-level high-speed

compiled language called SMACRO.

The operating system provides an environment for the development of application programs for real-time control. One such application program is RSL,

which runs under RCS.

4.2 SOFTWARE COMPONENTS OF RCS

4-2
The RCS software includes an operating system with system utilities and macros. The utilities enable you to edit source code, communicate with individual computers within the system, debug application programs, back up programs and data, and perform other tasks. The macros form the SMACRO language

you can use to create application programs.

Other components of the RCS software include SMACRO files in common memory,

system dictionary vocabularies, and the communications utility, COMM.

The Operating System

The RCS operating system includes utilities for booting the system, editing

source code, and performing other tasks. It provides multiprocessor operation

by using one master processor board to control several slave processor boards.

In addition to these features, the RCS operating system supports background

tasks, interrupts, and four modes of operation.

System utilities

Many RCS system utilities perform simple tasks, such as printing a block of source code or selecting a specific type of terminal. Other utilities (such

as the MBOOT, CUSTOM, and EDITING utilities) are more powerful.

Some MBOOT and CUSTOM utilities enable you to boot the system, load the system

software, and load the custom software required for your particular applications. Other MBOOT and CUSTOM utilities enable you to save memory images on

the Winchester disk, and then reload them into memory. These utilities are useful when you need to recover from a system crash.

The EDITING utilities enable you to examine and modify source code. RCS supports three kinds of terminals: the TeleVideo Model 950, the Datamedia Elite

1521A, and the DEC VT100.

Multiprocessor operation

To provide multiprocessor operation, the RCS operating system enables you to

define one processor board as the master board, and the other processor boards

as slave boards. The terminal can communicate directly with only the master

processor board. Communication with the slave boards occurs indirectly

through the master board.

Background tasks

The RSL application developed by NBS includes tasks that run in the background. Refer to the RSL source code for an example of background task operation. The polyFORTH 1 Reference Manual and the polyFORTH 8086 Operations

Manual provide more information on running tasks in background mode.

4.2 SOFTWARE COMPONENTS OF RCS

4-3
Interrupt routines

RCS includes specific SMACRO words for interrupt routines. The enterinterrupt SMACRO word prepares an 8086 processor to perform an interrupt routine first by pushing the contents of all registers and then by pointing the

DS and ES registers to specific segments.

The exit-interrupt SMACRO word should appear at the end of an interrupt routine, to restore the contents of the 8086 registers and then execute an IRET.

You can use the "INTERRUPT SMACRO word to set the 8086 interrupt vector to

point to a selected SMACRO routine.

The operation of these SMACRO words is explained in detail in Section 7«6,

"Interrupts and Assembly Language". Refer to Section C.3» "RCS Interrupt

Assignments", for a list of the reserved interrupts.

Operating modes

RCS can run in one of four modes: Run, Show, Locate, and Compile. Run mode

is the normal operating mode for controlling robotic equipment. Show mode

enables you to examine the values of variables. Locate mode enables you to

search for the source block of any SMACRO word. Compile mode is for compiling

blocks of RCS code.

RCS SMACRO Language

The RCS operating system is based on the FORTH language and operating system.

NBS has extended FORTH by adding words to the standard set of FORTH words.

This set of extensions comprises the SMACRO language.

Each SMACRO variable is a member of a set of variables belonging to a variable

owner. SMACRO variable types include: integer, byte, floating point, array,

string, segment, and sequential. The owners in SMACRO include: variable

owners, sequential owners, and list owners. In SMACRO, unlike FORTH, you can define a word that is longer than one block by using the SMACRO words routine

and end-routine. For a complete description of SMACRO, see Chapter 7,

"SMACRO". For a complete list of SMACRO words, see Appendix B, "User Word

Summary"

SKACRO Files

RCS operation is based on SMACRO files. A SMACRO file is stored using a linked-list record structure, residing in common memory. The memory-resident

SMACRO files provide a means of communication between the processor boards

within a system.

C

4.2 SOFTWARE COMPONENTS OF RCS

4-4
Disk Files

RCS does not have traditional disk files. RCS stores source code in blocks.

You keep track of which block holds what source code by maintaining the RCS

system of directory blocks. The directory blocks help you locate code; RCS

does not use the directory blocks.

RCS also provides a mechanism for storing compiled code on the disk. This

method is similar to the method for storing an object code file on a traditional system. The compiled code is stored in D>Ms, where D>M is simply

a copy of the local RAM for a board. D>Ms are less flexible than the

traditional object code file, but they are faster to load because no linking

is required.

Robot Sensor Language (RSL)

NBS has developed RSL as a sample RCS application you can use and modify for

your own robot system. It includes four control levels, each representing one level of task decomposition.

The four RSL control levels are TASK, PATH, PRIM, and JOINT. TASK decomposes

a task into a sequence of paths. PATH decomposes each path into sequences of

goal poses. PRIM decomposes the poses into a sequence of intermediate poses.

JOINT decomposes the intermediate poses into commanded joint angles.

System Dictionary Vocabularies

RCS maintains a system dictionary in common memory. The system dictionary

contains entries for every variable and routine in the system. A vocabulary

is a group of related entries in the dictionary. RCS includes a system vocabulary on each board, and a vocabulary for each control level, including RSL.

You can include up to five user-defined vocabularies per board (although you

usually have only one vocabulary per control level).

The CoBBBunications Utility (C0tfl4)

The RCS operating system includes the COMM communications utility, which performs communications between processor boards within the system. This utility

enables you to restart the timer, set up communication buffers, and specify

the communications timing. See Chapter 8, "Communications", for more information on the communications process.

4.2 SOFTWARE COMPONENTS OF RCS

4-5

Chapter 5

HCS INSTALLATION PROCEDURES

This chapter lists the hardware required to support the RCS and RSL software,

and explains the hardware and software installation procedures.

5.1 HARDWARE REQUIREMENTS

NBS supplies the software for an RCS system; you supply the hardware (see Fig- ure 5-1).

Minimum RCS

Copfiguration

Optional

Equipment

Master Board Terminal — Printer

Common Memorg Board

Controller Board I

\

1 Disk Drive Tape Drive

_^_

Slave Board 2 Analog Multimodule Analog Sensors

, >» Slave Board 4 Parallel Multimodule • Joystick 1

Slave Board 6 Serial Multimodule — Robot A

Slave Board 8

Slave Board A Parallel Multimodule Digital Sensors

Slave Board C Common Memory Board

Common Memory Board

Serial I/O Board

Parallel I/O Board

Analoy I/O Board f-

- Analog SeiDsors

Digital I/O Board |- -Digital Se nsors

MULTIBUS Backplane

Figure 5-1. Example RCS hardware configuration.

5.1 HARDWARE REQUIREMENTS

5-1
Minimum Hardware Requlronents

The following list describes the minimum hardware configuration needed to run

RCS:

• Equipment rack.

• MULTIBUS backplane and power supply (for example, the ETI Model 8223

23-slot chassis, including a parallel priority circuit).

• Intel iSBC 86/30 single-board computer configured with a bus clock.

• Intel iSBC 337A numeric data processor module for 86/30 board.

• Plessey Model PSM 512A (or equivalent) memory board.

• Ciprico Rimfire H5 disk and tape controller board.

• Priam Diskos Model 6650-10 66-megabyte Winchester disk drive.

• Priam Model 3 00106-04 ANSI-standard disk interface adapter board.

• Cipher F880 nine-track tape drive.

• TeleVideo Model 950, Datamedia Elite 1521A, or DEC VT1 00-compatible

terminal

.

Note: The NBS-supplied system tape is configured for a Micro-Term ERGO 301

terminal, which is VT100 compatible.

• Apple Imagewriter, DECwriter III, or Integral Data Systems Paper Tiger

printer.

• Interconnection cables.

Unimate Puma 760 Robot Requirements

The following list describes the additional system components required to run

RSL to control a Unimate Puma 760 robot.

• Three additional iSBC 86/30 single-board computers.

• Three additional iSBC 337A numeric data processor modules.

• One iSBX 351 Serial I/O Multimodule.

(

5.1 HARDWARE REQUIREMENTS

5-2
Additional CCTuponents

To modify RCS to develop other applications or control other types of robotic

machinery, you can add the following components:

• Intel MULTIBUS boards and multimodules

- Up to three additional iSBC 86/30 computers (for a maximum of seven)

- iSBC 53^ Serial I/O board

- iSBC 519 Parallel I/O board

- iSBX 351 Serial I/O Multimodule

- iSBX 350 Parallel I/O Multimodule

- iSBX 311 Analog Input Multimodule

- iSBX 328 Analog Output Multimodule

• One to four additional Plessey Model PSM 512A (or equivalent) memory boards

(this application requires 24-bit addressing capability).

• MULTIBUS P2 backplane connector installed in chassis (required for 24-bit

addressing)

.

• A switch box, compatible with RS-232 and including one input and seven outputs (required only if you need direct communication with slave boards).

• Joystick, as specified in Appendix F, "Joystick Schematics".

• Robot with optional sensors.

Your system may not require all of the hardware included in these lists. The

configuration of your system depends on the requirements of your robot. For

example, the Analog Input Multimodule is not required for RCS operation, but

may be needed to provide sensor input. However, you should plan ahead by

ordering a spare for each critical component in the system.

5.2 ROBOT INTERFACE REQUIREMENTS

RCS provides an environment for developing programs that operate in real time

to control robotic equipment. RCS makes no assumptions about the machine it

controls; the machine does not even need to be a robot. You must supply the

software interface for the specific machine you want to control using RCS.

NBS provides interface software designed to control a Unimate Puma 760 robot

through a serial I/O multimodule. This software also can control Unimate

robots other than the Puma 760. For more information, see the Unimate Puma

Control System SLAVE Interface Specification for External Computer Path Control Using VAL II .

To control robotic devices from other manufacturers, you must develop your own interface software according to the specific requirements of each device.

5.2 ROBOT INTERFACE REQUIREMENTS

5-3
5.3 SOFTWARE REQUIREMENTS

The software required to run RCS applications includes PROMs containing the

basic FORTH operating system, and a magnetic tape containing the SMACRO extensions to FORTH.

The magnetic tape supplied by NBS also includes RSL, an application developed

by NBS. You can modify RSL for your application or copy selected RSL

procedures as a basis for your own RCS application.

5.^ HARDWARE INSTALLATION PROCEDURES

To install the hardware required to run RCS, you must configure the processor

boards, the common memory board, the disk and tape controller board, the disk

drive, the terminal, and the printer.

Configuring the Processor Boards

Before installing the 86/30 processor boards in the system, you must change

the factory-default configuration of the boards, add the PROMs containing the

FORTH operating system, install the 8087 numeric data processors, add heat

sinks, set up the bus clock on one of the boards, and set up RCS communications on one of the boards.

Installing processor-board jumpers

Configure each processor board by performing the jumper modifications indicated in Table 5-1. These modifications are from the Intel default jumper

configurations

.

Table 5-1. Processor-Board Jumper Modifications.

Modification Result

Enables bus lock

Disables bus clock

Disables serial priority

Grounds CBRQ/

Sets the RAM address to 2000

Selects 24-bit addressing

Selects 32K PROM size

Selects 32K PROM size

Deletes interrupt assignments

Selects 8087 error interrupt

Selects onboard serial port interrupts

Assigns the 6-msec time-out interrupt

Sets PIT clocks

Connects RTS to CTS

Add 204-206

Pull 205-207, pull 208-209

Pull 210-211

Pull 213-214, add 212-213

Pull 219-225

Add 218-223, add 238-239

Add 124-125

Pull 111-112, add 112-113

Pull 151-152, pull 147-158

Add 164-166

Add 136-154, add 153-157

Add 133-165

Pull 175-176, add 175-184

Add 76-77

5.4 HARDWARE INSTALLATION PROCEDURES

5-4
After making these jumper modifications, cut connection line 32 of the P2 con- nector to disconnect a non-tristate output.

You may need additional jumpers to configure a processor board for the onboard

parallel port or for one of the add-on multimodule ports.

To select the address for the RAM on each 86/30 processor board, configure the

jumpers for each starting address as shown in Table 5-2.

Table 5-2. Processor-Board Starting-Address Jumpers.

RSL

Control Level

RSL

PRIM

TASK/PATH

JOINT/COMM

not used for RSL

not used for RSL

not used for RSL

Board

Numbers Starting Address Jumpers

2

4

6

8

A

C

00000

20000

40000

60000

80000

A0000

C0000

232-233

None

219-226,

219-226

219-225,

219-225

219-225,

232-233

232-233

219-226

Installing the FORTH PROM circuits

Install on each 86/30 processor board the four PROMs containing the FORTH

operating system supplied by NBS.

Installing the 8087 numeric data processors

For each processor board, carefully remove the 8086 microprocessor from the

board and install it on a small board (Intel 337A) with an 8087 numeric data

processor. Next, install the 8087 board into the 8086 socket on the processor

board. If you are using an old 8087 that runs at a maximum clock speed of

5 MHz, add jumper 36-37 to the processor board.

Installing heat sinks

After installing the 8087 board, install a heat sink (using silicone heat sink

compound) on top of the 8086 and 8087 processors to ensure adequate cooling.

Installing the bus clock

You must enable the bus clock on one, and only one, of the processor boards

(usually board 0) within the system. Install jumpers 205-207 and 208-209

to enable the bus clock. These jumpers should not be present on any other

processor board in the system.

5.4 HARDWARE INSTALLATION PROCEDURES

5-5
Configuring Interprocessor cCTimunlcatlona

The processor board responsible for RCS communications between levels is the

COMM board (although it may also perform functions not related to

communications )

.

Configure the COMM board to send the COMM bit to the other boards by adding

jumper 245-251. This jumper enables status register bit 5 to invoke bus

interrupt 2.

Configure the other processor boards to receive the COMM bit by adding jumper

147-148. This jumper assigns bus interrupt 2 to bit 2 of the Programmable

Interrupt Controller (PIC).

Configuring the Ccamnon Memory Board

Modify the factory-default configuration of the common memory board (Plessey

Model PSM 512A) by modifying the jumper wires as indicated in Table 5-3.

Table 5-3. Common Memory Board Jumper Modifications.

Modification Result

Pull LK19 Disables the PWRfail interrupt

Pull LK21 Selects parallel priority operation

Pull LK22-31 Disables the error interrupt

To run RSL, set the address and interrupt switches of the common memory board

to the settings shown in Table 5-4.

Table 5-4. Common Memory Board Switch Settings for RSL.

Switch Settings Result

Pole: 12345678 (Pole 1 is at the left)

SW1: on off off off off off off off Disables interrupts

SW2: off off off off off off off off Selects megabyte page

SW3: off on on on on on on on Selects 80000 as first address

SW4: off off off off off off on off Selects EFFFF as last address

Configuring the Disk and Tape Controller Board

Modify the factory-default configuration of the Rimfire 45 disk and tape con- troller board by installing the jumper wires indicated in Table 5-5.

5.4 HAHDWARB INSTALLATION PROCEDURES

5-6
t

/

Table 5-5. Disk and Tape Controller-Board Jumper Modifications.

Modification Result

Pull 15-16, add 15-17 Selects 16-bit bus operation

Pull 23-26 Selects parallel priority operation

Add 13-14 Enables bus time-out interrupt

Pull 31 through 50

Add 50-49-48-47-^5-44-43-42

Add 46-41 Sets the initialization address to EFC06

Add 40-39-38

Add 37-36-35-34-33-32-31

For operation with the RCS system, you must set the channel attention of the

Rimfire 45 controller board to 0052 and the bus width to 16. You must also

set the DIP switches on the Rimfire controller board to the settings shown in

Table 5-6.

Table 5-6. Disk and Tape Controller-Board Switch Settings.

Switch Settings

Bit: 12 3 4 5 6 7 8

SW1: off on off on off off on on

SW2: off off off off off off off off

Configuring the Disk Drive

You can order Priam Diskos Model 6650-10 disk drives from the factory,

equipped with an ANSI standard adapter. Refer to the Priam documentation if

you have a drive that requires installing this adapter.

Modify the factory-default configuration of the Priam 6650-10 disk drive by

setting the Sector DIP switch (located under the adapter board) for 18 sectors

per track according to the settings shown in Table 5-7.

Table 5-7. Disk Drive Switch Settings.

Switch Settings

Bit: 1 Sector Switch: off

Caution: Make sure you have unlocked the disk heads and spindle before turning on the disk power. New Priam disk drives have a label indicating which lever performs this function. Old drives have two levers; one releases the heads and the other releases the spindle. Refer to

the manufacturer's instructions for more information on preparing

the disk drive for use.

2 3 4 5 6 7 8 on off off on off off off

m

5.4 HAHDWARE INSTALLATION PROCEDURES

5-7
Configuring the Terminal

Installing the terminal requires configuring both the hardware and software.

The steps involved depend on the terminal you are using. This section

describes the steps for the terminals that RCS supports.

To configure the hardware, set up the terminal to communicate with RCS. The

computer port on the terminal must be configured for RS-232C, 9600 baud, 8

data bits, no parity, and one stop bit. Refer to the terminal manual for

information on how to set up the terminal. If you have Micro-Term ERGO 301

i

the function key format must be set to TV970.

To configure the software, modify the system to load the proper block for the

terminal being used and define the programmable function keys (if any). See

Steps 6 and 7 in Section 5.5, "Software Installation Procedure", for the exact

steps involved.

Your NBS-supplied system tape is configured for an ANSI terminal, specifically

the Micro-Term Model ERGO 30 !• The Micro-Term has programmable function keys

and tabs. The RCS VT100 utility contains additional words to program these

keys. Similarly, the RCS TeleVideo utility contains words to program the

TeleVideo function keys. Tables 5-8 and 5-9 list the programmable function

keys as defined for these two terminals. Note that the Datamedia 1521 A does

not have function keys.

Note: Terminals that are compatible to VT100 terminals conform to the ANSI

standard for terminals. You can use any ANSI standard terminal with

the RCS VT100 screen editor. However, most terminals add features on

top of the ANSI standard, such as programmable function keys and tabs.

Therefore, the protocol for programming function keys and tabs differs

from one terminal to another, even if both terminals are ANSI. If you

do not have a Micro-Term or TeleVideo terminal, you have to write your

own words to program the function keys for your terminal.

(

Table 5-8. Function Keys DefinecI on the Micro-Term ERGO 301.

SHIFT-Key CTRL-Key

Key Function Function Function

F1 printer on X printer off

F2 form feed X X

F3 -^x X X

F4 move to TASK&PATH board X X

F5 move to PRIM board X X

F6 move to JOINT/COMM board X X

F7 X X X

F8 X X X

F9 X boot commands* X

F10 X 2 D>M X

F11 X 3 D>M X

5.4 HARDWARE INSTALLATION PROCEDURES

5-8
Table 5-8 Functio

Key Function

F12 X

F13 X

F14 X

F15 X

F16 -^E PF1 home

PF2 clear

PF3 X

?FH X

Function Keys Defined on the Micro-Term ERGO 301. (continued)

SHIFT-•Key CTRL-Key

Functl on Function

5 D>M X

X X

X X

X X

X X

X X

X X

X X

X X

•The boot commands are HEX F7 C9 CBOOT MBBOOT init-cm . SHIFT-F9 does not

include a carriage return.

Note: The keys PF1 through PF4 are not programmable. The keys F1 through F16 are programmed in the RCS Function-Keys block. The SHIFT-Key sequences

are programmed in EAROM.

For the VT100, pressing *<ENTER> toggles the selection of the printer.

Table 5-9. Function Keys Defined on the TeleVideo 950.

i

SHIFT-Key CTRL-Key

Key Function Functi on Function

F1 printer on X X

F2 printer off X X

F3 printer form feed X X

F4 move to TASK/PATH board X X

F5 move to PRIM board X X

F6 move to JOINT/COMM board X X

F7 X X X

F8 X X X

F9 X X X

F10 boot commands X X

F11 2D>M X X

Ccmfinuring the Printer

Connect the printer to the printer port on the terminal you are using. Make

sure the printer and terminal have the same port configurations, such as baud

rate and stop bits. Consult the printer and terminal manuals for more information. If your terminal does not have a transparent mode (where the terminal

passes all control codes through to the printer), some of the RCS printing

utilities will not work. In this case, you need to write a small amount of

FORTH code to communicate with a separate printer port. The TeleVideo 950 and

VT100 terminals have transparent modes.

5.^ HARDWARE INSTALLATION PROCEDURES

5-9
RIMFIRE-GET RDOP C080 FFFF 7WERR0R RIMFIRE-FREE

DECIMAL

t

In addition to configuring the ports on the printer and terminal, it is necessary to modify the system for the particular printer being used. The steps

involved are given in Section 5.5 in Step 8.

Preparing to Install the RCS Software

After configuring the boards, the disk, the printer, and the terminal, install

them and any other components of the system according to the manufacturer's

instructions. Although different applications require different configurations of the system hardware, you must have at least the minimum hardware con- figuration defined in Section 5.1, "Hardware Requirements", to install the RCS

system on a blank disk. If you want to install the full RSL application, you

must have three additional 86/30 processor boards configured as shown in Table

5-2 (board numbers 2, 4, and 6).

5.5 SOFTWARE INSTALLATION PROCEDURE

You install the RCS and RSL software by transferring it from the NBS-supplied

magnetic tape to your Winchester disk, and then compiling it on your system.

To install the software, follow this procedure:

Note: If you make an error in typing any of the required input statements,

use the "delete" key to backspace over the error and correct it. Do

not use the "backspace" or cursor control keys to correct an error.

1. Make sure the disk heads are unlocked. Then turn on the system and verify that the disk is spinning. V

2. At the terminal, type the first digit of the master board address (that

is, the board number) followed by a space and the word CBOOT. For

example type RPB 4 ERASE CBOOT and press RETURN.

After you press RETURN, the system initializes the disk semaphore and

control block for that board. Then the system loads the heads on the

disk to prepare it for use and displays the FORTH ok prompt.

3. Formatting the disk takes approximately 3 minutes. To format the disk,

enter the following commands exactly as shown:

HEX

RPB 1C ERASE

24 RPBPREP

0400 RPB T + ORM

H RPB 0A + !

t

5.5 SOFTWARE INSTALLATION PROCEDURE

5-10
Refer to the Rimfire controller manual for information on any error messages that appear during the formatting process. Repeat the commands

listed in this step if formatting does not proceed as expected. If the

problem persists, make sure that the addressing jumpers and switches are correctly positioned on the memory board, the processor board, and the

Rimfire controller board.

4. To rewind the tape, move the tape past the first file mark, and read in

the MBOOT file, load the RCS system tape into the tape drive and enter

the following commands exactly as shown:

TREWIND

TSKIP

1000 13^9 88 T/F-TAPE

Note; Appendix B, "User Word Summary", does not contain these words

because they are used only for this initial installation.

5. If the commands listed in Step 4 execute correctly, enter the following

commands to load MBOOT and the normal TAPE utility, and to rewind the

tape. Enter the commands exactly as shown, but substitute the [#] with

the first hex digit of the starting address for the 86/30 processor board

designated for RSL. If you configured your system as described in this

chapter, the first hex digit of the starting address for the RSL board is

0.

[#3 MBOOT

Basic TAPE

TREWIND

Now load the rest of the source code from the tape. After each FROM-TAPE

command, the specified blocks are read from the tape, and the message

tape is at file # (where # is the current file number on the tape) is

displayed. If an error message appears, do not execute the rest of the

commands (see Section 6.10, "Using Tape Utilities", for information on solving the tape problem). To load the source code, enter:

2 TGOTO

1350 1^99 FROM-TAPE

1500 1599 FROM-TAPE

7000 7999 FROM-TAPE

8000 8999 FROM-TAPE

9000 9999 FROM-TAPE

10000 10999 FROM-TAPE

11000 11999 FROM-TAPE

12000 12999 FROM-TAPE

After each FROM-TAPE command, the specified blocks are read from tape,

and the message tape is at file # will be displayed, (where # is the cur- rent file # on the tape). If any error messages appear, do not execute

the rest of the commands (see Section 6.10, "Using Tape Utilities").

5.5 SOFTWARE INSTALLATION PROCEDURE

5-11
6. Create the tape and print D>M by pressing the master reset switch and

entering the following commands on the master board:

HEX F7 C9 OUTPUT

RPB k ERASE

CBOOT

MBOOT

Depending on the type of terminal being used, enter:

[#] CUSTOM

Where [#] is 7. for Datamedia, 8^ for TeleVideo, and 9. for VT 100-compatible

terminals. Note that after you enter [#] CUSTOM, the system prompt

changes to list&tape>.

Now enter:

OFFSET ! 5 MEM>DISK

7. If you are using a Micro-Term ERGO 301 terminal, skip to Step 8. If you

are using either a TeleVideo or Datamedia terminal, you must reconfigure

the system.

For the TeleVideo 950, perform the following steps:

• In block 1370, the CUSTOM block, use the screen editor to change

VT100 in line U to Televideo .

• Change VT100-Terminal in line 6 to Televideo-terminal .

• Enter the following commands to copy block 1166 to block 1405:

1000 OFFSET ! 166 405 1 BLOCKS

For the Datamedia, perform the following steps:

• In block 1370, the CUSTOM block, use the screen editor to change

VT100 in line 4 to Datamedia .

• Change VT100-Terminal in line 6 to Datamedia-terminal .

• In block 1405, insert %%^ at the beginning of line 0. Inserting %%_

disables the programming of function keys since the Datamedia 1521

A

has none.

Note: For information on using the screen editor, see Section 6.7, "Editing a Block of Code".

#

*

5.5 SOFTWARE INSTALLATION PROCEDORE

5-12
»

8. If you are using an Imagewriter printer, skip to Step 9. If you are using either a DECwriter III or Integral Data Systems Paper Tiger

printer, you must reconfigure the system. For the DECwriter III, change

Image-writer to Dec-writer in blocks 1377, 1378, and 1379. For the Paper

Tiger, change Image-writer to Paper-tiger in these three blocks.

9. Create the base system by pressing the master reset button to turn the

hardware on and off, and then entering the following commands to the master 86/30 processor board. (If the system does not have 24-bit addressing the first command is not needed.) After you enter RCS, the system

responds with a variety of loading messages, followed by a :R prompt.

After you enter 1471 LOAD, the system prompt becomes :R r3l>.

HEX F7 C9 OUTPUT

CBOOT

MBOOT

init-cm

I

RCS

1471 LOAD

After you enter these commands, the system loads CUSTOM and performs

the 1 PRESERVE and 1 PRESERVE-FILE commands. CUSTOM loads a block that

customizes the board for a specific application (RSL on the tape supplied

by NBS). PRESERVE writes the current system dictionary to disk.

PRESERVE-FILE writes the current user files to disk.

10. As prompted, enter the 1 MEM>DISK command. This command writes an image

of the board's local RAM to the disk. Then enter Y_ at the nake imaige?

prompt.

11. A system running RSL requires four processor boards. Other applications

may require more or fewer processor boards. If you are installing equipment other than that listed for a system running RSL, you must edit

blocks 1472 through 1479 to reconfigure the base system to accommodate

these components. For information on how to edit blocks, see Section

6.7, "Editing a Block of Code".

12. Enter the following command to load each slave board through CUSTOM and

to execute the 1 MEM>DISK command:

1470 LOAD

Loading the base system takes about 14 minutes for the three slave boards

in a system configured to run RSL. The previous command causes each

slave board to execute the following commands:

[#] MBOOT

Slave

REMOTE-SLAVE

RCS

[#] CUSTOM

1 PRESERVE 1 PRESERVE FILE 1 MEM>DISK

5.5 SOFTWARE INSTALLATION PROCEDURE

5-13
vniere [#] is the first hex digit of the 86/30 processor board address

given in Table 5-2.

13. Enter the following command to load each slave board with the corresponding control level of the RSL sample application:

1480 0LOAD

$

Loading RSL takes about 7 minutes. If you are using an application other

than RSL, you must first define slave address constants in block 1404

(loaded by the master board) and reconfigure BOOT-SYSTEM. Blocks 1460

through 1469 are reserved for booting slave boards | BOOT-SYSTEM loads

block 1460.

14. When loading is complete, the system prompts you to enter the following

commands on the master board:

8000 OFFSET ! 2 MEM>DISK

Y

3 MEM>DISK

Y

At this point, the RCS and RSL software is installed.

5.5 SOFTWARE INSTALLATION PROCEDURE

5-14
Chapter 6

BASIC RCS OPERATIONS

This chapter provides the step-by-step procedures for performing basic RCS

operations. The operations include starting up the system; finding, loading,

and editing code; saving and rebooting the system; using printer and tape

utilities; and shutting dovm the system.

The procedures in this chapter describe how to use RCS user command words to

perform these basic operations. For a complete list of RCS user words, see Appendix B, "User Word Summary".

6.1 STARTING THE SYSTEM

This section describes how to start the system when you have a working application in the 2 D>M area of the disk. A D>M is a 120 consecutive block area

on the disk. Your system tape comes with the RSL application in the 2 D>M

area of memory.

RCS enables you to maintain up to five copies of local memory on the disk.

Each copy is called a disk image or D>M. The RCS word D>M enables you to move

one of the copies from the disk to memory. Alternatively, MEM>DISK moves a disk image from local memory to the disk. On the system tape provided by NBS,

1 D>M contains the base RCS version 2.2, 2 D>M contains RSL version 1.6, 3 D>M

and 4 D>M are free for expansion, and 5 D>M contains additional RCS features

such as the editor and the print and tape utilities.

For information on starting the system for the first time, including a more

detailed explanation of the start-up command words, see Chapter 5, "RCS

Installation Procedures".

Note: If you make an error in typing any of the required input statements,

use the "delete" key to backspace over the error and correct it. Do

not use the "backspace" or cursor control keys to correct an error.

To start the system, follow these steps:

1. Turn on rack power to the RCS hardware.

2. Press the RETURN key until the terminal responds ok.

3. Enter RPB H erase CBOOT MBOOT init-cm 2 D>M and wait for the :R rsl>

prompt. (Remember that the system is case sensitive. You must enter the

uppercase and lowercase characters as shown.)

The commands in Step 3 boot the RSL application. The CBOOT command initializes the Winchester disk, MBOOT loads the base FORTH system, init-cm

initializes memory, and 2 D>M moves the application image to memory and

executes the auto-load block. The auto-load block initializes the commu- nications process, the 808? chip, the function keys, the system dictionary, and the SMACRO files. The auto-load block also calls BOOT-SYSTEM to

boot the slave boards in the system.

6.1 STARTING THE SYSTEM

6-1
Note: At this point you can use the system for programming and debugging

without running the robot.

4. Turn on power to the robot.

5. Prepare the robot for RCS control. The exact procedures for this step

depend on the type of robot you are using with RCS. Typically, the steps

include turning on power to the robot controller, initializing the con- troller and the interface to RCS, turning on arm power to the robot, and

moving the robot to a safe starting position.

6. Enter GO to start all the control levels and the communications process.

RCS is now waiting for the robot to start communications.

7. Command the robot controller to start the RCS interface.

8. Enter _2X to return to the master board. You must press RETURN after "X.

RCS now controls the robot.

6.2 MOVING FROM ONE BOARD TO ANOTHER

To find a block of code in the memory on a specific board, you must move to

that board to search for the block. Moving to a board means that you make the

terminal communicate directly with the specified board. RCS enables you to use either software switches or a hardware switch for moving between boards.

After you move to the correct board, you must use the correct vocabulary on that board.

The RSL example includes four processor boards. The prompt that appears on the terminal identifies the board with which the terminal is currently communicating. In addition, the first two characters of the prompt indicate the

current operating mode of the system.

Table 6-1 lists the boards and their prompts for the RSL example system.

Table 6-1. Board Names and Prompts.

Board Name Prompt

RSL (the master board) :R rsl>

TASK&PATH :R task&path>

PRIM :R priin>

JOINT :R joint/c<MBm>

Note: The RCS prompts for each board were named with the RSL application in

mind. If you add a new application, you can change the prompts to

correspond to the control levels of your application. The prompt for

each board is defined by the word :0K in the CUSTOM block for that

board.

6.2 MOVING FROM ONE BOARD TO ANOTHER

6-2

r
Dsing Software Switches

The software switch is the code on the master and slave boards that enables

you to select the board with which the terminal is communicating. For example, enter [slave board name] REMOTE to make your terminal communicate with a specified slave board. Enter _2X to make your terminal communicate with the

master board again.

The NBS-supplied system tape includes code to define the function keys on the

Micro-Term terminal. Function keys correspond to each slave board, eliminating the need to type [slave board name] REMOTE . See Table 5-8 in Chapter 5,

"RCS Installation Procedures", for the definition of all Micro-Term function

keys.

If you have a different terminal, you can customize the function keys for that

terminal by editing the block that defines the word Function-keys (absolute

block number 1405). If you have defined function keys for the slave boards in

your system, you can move between boards by pressing the function key for the

board you want.

You must move to a slave board from the master board; you cannot move from one slave board to another. To return to the master board from any slave board,

enter "X.

Dsing a Hardware Switch

If your system includes a switch box for the terminal, you can communicate

with another board by moving the switch to the position corresponding to the

appropriate board.

You can also use this switch to perform a soft reset of a board by setting the

switch for that board and entering _2£. You can perform a hard reset of the

entire system by using the master reset button on the chassis.

Changing Vocabularies

Each board contains a system vocabulary, called SDEF, and up to five userdefined vocabularies. To locate code on the system, you must be on the cor- rect board and in the correct vocabulary on that board. To display the cur- rent vocabulary name and size, enter V-SIZE . Enter SDEF to change to the

system vocabulary on any board.

The RSL application includes a predefined vocabulary for each control level.

These vocabulary names are the same as the names of the RSL control levels:

TASK, PATH, PRIM, and JOINT. The word $DEF sets the vocabulary to be the

vocabulary of the current board. For example, if you are on the PRIM board,

enter $DEF to move to the PRIM vocabulary. Because the TASK and PATH levels

are on the same board, RSL defines the words TDEF and PDEF to move between the

TASK and PATH vocabularies on the TASK&PATH board.

6.2 MOVING FROM ONE BOARD TO ANOTHER

6-3
Alternatively, you can enter [name] DEFINITIONS , where [name] is the name of

the desired vocabulary. For example, enter PRIM DEFINITIONS to use the PRIM

vocabulary.

6.3 LOCATING SOORCE CODE

Locating source code requires an understanding of the LOG command, the Locate

mode, directory block conventions, relative and absolute blocks, and offsets.

This section discusses these topics, including an example of how to locate

source code using the RCS directory block system.

Most code creates entries in the system dictionary. This code can be located

by name using the LOG command or Locate mode. To locate code which does not

make entries in the system dictionary, you must use the directory block

system.

Using the LOC C<»mand

When you are on the correct board, using the correct vocabulary, use the LOC

command to find the block where a specific word is defined. Enter LOG followed by a space and the word you want to locate. The system displays a listing of the source block in which the word is defined.

Some words cause RCS to issue the message Pre-locate. This message indicates

that the word is a system word, not a user application word, and that you cannot access it. However, some system words are accessible using the LOC

command

.

Using the Locate Mode

You can also find a specific block using Locate mode. To use Locate mode,

when you are on the correct board, using the correct vocabulary, enter iL^, In

Locate mode, :L prefixes the system prompt.

Enter the word that you want to locate and the system lists the block that

defines that word, instead of executing the word. To exit Locate mode, enter

;R . (For more information on RCS modes, see Section 7.4, "Modes".)

Understanding Directory Block Conventions

The RGS disk is organized into sections containing 1000 blocks each. For

example, the source code for RGS resides in the 7000-block section, and the source code for RSL resides in the 8000-block section. For a complete map

showing these blocks, see Appendix G, "System Maps".

#

6.3 LOCATING SOURCE CODE

6-4
All source code on the disk is organized according to the FORTH block structure; a block contains 16 lines of 64 characters each. RCS uses a hierarchical directory block structure to organize these blocks on the disk. A directory block exists for each 1000-, 100-, and 10-block section of disk.

Note that if a block is or a multiple of 10 or 100, the next block (block 1,

block 11, or block 101, respectively) is also a directory block that lists

blocks at the next directory level. For example, block 11 lists the directory

for blocks 12 through 19.

The directory blocks contain comments to help you locate code on the disk.

You must maintain directory blocks. When you add, delete, or change code, be sure to update the affected directory blocks.

Using Relative and Absolute Block Addresses

RCS uses a system of relative block addresses to help you locate blocks.

The absolute block number is the actual block number on the disk; the

relative block number is the absolute block number minus the offset.

Specifying an Offset

The offset is the value of the special FORTH variable OFFSET. The offset is

usually a multiple of 1000 that indicates the board with which you are cur- rently communicating. Using an offset decreases the number of characters you

must enter to identify a block.

If a board boots with the offset set at 8000, you can access blocks 8000

through 8999 using the relative block numbers through 999.

Note that there may be more than one control level on the same processor

board. In this case, the first level resides in blocks through 999, the

second level resides in blocks 1000 through 1999, and so forth.

Use !, the FORTH store command, to change the offset. For example, to set the

offset at 8000, enter 8000 OFFSET ! .

Note: If you reconfigure the disk, you must edit the code in the applicationload blocks to change the offsets.

An Example of Using the RCS Directory Block System

This section explains how to use the RCS directory block system to locate a block of code. Figure 6-1 shows the directory blocks for a 1000-block section

of the disk.

6.3 LOCATING SOURCE CODE

6-5
Dl rectory

Blocks

Code and

Data Blocks

j

i 1

rl2l ; ITril -El : •

• L|19| :

H«ii| : Hqi2| : •

• H919| :

i

-PI ; -|30| : •

•

•

: 1 100

200

300

400

: 500

600

700

H920|:

H930|: : ••

• H990|:

1 1

800

900

1 Directory

Blocks D

Code and

ata Blocks

Figure 6-1. Directory blocks for a 1000-block section of the disk.

6.3 LOCATING SOURCE CODE

6-6
You use these directory blocks to locate code; for example, to find the block

that contains a TRANSFER task. Tasks are contained in blocks on the TASK

level. To find where TASK is located on the disk, boot the system (Steps 1 through 3 in Section 6.1, "Starting the System"), then enter MAP to list the

first block of the directory of the disk.

-10640 1360 ABS

220/A366 Development Disk Directory 03/05/86

»«»*••» SYSTEM BLOCKS »»»»»»»»«»»»

- 999 FLOPPY BLOCKS

1000 -

1350 - 1500 -

1349

1499

1599

MBOOT 2.2

CUSTOM

screen EDIT

1600 - 6000 - 5999

6999

D>M images

TAPE TRANSFER

7000 - 8000 - 9000 -

7999

8999

9999

RCS 2.2

RSL 1.6

TASK 1.6

10000 -

11000 -

12000 -

10999

11999

12999

PATH 1.6

PRIM 1.6

JOINT 1.6

:R rsl>

As you can see, MAP lists absolute block 1360, which shows TASK at 9000

OFFSET. (You can see the rest of the MAP directory block by entering N L .

)

Enter 9000 OFFSET ! to set the offset to the location of the TASK level.

Enter LIST to list the first directory block for the TASK level.

( TASK 1.6 5/19/86 for RSL 1.6b

2

3

4

5

6

7

8

9

10

11

12

13

14

15

:R rsl>

1 load, list, debug

100 variables

200 pre-process

300 ccNimand ; primitives

400 coaaaand : path search

500 command : tasks, COMMAND-PROCESS

600

700

800 post-process

900 user commands, level, power-up

6.3 LOCATING SOURCE CODE

6-7
Because the TRANSFER command is a user command, you can see on line 11 that

TRANSFER should be in the 900 100-block section. Enter 900 LIST to display

the next directory-level listing.

900

( TASK ; user c(»inands, level, power-up

1 - 2 01 Display, time

3 10 user ccxmnands

4 20

5 30

6 40

7 50

8 60

9 70

10 80 power-up load block

11 90 TASK LEVEL

12 ) 13 00 ref-blk

14 01 load ( 10 load 20 load 30 load 40 load

15 50 load 60 load 70 load 80 load ) 90 load

:R rsl>

You can see on line 3 that user commands are in the 910 10-block section.

Enter 910 LIST to display the next directory-level listing.

910i

12

( TASK ; user commands

1 RESTART

3 2 PAUSE

4 3 TRANSFER

5 4 MOVE-TO nul ARRAY-SAFE

6 5

7 6

8 7

9 8

10 9 single-step

11

12 ref-blk

13

14 ( 1 load 2 load 3 load 4 load 5 load

15 6 load 7 load 8 load 9 load ) -MEM

:R rsl>

Finally, you can see on line H that TRANSFER is in block 913. Enter 913 LIST

to display the TRANSFER command block.

6.3 LOCATING SOURCE CODE

6-8
913

1 :R

2 inc-conmand-f-ln '§ l-i- ==> inc-ccHmnand-TASK DEFINITIONS#-ln

3 '* TRANSFER nul 01 arr ARRAY 00 08 ;; loc CONVEYOR " 4 ==> Input-connuind

5 :S

6

7

8

9

10

11

12

13

14

15

:R rsl>

6.4 LOADING CODE

Loading code in RCS is similar to loading code in FORTH. In fact, in RCS, the

word "load" means the FORTH LOAD operation, which reads a block from the disk

to local RAM, and then interprets all the words in the block. In RCS, the

SMACRO compiler interprets or compiles the words in a block.

The SMACRO compiler in RCS is an incremental compiler. It compiles, links,

and loads code in small pieces, typically one routine at a time. No separate

linker and loader exists as in other systems; the code is completely linked

and ready to run when the compiler finishes with it. The SMACRO compiler is

called by the SMACRO defining words, mainly the word "routine" and variable

declarations. Thus, to compile code, you simply load the blocks containing

it.

Note that loading a block does not necessarily result in compiling code. The

block may contain words that perform other tasks, such as initializing ports

or executing routines. Blocks used this way resemble command files on other

systems.

The SMACRO compiler also enables you to redefine routines. After a complete

system is loaded, you can edit and reload (recompile) any routine at any time,

without reloading or even relinking the rest of the system. Any routine that

calls the edited routine now calls the new version. Combined with the block

screen editor, the ability to redefine routines is extremely useful for

debugging, because bug fixes can be tested with very short edit and compile

cycles.

SMACRO is also interpretive in that you can execute any routine by typing its

name, and you can view and set variables. You cannot execute statements or fragments in this way, only compiled routines. This restriction retains the

speed of compiled systems, while providing the user-friendliness of interpreted systems.

6.4 LOADING CODE

6-9
To load a block, enter the relative block number followed by the word LOAD , or

the absolute block number followed by the word 0LOAD . You can save the time

required to reload code by saving the FORTH and SMACRO segments (the D>M) and

the system dictionary to disk, using the MEM>DISK and PRESERVE commands.

The following procedures describe two special situations in which you need to

load code: reloading an edited routine and loading code still under

development.

Editing and Reloading a Routine

To edit and reload a routine, follow these steps:

1. Boot the system as described in Section 6.1, "Starting the System".

2. Edit the routine as described in Section 6.7, "Editing a Block of Code".

3. Move to the board containing the routine.

k. Use the command LOAD or 0LOAD to reload the source code for the routine.

5. Enter [preserve//] PRESERVE [preserve//] PRESERVE-FILE , where [preserve*] is

the number of the PRESERVE area containing the final application, to save

the system dictionary and your files.

6. Enter [d>m#] MEM>DISK , followed by a comment, such as the date and a description of the changes you made. The comment must begin with a double

quotation mark.

The MEM>DISK command saves the FORTH and SMACRO segments that are on the

board. For example, 2 MEM>DISK " Added code for new sensor , saves the

2 D>M image to disk.

(This procedure is illustrated in Section 6.8, "Example RCS Dialogue".)

Loading Routines Under DevelotHnent

The procedure for loading routines under development is similar to the procedure for reloading a routine. However, because an application under development may contain programming errors, you should load it in segments. After

you load each segment of the application and ensure that the code works properly, save the application and the system dictionary to the disk, using the

D>M and PRESERVE commands.

To load an application under development, follow these steps:

1. Make the board containing the application the current board.

2. Enter [d>m#] D>M to copy the working Forth and SMACRO segments from the

disk into memory, where [d>m#] is the last image saved.

6.4 LOADING CODE

6-10
3. Enter [Preserve#] RESTORE [preserve//] RESTORE-FILE to copy the working

system dictionary and SMACRO files from the disk into memory.

4. Load the code under development. If the system detects an error, RCS

aborts the loading procedure and you must edit the block to correct the error.

An error may be nonfatal or fatal. If the error is nonfatal (for example,

a misspelled variable name), simply reload the block. If the error is

fatal (for example, not allowing enough space for a variable owner),

reload the application using the D>M, RESTORE, and RESTORE-FILE commands.

At this point, all of the code is loaded. However, memory space may be

wasted as a result of nonfatal errors. To recover this wasted space,

repeat Steps 2 through 4 before continuing to Step 5.

5. Enter [preserved] PRESERVE [preserve/A] PRESERVE-FILE , where [preserved] is

the number of the PRESERVE area containing the final application, to save your files and the system dictionary.

6. Enter [d>m#] MEM>DISK , followed by a comment, to save the updated FORTH

and SMACRO segments to disk.

Using this procedure, you can restore a system quickly without reloading a list of blocks.

6.5 EXECUTING TASKS AND RODTINES

With RCS, you can execute robot tasks with an operating robot, or the routines

that define that task without an operating robot. RCS also enables you to

operate in different modes, control output to the screen, and abort an exe- cuting task.

Executing Robot Tasks

To execute a robot task, load the block that defines that task. For example,

if the RSL transfer task is defined in block 913 on the TASK board, enter

Task/path REMOTE to move to the TASK&PATH board, and then enter 913 LOAD to

execute a transfer in which the robot transfers an object to a different

location.

Executing Routines

Executing routines without an operating robot is useful when you are debugging

an application. First, issue a HALT command to stop all control levels, the

communication process, and execution of the robot interface. Then assign values to the input variables needed by the routine, and enter the name of the

routine to execute it. If the routine includes many input variables, you may

want to set up a load block to assign values to the input variables. This

procedure is illustrated in the example in Chapter 13, "Debugging Techniques".

6.5 EXECUTING TASKS AND ROUTINES

6-11
Understanding Modes

RCS includes four operating modes: Run, Show, Locate, and Compile. In Run

mode, the system executes routines previously compiled. In Show mode, the

system displays on the screen the contents of variables. In Locate mode, the

system displays the block defining the word you enter. Section 7.4, "Modes",

explains how these modes affect SMACRO words. RCS uses Compile mode when you

load a block containing defining words.

Controlling Screen Output

To suspend output to the terminal, press _2S. To resume output to the terminal, press _2Q.

Aborting an Executing Task

To send a soft reset to the board to which the terminal is currently connected

(usually the master board), press _2C. If you are using a software switch to

communicate with a slave board, pressing *C aborts the software switch and

returns you to the master board. The executing task on the slave board is not

aborted. To abort a task on a slave board, use the switch box to access that

board and then press "^C .

6.6 SAVING AND REBOOTING THE SYSTEM

When you change existing code or create new applications, you usually want to save the changes or the new code to the disk. You may also need to recreate

the base system to reflect hardware changes. This section describes the procedures for performing these operations.

To understand these procedures, you need to understand the structure of RCS

described in earlier chapters of this manual. RCS stores compiled code, variables, and routines in the local memory of each processor board. Common memory contains the system dictionary and user files. RCS also stores compiled

code on the disk in D>Ms, PRESERVES, and PRESERVE-FILEs , which contain copies

of the compiled code from local and common memory.

Figure 6-2 shows the action of the RCS words D>M, MEM>DISK, PRESERVE, RESTORE,

PRESERVE-FILE, and RESTORE-FILE, used for saving and restoring copies of code.

6.6 SAVING AND REBOOTING THE SYSTEM

6-12
MEM>DISK

BOARD

1 D>M

2 D>M

3 D>M

4 D>M

5 D>M

Processor

Boards

o

o

MEM>DISK

BOARD C

1 D>M

2 D>M

3 D>M

4 D>M

5 D>M

Figure 6-2. Restoring and saving code.

Saving and Restoring Disk Images

A D>M is the name given to a disk area of 120 consecutive blocks containing

the FORTH and SMACRO segments for a processor board. A D>M is a disk image of

the contents of that 120-block area. D>M is also an RCS word that moves the

data in the D>M to local memory.

The disk includes space for seven boards, each with five disk images (D>Ms).

Enter [boards] DM? to list the D>Ms on a board. This listing is called the

D>M map block. The word MBOOT lists the D>M map block for board 0, which you

see every time you start RCS.

6.6 SAVING AND REBOOTING THE SYSTEM

6-13
Figure 6-3 shows the D>M map block for board of the RSL application,

-7615 1385 ABS

D>M MAP : board : RSL

II 5/191 init-cm RCS 1471 LOAD % RCS 2.2

21 5/191 1 D>M 1480 LOAD % RSL ( all boards )

31 4/111

41 5/28

8 CUSTOM % edit, laser print, type

51 4/111 9 CUSTOM % edit, Image print, tape

Figure 6-3. Example D>M map block.

In this D>M map, you create the 1 D>M image by entering the commands summa- rized on line 1. To create the 5 D>M image, enter 9 CUSTOM . You must update

this block for your specific application.

The RCS word D>M moves the data in that D>M area on the disk to local memory,

and then loads the auto-load block. A reserved auto-load block exists for

each D>M on each board. The auto-load block executes all the words necessary

to start the D>M, including initializing hardware and software.

For example, when you enter 2 D>M to boot an application, RCS copies the 2 D>M

image from disk to local RAM and the auto-load block executes, restoring the

system dictionary and SMACRO files from the disk.

The RCS word MEM>DISK copies the contents of the on-board RAM into a D>M space

on the disk, saving the current segments. Any words you enter on the same

line after the MEM>DISK are executed both after the MEM>DISK word and after

the corresponding D>M is executed. Enter words after the MEM>DISK command to

add comments to describe the D>M.

6.6 SAVING AND REBOOTING THE SYSTEM

6-14
The following dialogue illustrates D>Ms, input lines, and auto-load blocks:

:R r3l>Joint/comm REMOTE Switch to the Joint/comm board.

:R joint/CCTim>2 AUTO? Display the auto-load block for

the 2 D>M on the Joint/comm board.

-10564 1436 ABS

% board 6 2 D>M

CR " Joint/ccwnn level "

" MO RESTORE " TDffi-ODT-INIT 87IHIT

HEX 7FFF ==> control-cycle-#-clks DECIMAL

RESTART-COm-TIMER

CR " Joint init " 12000 980 OLOAD

CR " Joint/ccxnra inited " CR

When you load this block, it prints the message Joint/conm level NO RESTORE,

initializes the time-out and the 8087, initializes the variable

control-cycle-#-clks, starts the communications timer, prints the message

Joint inlt, loads block 12980 absolute, and prints the message Joint/c<»im

inited. Block 12980 loads other blocks that initialize several variables for

the JOINT level.

:R joint/c<Mim>2 MEM>DISK "hi there-this is the input line"

Make a new 2 D>M; it overwrites

make image? ^ the old 2 D>M. Confirm the

command

.

Joint/comii level NO RESTORE

Joint init

Jolnt/comn inited

hi there-this is the input line

RCS loads the auto-load block when MEM>DISK executes. The auto-load block

displays the message on the input line.

:R joint/c<MBm>2 D>M Executing 2 D>M now reads into RAM

the copy just written, loads the

auto-load block, and displays the

message on the input line.

Jolnt/ccMmB level NO RESTORE

Joint init

Joint/c<»im inited

hi there-this is the input line

All essential start-up procedures should reside in the auto-load block. Use

the D>M input line only for comments.

6.6 SAVING AND REBOOTING THE SYSTEM

6-15
Saving and Restoring the System Dictionary

Use the words PRESERVE and RESTORE to move the system dictionary between com- mon memory and the disk. PRESERVE moves the system dictionary from common

memory to the disk, and RESTORE moves the system dictionary from the disk to

common memory. The disk contains space for nine copies of the system dictionary. The base RCS system dictionary resides in the 1 PRESERVE area.

Saving and Restoring User Files

Use the words PRESERVE-FILE and RESTORE-FILE to save and retrieve SMACRO

files. (RCS creates user files using the SMACRO FILE declaration. See Section 7.2, "SMACRO Syntax", for more information.) PRESERVE-FILE saves your

files to the disk, and RESTORE-FILE retrieves them. The disk contains space

for nine copies of your files.

Note: Be careful when using more than one version of an application. If you

do not enter the PRESERVE, PRESERVE-FILE, and MEM>DISK commands after

making changes to the system, the versions in the D>M and the source

code will differ.

6.7 EDITING A BLOCK OF CODE

RCS provides line-editing commands and a screen editor. Both these editing

features are loaded in the 2 D>M and 5 D>M on the master board. You have to

be on the master board to use the screen editor.

To edit the current block of code using the screen editor, enter ED. To edit

any other block, enter [blocks] ED . RCS displays the block and puts you in

the screen editor. In the editor, a block consists of 16 lines of 64 characters each. The screen editor does not recognize characters that exceed the

FORTH block boundaries. Be careful not to lose characters off the end of a line or the end of a block.

The source code on your supplied tape is spread out over many blocks. The

empty blocks are provided so you can expand the system. If new or added code

does not fit in a block, use editing commands to move part of the block to the

next block and load both blocks together. Do not put a vocabulary name in the

continuation block. This technique is shown for an example SMACRO routine in

Figure 6-4.

6.7 EDITING A BLOCK OF CODE

6-16
JOINT DEFINITIONS

1 routine CARTESIAN

2 % Input: pose-'^-in, scaling-var

3 % Output: servo-com-joint, scaling-var

H if servo-status (EQ) error

5 then error => status-report lower-level => status-arg-out

6 else

7 POSE-FILE pose-^-in => record*

8 retrieve-from-fields pose conf-flag pose

9 REACH-CHECK

10 if status (EQ) noerror

11 then CART> JOINT CART-CONFIGURE

12 if status (EQ) noerror

13 then 1.# .=>. j-acc 1.# .=>. j-vel

14 SCALE

15 servo-point => output-command inc-command-#-out INC

( CARTESIAN cont )

1 JOINT-LIMIT-TEST

2 is status (EQ) error

3 then error => status-report

4 status-arg => status-arg-out

5 old-ja S=> servo-com-joint

6 else CART-STATUS

7 endif

8 else error => status-report

9 status-arg => status-arg-out

10 endif

11 else error => status-report

12 status-arg => status-arg-out

13 endif

14 endif

15 end-routine

Figure 6-4. Using continuation blocks.

Using Screen-Editor Canmanda

To move the cursor in the screen editor, use the four arrow keys. If you hold

down an arrow key, the key repeats until you release the key. The cursor

never leaves the block; if the cursor reaches the end of a line, it wraps

around to the beginning of that line. The HOME key moves the cursor to the

top left corner of the block. All screen-editor commands use relative block

numbers.

6.7 EDITING A BLOCK OF CODE

6-17
When you enter the screen editor, RCS displays the four categories of editing

commands, as shovm in Figure 6-5. The vertical lines on the right of the

figure indicate the end of the 64-character line.

CHARACTER OPS LINE OPS BLOCK OPS SPECIAL OPS

"A Insert On/Off ''C Copy Line "F Forward Block PF1 Home PF2 Clear

''E Erase Char *D Delete Line "P Previous Block "U Undo Block

"K Mark to Keep "0 Open Line "G Goto Block "W Want String

*Z Input Keep *T Transfer "N Next Want

"R Retire(quit) "X Cancel

BLOCK

12

3

H

5

6

7

8

9

10

11

12

13 1 14

15

Figure 6-5. RCS screen-editor display for the VT100,

The control characters listed on the screen are for the VT100. Other terminals may have other control characters that perform the same function. The

commands the control characters perform are listed on this screen. Table 6-2

describes these editing commands.

Note: The screen editor must be configured for the terminal being used.

Section 5.5, "Software Installation Procedure", for the procedure.

See

6.7 EDITING A BLOCK OF CODE

6-18
Character operations

In the screen editor, you can edit characters using the four character-editing

commands shown in Table 6-2.

Table 6-2. Character-Editing Commands.

Command

'A (Insert On/Off)

Description

Inserts characters when on and writes over characters

when off. After you press ^A, • INSERT • appears at

the top of the screen, and any characters you enter are inserted at the cursor position. When you press ^A

again, the insert indicator leaves the screen and any

character you enter replaces the character at the

cursor position.

Caution: Remember not to shift characters past the end

of the line.

'E (Erase Character) Erases the character at the cursor position and moves

the remaining characters in the line one space to the

left.

'K (Mark to Keep) Marks code to be copied into a Keep buffer that you can copy to other locations within the block or to another

block. Use "K to delimit the string you want to copy

to the buffer.

'Z (Input Keep)

Position the cursor on the first character to include

and press 2^ once. • KEEP • appears at the top of the screen. Then move the cursor to the first position

after the last character to include and press

^

again. If the last character you want to save is the

last character in the line, position the cursor at the

first character in the next line and press ^K .

If the insert indicator is on, inserts the string

contained in the Keep buffer starting at the cursor

position. If the insert indicator is off, enters the

string in the Keep buffer at the cursor position,

overwriting the characters already there.

6.7 EDITING A BLOCK OF CODE

6-19
Line operations

In the screen editor, you can edit lines using the three line-editing commands

shown in Table 6-3.

Command

'C (Copy Line)

'D (Delete Line)

'0 (Open Line)

Table 6-3. Line-Editing Commands.

Description

Moves all lines after the line containing the cursor down one line, and copies the line containing the

cursor on the resulting blank line. The last line of

the block is lost; it does not move to the next block

or wrap around to the top of the block.

Deletes the line containing the cursor and moves all

subsequent lines up one line, leaving the last line in

the block empty.

Moves the line containing the cursor and all subsequent

lines down one line, providing a blank line for new

input. The last line of the block is lost.

If you want to insert more lines than the block can hold and the next block is empty, use the Keep buffer

or the Transfer command to copy part of the block into

the next block. Make sure both blocks are loaded

together.

Block operations

You can save and move code between blocks using the five block-operation com- mands shown in Table 6-4.

Table 6-4. Block-Operation Commands.

Command

'F (Forward Block)

Description

Saves changes to the current block and displays the

next block. The next block appears in the screen

editor, with the cursor at the same position as it was

in the saved block.

'P (Previous Block) Saves changes to the current block and displays the

previous block. The previous block appears in the

screen editor, with the cursor at the same position as

it was in the saved block.

6.7 EDITING A BLOCK OF CODE

6-20
Command

h *G (Goto Block)

'T (Transfer)

Description

Displays the block you specify,

system displays a Go To Block

When you enter _2G, the

prompt at the

bottom of the screen, requesting a block number. After

you enter the relative block number, the current block

is saved and the specified block appears in the editor.

Transfers lines within a block or from one block to

another. Start the transfer operation with the cursor

at the destination location.

When you enter _2T, the system displays the prompt

Transfer Block . Enter the relative block number

of the block containing the information you want to

transfer. The system then displays the prompt From

Line . Enter the number of the first line you

want to transfer. Then respond to the To Line

prompt with the number of the last line you want to

transfer. The transfer lines overwrite existing

characters in the destination block.

I

'R (Retire)

For example, to transfer lines through 5 from block

99 to block 100, display block 100 and place the cursor

at the position where you want the transferred

information to appear. Then press _2T, and respond to

the three prompts with 99 ? 0., and 5_, respectively.

Caution: Insert mode should be off. Transfer lines

overwrite existing characters in the destination block.

Saves the current block and exits the screen editor.

The message Bye appears on the screen, and you return

to the master board.

6.7 EDITING A BLOCK OF CODE

6-21
Special operations

Table 6-5 describes the commands you can use for special editing operations in

Screen Edit mode.

Command

PF1-H0ME

PF2 (Clear)

*U (Undo Block)

^W (Want String)

^N (Next Want)

Table 6-5. Special Editing Commands.

Description

Moves the cursor to the home position in the block.

Erases the contents of the block. If you press the

CLEAR key unintentionally, enter _2U to undo the Clear

operation.

Restores the screen to its condition before the last

Save operation. Note that several editing commands

save the contents of a block before performing their

assigned functions. For example, ^F saves a block

before moving to the next block.

Enables you to search for a string of up to 20

characters. After you press _2W, the system displays the

prompt Search Input . Enter the search string.

After you enter the search string, the system displays

the From Block and To Block prompts,

enabling you to specify beginning and ending block

numbers for the search. After you answer these

prompts, the system displays the first block in the

specified range that contains the search string. The

characters must match exactly.

While the system is searching for the string, AT and

the number of the block currently being searched appear

at the top of the screen.

Repeats the last Want String operation specified using

*W, finding the next occurrence of the search string

within the specified range.

'X (Cancel Operation) Cancels an editing operation. For example, to cancel a transfer operation after pressing _2l., press _2X before

responding to all three Transfer command prompts.

Using Line-Editor CCTamands

You can also edit blocks outside the editor by using the RCS line-editor com- mands. Common line-editor commands are listed alphabetically in Table 6-6.

Line-editor commands enable you to perform operations such as listing a block,

or clearing or copying a range of blocks. For a complete list of editing commands, see Appendix B, "User Word Summary".

6.7 EDITING A BLOCK OF CODE

6-22
Command

B

Table 6-6. Line-Editor Commands.

Description

Decrements the current block number,

[source block]

[destination block]

[# of blocks] BLOCKS

[start block] [end block] CLEAR

Copies blocks, starting at the source block

and continuing for the number of blocks

specified, to the destination block. The

source and destination blocks may overlap.

For example, to copy blocks 100, 101, and

102 to blocks 400, 401, and 402, enter

100 400 3 BLOCKS .

Clears the specified range of blocks with

spaces.

Note: Use the BLOCKS and CLEAR commands with extreme caution, because you can lose large sections of source code with a simple typing error.

[start block] [end block] FIND

[string*]

[start block] [end block]

FIND-R [string"]

Displays each line containing the string in

the specified range of blocks. The display

shows the line number in the block at the

right margin, along with the start block num- ber on the first line followed by the end

block number on the last line.

Replaces all occurrences of the string in the

specified block range with the str_ng in the

insert buffer. You can load the insert buffer using the command R-WITH, described later

in this table.

[block#] LIST

[absolute block#] 0LIST

[block*] LLIST

Lists the current block, including the line

numbers. N L lists the next block, B L lists

the previous block.

Lists the specified block, including the line

numbers.

Lists the specified block, including the line

numbers. You must specify the absolute block

number.

Lists the specified block without line

numbers.

[absolute block#] 0LLIST Lists the specified block without line num- bers. You must specify the absolute block

number.

Increments the current block number.

6.7 EDITING A BLOCK OF CODE

6-23
Command Description

[start block] [end block] QR Searches for a string and either replaces it or does not replace it, based on your answer

to a query. QR prompts you for the search

and replace strings.

The system searches for the first occurrence

of the search string. When the system finds

the string, QR prompts you to confirm the

replacement by positioning the cursor at the

end of the string. You enter Y, y, or space

to replace the search string with the replace

string. You can enter ? to display a help

menu.

R-WITH [string"] Loads the insert buffer with the specified

string.

6.8 EXAMPLE RCS DIALOGDE

This section gives a possible dialogue for a user of the NBS RSL application.

The dialogue contains examples of most of the procedures described in sections

6.2 through 6.7. The dialogue locates the word Display in the vocabulary of

the PATH level on the TASK&PATH board. The word Display displays the contents

of certain variables.

After the dialogue locates Display, it executes Display, edits Display to

label the variables displayed, and saves the updated routine on the disk. The

dialogue indicates each of these steps with a separator shown in all uppercase

characters. Information that you type appears underlined in the dialogue.

Information that the system displays appears in boldface in the dialogue.

Brief explanations are included in parentheses.

Remember that this example is specific to the NBS implementation of RCS, and

the RSL application of RCS. If you are working with the NBS implementation,

you may want to use this dialogue as a tutorial to get acquainted with basic

RCS procedures. Centered headings appear in the tutorial to indicate the

function of each group of commands.

To start the tutorial, boot the system as described in Steps 1 through 3 of

Section 6.1, "Starting the System". After you boot the system, it displays

the prompt for the master RSL board.

6.8 EXAMPLE RCS DIALOGDE

6-24
STEP 1: LOCATE Display FOR THE PATH LEVEL

:R rsl> Task/path REMOTE

:R task&path> PDEF

:R task&path> LOG Display

1909 10909 ABS

routine Display

if print-f (EQ) true

then

T CR

-PRINT" path: " "PRINT inc-ccxmiand-f-in

"PRINT input-connnand

"PRINT status-report

"PRINT status-arg-out

"PRINT ppt-c<»Dn£Uid

"PRINT ppt-done

endif

end-routine

(Moves to the task/path board.)

(Makes the path vocabulary current .

)

(Lists the source block for Display.)

PATH DEFINITIONS

STEP 2: EXECUTE Display

:R task&path> Display

path;

(Executes the word Display.)

STEP 3: EDIT Display TO ADD A LABEL

:R task&path> 2jL

;R rsl> red

(Returns to the master board containing the

editor.)

(Edits the block most recently accessed on

the most recent slave board.)

6.8 EXAMPLE RCS DIALOGUE

6-25
STEP 3: EDIT Display TO ADD A LABEL (cont.)

CHAHACTER OPS

*A Insert On/Off

*E Erase Char

*K Mark to Keep

*Z Input Keep

T.TNE OPS BLOCK OPS SPECIAL OPS

*C Copy Line "F Forward Block PF1 Home PF2 Clear

*D Delete Line "P Previous Block '^U Undo

*0 Open Line "G Goto Block If Want string

*T Transfer "N Next Want

"R Retire(quit) "^X Cancel

2909 10909

12

3

k

5

6

7

8

9

10

11

12

13

14

15

routine Display

if print-f (EQ) true

then

T CH

-PRINT" path: " ""PRINT inc-co]mnand-#-in

"PRINT input-c<»ini2Uid

"PRINT status-report

"PRINT status-arg-out

"PRINT ppt-c(»amand

"PRINT ppt-done

endif

end-routine

PATH DEFINITIONS

Use the arrow keys to position the cursor at the first character in line 10.

_2A (Enables you to insert characters. Notice

the insert indicator appears after the absolute block number.)

'PRINT" ppt: " (Labels the path-point output. Do not put a space before the first quotation mark. Do

put a space before and after the second quotation mark.

)

(Turns insert off.)

(Exits the editor.)

Bye

:R rsl> L 2909 (Lists the current block with your editing

changes.

)

6.8 EXAMPLE RCS DIALOGUE

6-26
STEP 3: EDIT Display TO ADD A LABEL (cont.)

1 routine Display

2 if print-f (EQ) true

3 then

4 "T CR

5 -PRINT" path: " 6 "PRINT inc-c<»gmand-#-in

7 "PRINT input-ccxmnand

8 "PRINT status-report

9 "PRINT status-arg-out

10 "PRINT" ppt: " "PRINT ppt-conamand

11 "PRINT ppt-done

12 endif

13 end-routine

14

15

PATH DEFINITIONS

STEP 4: LOAD THE BLOCK AND EXECUTE THE ROUTINE

:R rsl> 2JL (Returns to the most recent slave board.)

:R task&path>

:R task&path> 1909 ELOAD Display REDEFINED

(Empties the local block buffers and then

loads the specified block.)

:R task&path> Display (Executes the word.)

path: ppt:

:R task&path>

STEP 5s SAVE THE UPDATED ROUTINE

:R task&path> 6 PRESERVE 6 PRESERVE-FILE

(Writes the system dictionary and SMACRO

files to the 6 PRESERVE area on the disk.)

6.8 EXAMPLE RCS DIALOGUE

6-27
8R task&path> 3 MEM>DISK " Patched Display 5/23 "

(Writes the current D>M, D>M number 3, from

the local RAM on the TASK&PATH board, to the

disk. The text within quotation marks is a comment briefly describing the update you

made, followed by the date. The comment

appears as a message the next time you execute a 3 D>M. You may want to save comments

in a logbook to track the changes you make to

the system.)

STEP 5: SAVE THE UPDATED ROUTINE (cont.)

make image? _Y (Confirms the MEM>DISK command and writes the

image to disk.)

Task/path levels

NO RESTORE

Task init

Path init

sonar not inlted

Task/path inlted

Patched Display 5/23

:R task&path>

6.9 USING PRINTING UTILITIES

To use the RCS printing utilities, enter 5 D>M on the master board for the

printing application. After you enter 5 D>M, you can use the printing words

described in the following sections and in Appendix B, "User Word Summary".

These commands enable you to print a range of blocks and to print block directories and programs. For information on configuring your printer, see Section

5.4, "Hardware Installation Procedures".

Printing a Range of Blocks

You can print a range of blocks with 10 blocks on each page by using the

CPRINT command. Enter the start block and the end block, separated by a space. Then enter the word CPRINT. For example, to print blocks 10 through

19 on one page, enter 10 19 CPRINT .

To print a range of blocks with three blocks on each page, use the same procedure, but enter the word Print instead of CPRINT. For example, to print

blocks 1 through 9 with three blocks on a page, enter 1 9 Print.

6.9 USING PRINTING UTILITIES

6-28
Printing Block Directories and Programs

The words List-directory and List-programs enable you to print the block

directories and the programs, respectively. For more detailed information on these commands, see Appendix B, "User Word Summary".

Note: When using a TeleVideo 950, prefix the printer commands with the word

Thru-tv. Using these words puts the terminal in transparent mode so that printer control codes are passed to the printer; for example for a Televideo 950, Thru-tv 10 19 CPRINT .

6.10 USING TAPE UTILITIES

To use the RCS tape utilities, enter 5 D>M on the master board for the tape

application. After you enter 5 D>M, you can use the tape words described in

the following sections and in Appendix B, "User Word Summary". These commands

enable you to back up the system on tape, solve a bad-tape problem, and read a tape.

Backing Up the System on Tape

The word BACKUP lists the backup block that contains the commands to back up

the system on tape. BACKUP uses the ADD-TO-TAPE command to write a file to

the tape. To back up the system on tape, load the backup block. You must

edit the backup block to conform to your applications.

Solving Bad-Tape Problems

If you receive a bad-tape message for an ADD-TO-TAPE command, use the command

BAD-TAPE preceded by the start and end blocks of the file to extend the file

to cover the bad section and preserve the file numbering sequence. You cannot

use this command if the bad section of tape is in the first file. In that

case, start the tape operation using a new tape.

Reading a Tape

To read a tape, use the command FROM-TAPE preceded by the start and end blocks

of the file you want to read. FROM-TAPE reads the range of blocks from the

tape, beginning from the current tape position. To use this command, you need

a listing of the BACKUP block that contains the current block numbers for the

files.

6.10 USING TAPE UTILITIES

6-29
6.11 SHUTTING DOWN THE SYSTEM

To shut down the system, follow this procedure: /C

Note: If you are using the system without running the robot, start with Step

4.

1. Move the robot to a safe place.

2. Enter HALT . The HALT command aborts communications through the robot

interface, turns off the background task on each board, and turns off the

communications process.

3. Turn off the robot.

4. If you want, save any changes you made to the code, using the MEM>DISK,

PRESERVE, and PRESERVE-FILE commands. Making and saving changes are described under Section 6.6, "Saving and Rebooting the System", earlier in

this chapter.

5. Enter WUNLOAD . The WUNLOAD command shuts down the Winchester disk.

Always enter this command before you turn off rack power to the RCS

hardware

.

6. Turn off rack power to the RCS hardware.

The shut-down procedure is now complete.

6.11 SHUTTING DOWN THE SYSTEM

6-30
Chapter 7

SMACRO

RCS contains code written in SMACRO, FORTH, and 8086 assembly language. This

chapter describes when to write code in the different languages and gives a comprehensive description of SMACRO, the primary language used in RCS. The

chapter assumes that you know the FORTH programming language.

7.1 OVERVIEW

The base operating system of RCS is polyFORTH 1 . SMACRO is an extension of

polyFORTH, containing a set of macros that enable you to write structured programming code similar to high-level languages like Pascal and C. SMACRO is a high-level assembler and, like most assemblers, it generates code that usually

executes faster and is more compact than similar code written in a high-level,

structured language.

In addition to the speed of SMACRO, SMACRO is easy to debug because of the

interactive nature of FORTH and SMACRO. You can execute a single SMACRO routine, or you can edit and recompile one routine of a larger application and

then execute the application without recompiling the rest of the code.

NBS developed SMACRO to make writing structured programming code easy. However, SMACRO may not be suited for all tasks. If SMACRO is not suited for a particular task, you can include FORTH or 8086 assembly language within a block of SMACRO code, or you can write blocks of code entirely in FORTH or assembly.

For example, if timing is important for a routine, you may need to use assembly language, to make the routine operate fast enough to execute in one control cycle. Also, because SMACRO does not support block and disk access, you

may have to write some routines in FORTH. The read routines in the TASK level

that access the system dictionary are written in FORTH.

Your NBS-supplied system tape also contains Robot Sensor Language (RSL) code.

RSL is a language for controlling robot motions; it is one specific application that runs in RCS. Chapter 9, "Robot Sensor Language (RSL)", describes

RSL in more detail.

7.2 SMACRO SYNTAX

This section describes the syntax of the SMACRO language, including programming conventions, variable declarations, members and owners, file declarations, operators, and statements. See Appendix B, "User Word Summary", for a complete list of SMACRO words.

In general, the SMACRO compiler does not detect syntax errors. Using DBG-ON

catches some errors, but not all. You should test routines to ensure that the

algorithm, as well as the syntax, is correct. To verify that each routine

runs correctly, test each routine individually.

7.2 SHACRO SYNTAX

7-1
ProgranaBing Conventions

The SMACRO code that is on the system tape follows several programming con- ventions. These conventions include:

• The vocabulary name is in the top right corner of the first line of the

block.

• A comment describing the purpose of the routine and the input and output

variables appears at the beginning of the routine.

• Routine names appear in uppercase characters.

• Variable names appear in lowercase characters.

• Code is indented two spaces.

To keep your system organized and easy to maintain, continue to follow these

conventions.

Figure 7-1 shows an example block of SMACRO code to illustrate SMACRO programming conventions:

SDEF

1 routine SMACRO-EXAMPLE

2

3

4

5

6

7

8

% Example routine to illustrate SMACRO programming conventions

% Input: variable 1, variable2, ... % Output: variableA, variableB, ...

SMACRO routine statements

end-routine

9

10

11

12

13

14

15

Figure 7-1. Example SMACRO routine.

The vocabulary identifier on the first line of a SMACRO block automatically

makes the vocabulary you specify the current vocabulary when you reload the

block. The line also displays the current vocabulary when you use the LOC

command

Percent symbols in SMACRO code indicate that the rest of the line is a comment. List the input and output variables at the beginning of each routine to

make code easier to read and debug.

7.2 SMACRO SYNTAX

7-2
The convention of using all uppercase characters for routine names and all

lowercase characters for variable names is used throughout the system, RCS

will be easier to maintain if you follow this convention when you add code to

the system.

Variable Declarations

You must declare a variable before you use it, and the variable you declare

must be in a vocabulary. RCS already contains a system vocabulary for each

board. RSL contains the vocabularies TASK, PATH, PRIM, and JOINT. Make sure you are in the correct vocabulary before you declare a variable. For information on changing vocabularies, see Section 6.2, "Moving From One Board to

Another"

Table 7-1 shows how to declare a variable for the SMACRO variable types.

Table 7-1. SMACRO Variables.

Variable Type

16-bit integer

8-bit integer byte

32-bit floating point

1 -dimensional integer array

2-dimensional integer array

1 -dimensional floating point array

2-dimensional floating point array

string

segment

sequential

SMACRO Declaration

iv [variable name]

bv [variable name]

fv [variable name]

[# elements] 1:a [variable name]

[# rows] [#coliimns] 2:a [variable name]

[# elements] 1:fa [variable name]

[# rows] [//columns] 2: fa [variable name]

[# bytes] strv [variable name]

[segment] [address] [# bytes]

segv [variable name]

seqv [variable name]

On your system tape, variables tend to be declared at the beginning of each

control level, as they are in high-level languages like Pascal. However, in

SMACRO and FORTH, this method is only a convention; you can declare variables

at any place before you use them.

Remember that all variables in RCS are global within a vocabulary. A SMACRO

variable name can be up to 31 characters long, and can contain any ASCII character, except a space. Variable names must be unique within a vocabulary.

To refer to an array element in SMACRO code, enclose the indices in braces.

For example, A1 { x } is the xth element in array A1. A2 { x y } is the element in the xth row and yth column of array A2. The indices must be integer

or sequential variables, and the first element in the array is 0.

In addition to the SMACRO variable types listed in Table 7-1, RCS uses matrix,

pose, quaternion, and vector variables to represent robot positions and movements. SMACRO represents these variables in floating point arrays.

7.2 SMACRO SYNTAX

7-3
A vector consists of three consecutive floating point values. A pose consists

of seven consecutive floating point numbers. The first four numbers represent

the quaternion (or orientation) part of the pose, and the last three numbers

represent the vector (or position) part of the pose.

A rotation matrix consists of nine consecutive floating point numbers, stored

in the order: mil, m21, m31, m12, m22, m32, m13, m23, m33. Using this order,

the matrix represents a coordinate frame with the first column representing

the X unit vector, the second column representing the y unit vector, and the

third column representing the z unit vector.

A quaternion consists of four consecutive floating point numbers. The first

number represents the scalar part of the quaternion, and the last three numbers represent the vector part of the quaternion.

Table 7-2 gives an example declaration for representing a vector, pose,

matrix, and quaternion.

Table 7-2, Matrix, Pose, Quaternion, and Vector Declarations,

Variable Type SMACRO Declaration

Vector named VI

Pose named PI

Pose named PQ

Matrix named Ml

Matrix named M2

Quaternion named Q1

3 1;:fa VI

7 1;:fa PI

H 1;:fa PQ 3 1:fa PV

9 1;:fa Ml

3 3 2:fa M2

4 1 :fa Q1

Members and Owners

Variables are always grouped as members under an owner. Members include all

SMACRO variable types. The three types of owners include: variable owners

(VAR-0), sequential variable owners (S-VAR-0), and list owners (LIST-0).

Variable owners

The following list gives the syntax, function, and members allowed for a variable owner.

Syntax: [# bytes] bytes VAR-0 [name]

Function: Enables you to group variables by allocating space in the SMACRO

segment.

Members: integer, byte, floating point, string, segment, one-dimensional

integer array, two-dimensional integer array, one-dimensional

floating point array, two-dimensional floating point array.

(

7.2 SMACRO SYNTAX

7-4
Figure 7-2 presents an example variable ovmer that contains each type of member a variable owner can have.

SDEF

1 125 bytes VAR-0 VO-EXAMPLE

2 iv 11

3 bv B1

4 fv F1

5 10 1:a IARRAY1

6 3 3 2:a IARRAY2

7 4 1:fa FARRAY1

8 2 6 2: fa FARRAY2

9 10 strv STR1

10 9000 80 4 segv SEG1

1112

13

14

15

Figure 7-2. Example variable owner.

Table 7-3 gives the action of each line in Figure 7-2. In Table 7-3, the

value in parentheses is the number of bytes allocated.

Line

Number

1

Table 7-3. The Variable Owner VO-Example.

Action

Puts the contents of this block in the SDEF vocabulary.

Allocates a 125-byte buffer, named VO-EXAMPLE, in the SMACRO

segment. Defines the variable owner, VO-EXAMPLE. The number of

bytes, 125, is the sum of the bytes required for all the members. The word "bytes" is a null word to make the source code

more readable. If the members allocate more than the specified

number of bytes, RCS issues a buffer overflow error message.

Assigns a 16-bit integer variable, II, to the VAR-0. (2 bytes)

Assigns an 8-bit integer variable, B1, to the VAR-O. (1 byte)

Assigns a 32-bit floating point variable, F1, to the VAR-0. (4

bytes)

Assigns a 10-element one-dimensional 1 6-bit integer array,

IARRAY1, to the VAR-0. (20 bytes)

7.2 SMACRO SYNTAX

7-5
Line

Number Action

6 Assigns a 3 X 3 two-dimensional 1 6-bit integer array, IARRAY2,

to the VAR-0. (18 bytes)

7 Assigns a 4-element one-dimensional 32-bit floating point array,

FARRAY1, to the VAR-0. (16 bytes)

8 Assigns a 2 x 6 two-dimensional 32-bit floating point array,

FARRAY2, to the VAR-0. (48 bytes)

9 Assigns a string with a maximum of 10 characters, STR1, to the

VAR-0. (12 bytes: 10 for the string, 1 for the maximum character count, and 1 for the actual character count)

10 Assigns a 4-byte section of common memory, SEG1, whose absolute

address is at offset 80, segment 9000. (6 bytes: 2 bytes for

length and H bytes for the 32-bit address)

Sequential variable owners

The following list gives the syntax, function, and allowable members for a sequential variable owner.

Syntax: [# members] mem S-VAR-0 [name]

Function: Enables you to group sequential variables by allocating space in

the SMACRO segment

Members: sequential variables

Figure 7-3 presents an example sequential variable owner that contains three

members:

SDEF

1 3 mem S-VAR-O SVO-EXAMPLE

2

3

4

5

6

seqv

seqv

seqv

SA

SB

SC

•

•

14

15

Figure 7-3. Example sequential variable owner.

r

(

(

7.2 SMACRO SYNTAX

7-6
Table 7-4 lists the action of each line in the preceding figure:

Line

Number

1

Table 7-4. The Sequential Variable Owner SVO-Example.

Action

Puts the contents of this block in the SDEF vocabulary.

Creates a 6-byte buffer, named SVO-EXAMPLE, in the SMACRO segment. The buffer contains consecutive integers starting at 0.

The word "mem" is a null word to make the source code more readable. The maximum number of members is 3.

Assigns the variable SA with a value of to the S-VAR-0.

Assigns the variable SB with a value of 1 to the S-VAR-0.

Assigns the variable SC with a value of 2 to the S-VAR-0.

List owners

The following list gives the syntax, function, and allowable members for a list owner.

Syntax: LIST-0 [name]

Function: Enables you to group any type of member together for display

Members: Any type of variable

Figure 7-4 presents an example list owner that contains an integer and two

owners .

SDEF

1 LIST-0 LO-EXAMPLE

2 m A

3 m IARRAY1

4 m SA

5

6

•

•

• 14

15

Figure 7-4. Example list owner,

7.2 SMACRO SYNTAX

7-7
Table 7-5 lists the action of each line in the preceding block.

Table 7-5. The List Owner LO-EXAMPLE.

Line

Number Action

Puts the contents of this block in the SDEF vocabulary.

Groups the members under the owner LO-EXAMPLE.

Assigns an integer variable A to the LIST-0.

Assigns an integer array, IARRAY1, to the LIST-0.

Assigns a sequential variable, SA, to the LIST-0.

Note: You must define all list owner members before you add them to the list

owner. The numbers must be in the same vocabulary as the owner.

For a complete list of the RCS words for members and owners, see Appendix B,

"User Word Summary".

File Declaration

Use the SMACRO word FILE to declare SMACRO files. This declaration creates a SMACRO file, using the most recently declared variable owner as the template.

(Include the file declaration in the source block that declares the variable

owner .

)

RCS stores SMACRO files in common memory, providing the primary method of com- munication between control levels. SMACRO files consist of a linked list of

records. Record numbers identify individual records in a file. The record

number is the address of the record in the file segment of common memory.

Header variables contain information about the file, such as the number of

records available, the address of the first record, and the record size. The

header variables are stored in common memory with the file and retrieved to

local variables when you open the file.

t

SMACRO Operators for Standard Prograanning Operations

The SMACRO operators that enable you to perform most standard programming

operations are:

• Arithmetic

• Assignment

• Relational

• File

In SMACRO, you perform operations using infix notation as in mathematics.

Different operators are available for different types of variables. The operator types include: integer, byte, floating point, string, pose, matrix, quaternion, and vector. C

7.2 SMACRO SYNTAX

7-8
In general, SMACRO encloses most integer operators in parentheses, precedes

most byte operators with a capital B, and encloses most floating point

operators in periods. Operands must be of the same type as the operator.

Conversion operators convert integers to floating point numbers and floating

point numbers to integers.

Arithmetic operators

SMACRO includes arithmetic operators for adding, subtracting, multiplying, and

dividing integers, bytes, and floating point numbers. Table 7-6 lists these

operators.

Table 7-6. SMACRO Arithmetic Operators.

Integer Operators Byte Operators Floating Point Operators

(+) B+ .+. (-) B-

(«) B» .». (/) B/ ./.

Integer operations produce integer results. When you use integer division,

remember that SMACRO truncates the fractional part of the result. For example, if you enter 5 (/) 3> the result is 1. SMACRO operations proceed from

left to right; there is no precedence for integer and byte expressions.

You can use parentheses enclosed in periods to enforce precedence, but only

for floating point numbers. You can nest scalar operations up to eight levels. You can nest vector operations only one level, and pose and quaternion

operations to any level.

Here are some example SMACRO arithmetic operations and the results:

Statement Result

II (•) 12 Multiplies the integer variables II and 12.

B1 B+ B2 Adds the byte variables B1 and B2.

F1 .-. F2 Subtracts the floating point value of F2

from the floating point value of F1.

II (+) 12 (*) 13 Adds integers II and 12 and multiplies the

result by integer 13.

F1 .+. .( F2 .». F3 ). Multiplies the floating point numbers F2

and F3, and then adds the result to the

floating point value in F1.

7.2 SMACRO SYNTAX

7-9
Be careful not to mix variable types in arithmetic operations. You may not

get an error message, but you might get incorrect results. SMACRO does not

allow literals in statements. To include constants in a statement, declare a variable with an appropriate name and initialize it.

Assignment operators

SMACRO includes assignment operators for integer, byte, floating point,

string, pose, quaternion, matrix, and vector variables.

An assignment operator stores the variable or expression on the left side of

the operator in the variable location specified on the right side. The arrow

indicates the direction of the assignment. (Most high-level languages use the

opposite direction.) Table 7-Y lists the assignment operators.

Table 7-7. SMACRO Assignment Operators,

Operator Type

=> Integer

B=> Byte

.=>. Floating Point

S=> String

.P=>. Pose

.Q=>. Quaternion

.M=>

.

Matrix

.V=>. Vector

Here are some example assignment operators:

II (+) 12 => II

A2 { X y } => II

B1 B» B2 B=> B3

Assigns the sum of integer variables II and 12

to the integer variable II.

Stores the element in row x, column y, of the

integer array A2, to the integer variable II.

Assigns the product of byte variables B1 and

B2 to the byte variable B3.

Relational operators

Relational operators enable you to compare variables of the same type. You

can use relational operators only in the conditional statements "if then else

endif", "while do end-do", and "repeat until end-repeat". You cannot use relational operators in assignment statements. Table 7-8 lists the SMACRO

relational operators.

C

7.2 SKACRO SYNTAX

7-10
^

Table 7-8. SMACRO Relational Operators.

Integer Operators Byte Operators Floating Point Operators

(EQ) EQ B .EQ. .EQZ.

(NE) NE B .NE. .NEZ.

(LT) LT B .LT. .LTZ.

(LE) LE B .LE. .LEZ.

(GT) GT B .GT. .GTZ.

(GE) GE B .GE. .GEZ.

These operators perform the comparisons equal to, not equal to, less than,

less than or equal to, greater than, and greater than or equal to, respectively. The second column of floating point operators compares floating point

expressions to 0. The floating point expression goes before the operator.

Relational operators produce Boolean results of true or false. For example:

II (EQ) 12 results in the Boolean value of true if

integer II is equal to integer 12.

F1 .GEZ. results in the Boolean value of true if the

floating point variable F1 is greater than

or equal to 0.

You can also use arithmetic expressions on the left side of a relational test.

For example:

II (+) 12 (/) 13 (EQ) IH results in a Boolean value of true

if the result of the integer expression

II (+) 12 (/) 13 equals integer I4.

SMACRO also includes a string comparison operator, S-EQ, which compares two

strings of equal length using the ASCII character values.

The SMACRO logical (AND) enables you to compare two Boolean expressions. The

result is true only if both expressions are true.

File operators

File operators enable you to perform operations such as storing data from the

local template to a record, retrieving the current record from the current

file, and returning the current list to the free list. Appendix B, "User Word

Summary", contains a list of the operators for manipulating files.

SMACRO also includes four Boolean file operators: matches, matches-r,

matches-fields, and matches-fields-r. Use these Boolean file operators to

search for a variable in the file and, if desired, to retrieve the local template of the first record that matches the variable.

7.2 SMACRO SYNTAX

7-11
In other systems, files reside on the disk, and you must open and close them.

You can open only one file at a time, and you can only read or write to that

file. Closing the file enables other processes to access it.

y In SMACRO, files reside in common memory, and you must open but you do not

need to close them. To open a file, you execute its name. You can open a file from any number of boards; no inherent protection mechanism exists. You

must ensure that two boards do not try to access the same file simultaneously.

This structure increases the access speed of the files. Potential read/write

conflicts between files arise rarely, so RSL handles these conflicts as a special case using round-robins.

The control levels of RCS communicate through SMACRO files in common memory.

The file structure consists of linked lists of records. For each file

declaration, SMACRO sets up a file using the most recently declared variable

owner as the template. The members of the variable owner define the fields

for the records in the linked list. The file declaration also adds two fields

to each record: a link field that points to the next record in the linked

list, and a source block field that points to the source block that contains

the data in the record.

The following SMACRO code declares a file named DATA-FILE:

16 bytes VAR-0 file-rec

15 strv " field 1"

iv field2

5 rec FILE DATA-FILE

The first three lines of the example define a variable owner named file-rec

that serves as the local template for DATA-FILE. The last line of the example

allocates space in common memory for a file named DATA-FILE with five records.

The file declaration fills the file with a list of empty records called the

free list. The linked list for the file is terminated by a record whose link

field contains 0.

C

(

7.2 SMACRO SYNTAX

7-12
Figure 7-5 shows a representation of the file as initialized by re-init-file,

Local Template:

str "field 1" iv field 2

Avail

Record

Linic source- ^<^5^J^< Source- ;-^i,-{<?f5^- SowrceBlock

Field 1

Field 2

fVtfVtntfTfrr#Vfffn

llii:;:;:;!!;:!?!!! Fieia 2

AAMariAiAMAMMAMi

neiii 1

r*f4v#fT#vvtwta*%T rield 1

rieid 2

Yrr^mYil «^"^ ilSiii:^ Block ££ja2i^

lllltlltl< Hl HH

rielil I

Field 2

l<ll< H lllllltl<ll

lM***A*M*MiMM

Field 1

TielC 2

i>ii>i« n l nH i>ii

First - Record —^ NUL Free List

Figure 7-5. An example SMACRO file in common memory.

You create the file represented in Figure 7-5 by loading the block that contains the file declaration and initializing the file with the work re-initfile. RCS maintains the free list. When you add a record to a list, the

record comes from the free list. When you remove a record from a list, the

record returns to the free list.

You open a file by executing the file name. When you execute the file name,

RCS retrieves header variables that contain information about the file from

common memory to local variables.

Figure 7-6 shows the file after a record is added. Assume that the local template variables contain the data shown in the figure. To use DATA-FILE, you

execute DATA-FILE to open the file, and then execute add-record to store the

data in the local template to a record, remove the record from the free list,

and add the record to the end of the current list. After add-record executes,

DATA-FILE looks like Figure 7-6.

7.2 SMACRO SYNTAX

7-13
Local Template:

POSE

AvailRecord

Link

SourceBlock

Field 1

Field 2

ink^Hl^H Link^HJ^H Link^Hi^H i-ink^HO^H

se- ^l^ppppp Source- ^lipppl^li Source- >Pl>PP1>P Source- l-ppppPP

. '\^ti^i^:i^%^i>i i^i^v^i^i^i^i i^i^i^i^i^^^i •.^•.^^i^i^^i^v^'. •"•f iiiiiiiiiiiiS ei»«fc iiiiiiiiSS^ Block i%?igfs^%?N? Block ^s^sii^s^N^N^ Jtdldldtd»dtd itdtdtdtdtdtd indtdt^tdmtti **dtdtdmttdU

Field 2

SourceBlock

Field 1

Field 2

t?<><?A?>>;?;l Source- ;^;>;V;^A^;>; Block ----

Field 1

Field 2 )

Free

List

FirstRecord

SourceBlock Current

List

Figure 7-6. SMACRO file after the execution of add-record.

Additional aiACRO Operators

SMACRO includes additional operators that enable you to perform the following

types of operations:

• Bit

• I/O

• Stack

• Matrix

• Pose

• Quaternion

• Vector

• Others

The bit, I/O, and stack operators enable you to perform operations similar to

those in assembly language. The matrix, pose, quaternion, and vector operators make representing robot positions and movements easier. For the exact

syntax of these operators, see Appendix B, "User Word Summary".

7.2 SMACRO SYNTAX

7-14
Bit operators

Several operators perform bit-wise operations. The operator "EQ'' performs a bit-wise logical AND of two integer variables, compares the result with the

second variable, and returns true if the variables are equal. The operators

set-bit-in and zero-bit-in enable you to define a bit mask to set specific

bits in a word.

Use the bit operators 1-? and 0-? in conditionals. The operator 1-? performs

a bit-wise logical AND of two integer variables and returns a true value if

the result is not 0. The operator 0-? takes the complement on the first integer variable and then performs a bit-wise logical AND with the second integer

variable. The operator returns a true value if the result is not 0.

I/O operators

SMACRO includes the in-port and out-port I/O operators. The in-port operator

enables you to read a value from the port you specify. The out-port operator

enables you to send an integer expression to the port you specify. Use these

operators when you want to communicate with sensors in the system.

Stack operators

Stack operators enable you to transfer values to and from the 8086 processor

stack. Table 7-9 lists the integer and byte stack operators. (You also can access an internal 808? stack through assembler code.)

Table 7-9. SMACRO Stack Operators.

Integer Operators Byte Operators

to-stack B-to-stack

from-stack

The to-stack operator stores a variable or the result of a calculation onto

the stack. For example:

II (+) 12 to-stack Moves the sum of integers II and 12 to the

stack.

A2 { X y } to-stack Moves the element in row x, column y, of

integer array A2, to the stack.

B1 B+ B2 B-to-stack Moves the sum of byte variables B1 and B2 to

the stack.

7.2 SMACRO SYNTAX

7-15
The from-stack operator takes values from the processor stack. You can assign

the values to variables or use the values in calculations. The from-stack

operator must appear on the left side of an assignment. For example: f

from-stack => II moves the integer value from the processor

stack and stores it in the variable II.

Matrix, pose, quaternion, and vector operators

RCS uses matrices, poses, quaternions, and vectors, stored as floating point

arrays, to represent robot positions and movements. Most other robot applications use 4x4 homogeneous matrices to represent robot movements. RCS uses quaternions, which are more efficient. SMACRO includes operators to make vectors, matrices, and quaternions easier to use.

For more information on how to use quaternions in robotics, refer to Robot

Motion: Planning and Control , part of the MIT Press series in artificial

intelligence. You will find specific information for quaternions on pages

240 to 265.

Note: All quaternions in RCS are rotation quaternions with a magnitude of 1 and a non-negative scalar element. When performing quaternion operations, RCS uses the 8086 stack for temporary storage because these

operations require the use of all 8087 registers.

Therefore, you can nest quaternion operations to a depth limited only by the

size of the 8086 stack. However, because RCS stores all vectors in the 8087

registers, a sequence such as vexp .V+. .( qexp .Q*V. vexp ). overflows. On

the other hand, a sequence such as qexp .Q*V. vexp .V+. vexp does not

overflow.

The SMACRO matrix operator words operate on 3 x 3 rotation matrices only.

A pose consists of a quaternion part and a vector part. The quaternion part

is a rotation quaternion. The 8086 stack is used for temporary storage of

poses, so you can nest pose expressions to any depth for which there is enough

space on the stack.

Other SMACRO operators

SMACRO includes many additional operators that perform operations such as calculating trigonometric functions, performing indirect addressing, converting

an integer to a floating point number or a floating point number to an integer, reading and writing strings from the current input stream, and indexing

arrays. You can also use FORTH operators. The SMACRO word ~F calls a FORTH

word. For a complete list of SMACRO operators, see Appendix B, "User Word

Summary"

7.2 SMACRO SYNTAX

7-16
1

SK&CRO Statanents

SMACRO includes the structured programming statements if, while, repeat, and

case. SMACRO also includes an enhanced version of the case statement called a state-table. Using the state-table statement, you can test the state of up to seven variables. If all the variables are equal to the corresponding test

variables, then the statement executes the code following that state line.

Table 7-10 presents the syntax for each of the SMACRO statements,

statements are in Appendix B.

Additional

Statement

Name

if

while

repeat

case

Table 7-10. Syntax for SMACRO Statements.

Syntax

if [Boolean exp] then [code] else [code] endif

while [Boolean exp] do [code] end-do

repeat [code] until [Boolean exp] end-repeat

case [ivarl]

case: [ivar2] [code]

state-table

default: [code]

end-case

state-table [state-varl] [state-var2]

state: [test-varl] [test-var2] . [test-var8] [test-var9] ..

. [state-var7]

[test-var7] [routineA]

[test-varl4] [routineB]

default-state: [default-routine]

end-state-table

7.2 SMACRO SYNTAX

7-17
7.3 SMACRO RODTINES

All SMACRO routines start with the word routine and end with the word

end-routine. Figure 7-7 presents an example SMACRO routine: f

BLOCK 8106

$DEF

1 routine POSE-^ ( - pose name - ) 2 % find record# of named pose

3 % output: record# (0 if not found)

H POSE-FILE WREAD S=> "pose-name"

5 first-record => record//

6 if "pose-name" matches "pose-name"

7 then endif

8 end-routine

9

10

11

12

13

14

15

Figure 7-7. Example SMACRO routine.

In SMACRO, routines can be longer than one block. To make a routine longer

than one block, put the additional code that does not fit in the first block

into the next block. Use the screen editor described in Section 6.7, "Editing

a Block of Code", to move existing code to another block. Do not put a vocabulary name in the continuation block.

7.4 MODES

SMACRO words function differently depending on the current mode of RCS. The

three RCS modes are Run, Show, and Locate. To set or change the mode, enter

;R , :S , or tL (or, j_r, ^s.* or* :1) , respectively. To change modes and

re-execute the most recent word in the new mode, enter ^, ^, or \L_ (or \r , \s , or \1) . To display the most recent word, enter

^

(or \n)

A fourth mode called compile mode, indicated by :C, is used exclusively by the

SMACRO compiler. You see the :C prompt only when an error occurs while a routine is compiling. Change to one of the other modes to continue.

In Locate mode, entering a SMACRO word lists the source block for that word.

In Run and Show modes, the results of a SMACRO word depend on the type of the

SMACRO word. Table 7-11 lists the results of using SMACRO words in Run and

Show modes.

t

t

7.4 MODES

7-18
Table 7-11. SMACRO Words in Run and Show Modes.

SMACRO Word Type

VAR-0, S-VAR-0

LIST-0

iv, bv, fv, 1:a, 1:fa,

strv, seqv

2:a, 2:fa

segv

routine

FILE

In Run mode

Returns the address of

the first member on the

stack.

Displays all members.

Returns the address of

the variable to the stack.

Returns the address of

the variable to the stack.

Returns the segment and

address of the variable to

the stack, leaving the

address on the top of the

stack.

Executes the routine.

Makes the file current.

In Show mode

Displays all members.

Displays all members.

Displays the variable

name and value.

Displays the variable

name and values, one row per line.

Displays the name and

contents of the data

area of the variable,

as unsigned 8-bit

integers, in hex.

Executes the routine.

Makes the file

current.

7.5 BOARD LEVEL PROCESSES

RCS executes tasks in the foreground and the background. You run a task in

the foreground when you execute a task at the terminal, and when you singlestep each control level. You cannot access the terminal or perform any terminal operations from a routine running in the background task.

RSL has one background task per board that runs the control task, named

BACK-TASK, for that board. You execute the background task by entering the

word BGO. For examples of background tasks and broad level processes, see the

RSL application (blocks 8020 through 80M9).

7.6 INTERRUPTS AND ASSEMBLY LANGUAGE

You can write interrupt routines by beginning the routine with the word

enter-interrupt and ending the routine with the word exit-interrupt. The word

"INTERRUPT sets the specified interrupt vector to point to your interrupt

routine.

7.6 INTERRUPTS AND ASSEMBLY LANGUAGE

7-19
Figure 7-8 shows how to set up an interrupt routine.

SDEF

1 routine INTERRUPT-SERVICE

2 %

3 %

4 enter-interrupt

5

6 (interrupt routine code)

7

8 exit-interrupt

9

10 end-routine

1112

13

14

15 8 -INTERRUPT INTERRUPT-SERVICE

Figure 7-8. Setting up an interrupt routine,

To enable the interrupt, you have to install the appropriate jumpers and clear

the interrupt mask in the Programmable Interrupt Controller. Refer to the

manual and schematics that come with the board for details. Also be careful

not to disturb any of the interrupts currently implemented in the system. See

Appendix C, "System Maps", for a list of the interrupts.

If you need to use assembly language code to write an interrupt routine or another routine, refer to the FORTH documentation for 8086 assembler, and

Appendix E, "8087 Operation Codes For RCS", for 8087 assembler.

«

7.6 INTERRUPTS AND ASSEMBLY LANGUAGE

7-20
Chapter 8

COMMUNICATIONS

In addition to data, RCS can pass command and status information between control levels. Normal data consists of information such as robot poses, task

descriptions, and relative moves. Command and status information consists of

the control-level inputs and outputs that control task decomposition.

This chapter briefly explains that memory-resident files provide the m.ediura

for data transfer and then describes the communications process provided by

NFS to transfer command and status information between control levels. Following a description of how the communications process works, this chapter

explains how to program the communications process to transfer command and

status information between control levels on different boards and between

control levels on the same board.

8.1 USING MEMORY FILES TO PASS DATA

The different control levels within the system use common memory to pass data

in the form of files. The control levels must implement the protocol to

resolve file read/write conflicts. RSL uses round-robins to resolve these

conflicts.

8.2 USING COMM TO PASS COMMAND AND STATUS INFORMATION

COMM is an RCS utility that provides a communications process for passing com- mand and status information between control levels. Each control level can have an input status buffer, an input command buffer, an output status buffer,

and an output command buffer. The output command buffer and the input status

buffer of a control level communicate with the level below. The input command

buffer and the output status buffer communicate with the level above. (See

Figure 8-1.)

8.2 USING COMM TO PASS COMMAND AND STATUS INFORMATION

8-1
Higher Control Level

Output

Command Buffer

Input

Status Buffer

Buffer

Ready

Flag

Buffer in

Common Memory

Buffer in

Common Memory

COMMUNICATION

PROCESS

Input

Command Buffer

Output

Status Buffer

RCS Control Level

Output

Command Buffer

Input

Status Buffer

Buffer in

Common Memory

^

Buffer

Ready

Flag

Buffer in

Common Memory

input

Command Buffer

Output

Status Buffer

Lower

Buffer

Ready

Flag

C

Figure 8-1. Command and status communication paths.

The communications process passes command and status information by moving the

contents of the output buffer on one level to the corresponding input buffer

on another level. This process operates in cycles to synchronize the flow of

command and status information. Communication buffers in common memory enable

the communications process to proceed in an asynchronous fashion. That is,

these buffers can temporarily store command and status information until the

control level is ready to accept It.

The period of the communications cycle is user-defined using a SMACRO variable

called control-cyc] e-#-clks. COMH uses timer to generate the communications

cycle period. You can also synchronize the communications cycle to the

operations of the robot.

C

8.2 USING COMM TO PASS COMMAND AND STATUS INFORMATION
A combination of ready flags on each level and a communications bit on the

bus provide a means of resolving read/write conflicts. See Section 5.4,

"Hardware Installation Procedures", for information on how to use one of the

MULTIBUS interrupt lines as the communications bit.

No other process can execute while the communications bit is set and the com- munications process is moving the contents of the communication buffers

between control levels. At the beginning of each cycle, the communications

process resets the communications bit. Each level waits for this bit to be

reset before starting execution.

While each level is executing, it sets the variable buffer-ready-f to

not-ready to indicate that its buffers are not ready. When the level finishes

executing, it waits for the system to reset the communications bit (which nor- mally occurs immediately). Then the level sets buffer-ready-f to ready to

indicate that the buffer is ready.

At the end of each cycle, the communications process sets the communications

bit and moves all ready output buffers to an intermediate buffer in common

memory. It then moves all data from the Intermediate buffer to the corresponding input buffer, assuming the input buffer is ready. This protocol

allows levels to overrun the cycle time without affecting communications.

The communications period during which no other process may execute Is called

communications dead time. To minimize this dead time, you must restrict

buffers to the smallest possible size.

For example, to minimize the communications dead time, RSL communicates pose

information between levels by passing pointers into a round-robin group of

poses. This technique reduces the required buffer size (and speeds communication) because the levels communicate only the name of each pose rather than

the Information to describe a pose completely.

8.3 PROGRAMMING COMM

The program for the communications process consists of a table of buffer moves

called a communications table. You must first enter the ERASE-COMM-TABLE

statement and then repeat the following two statements for each Internal

buffer move desired:

TRANSFER-FROM [vocabulary] [output buffer]

TO-DESTINATION [vocabulary] [input buffer]

The ERASE-COMM-TABLE statement clears the contents of the communications

tables on all the boards in the system. The TRANSFER-FROM statement selects

the output buffer from which to send command and status Information. The

TO-DESTINATION statement selects the corresponding input buffer that Is to

receive the command and status information.

Each vocabulary specified with TRANSFER-FROM or TO-DESTINATION must include a semaphore variable named buffer-ready-f, which COMM uses to synchronize com- munications. Thus, each vocabulary actually has its own buffer-ready-f rather

than a flag for each buffer. The communications process determines the

8.3 PROGRAMMING COMM

8-3
address of this variable when it compiles the communications table. If you

compile the communications table and this variable is missing, RCS returns the

"no buffer-ready-f" message.

B,l\ COMMUNICATING ON THE SAME BOARD

Two processes running on the same processor board do not need the communications process to resolve read/write conflicts. Processes running on the same processor board can use the S=> SMACRO operator.

For example, in RSL you can use the following two statements to move the con- tents of TASK'S output command buffer to PATH'S input-status-buffer:

TASK path-command-var PATH S=> input-command-var

PATH output-status-var TASK S=> path-status-var

8.^ COMMUNICATING ON THE SAME BOARD

8-H
Chapter 9

ROBOT SENSOR LANGUAGE (RSL)

This chapter describes the Robot Sensor Language (RSL), an example of a realtime application that NBS developed within the RCS environment. RSL is a high-level, task description language designed for programming robotic tasks,

in which the control system, RCS, uses sensors to control the robot. This

chapter defines RSL, describes RSL syntax, and gives procedures for entering,

editing, and executing RSL code.

9.1 WHAT IS RSL?

RSL is a data-driven, semi-interpreted, user-extensible language that supports

user-designed sensors, hierarchical task decomposition, and real-time execution. RSL is extensible; you can add a new sensor to a robot, and then extend

RSL, enabling you to program robot tasks that use the new sensor.

RSL consists of two main programming structures: data and algorithms. Data

is information about the robot environment such as the name, size, or location

of an object. Robot sensors supply data to RSL, or you may enter the data

directly from the keyboard.

An algorithm is the RSL code you use to accomplish a task. RSL compiles algorithms into a linked-list representation. Then the RSL control levels interpret the algorithm, using environmental data to command the robot to execute a task.

RSL decomposes tasks hierarchically, from the top down, using the RCS methods

of cyclic execution, task decomposition, and control levels described in Chapter 2, "RCS Overview", and Chapter 3} "RCS Architecture". The four RSLspecific control levels are: TASK, PATH, PRIM, and JOINT, as shown in Figure

9-1.

9.1 WHAT IS RSL?

9-1
Figure 9-1. RSL control levels.

The code in these control levels defines the types of tasks that you can accomplish with RSL. You define tasks by writing algorithms, which define how

to accomplish the task. The algorithms include operations such as transferring parts from a tray to a buffer or loading tools into a machining center.

These algorithms become the input for the RSL control levels.

The TASK level decomposes all tasks into a sequence of path types. The path

type and parameters of the current task identify the specific path to execute.

RSL defines the path types: move-to, approach-pickup, depart-pickup,

approach-release, and depart-release. You can define additional path types as you need them. A path algorithm specifies a simple path such as moving

between locations or grasping objects. The specific path becomes the input

for the PATH level.

9.1 WHAT IS RSL?

9-2
The PATH level decomposes paths into a sequence of path-points. Each pathpoint consists of a single motion or sensor command. A path-point command

performs operations, such as initiating a motion that a sensor condition

terminates. You must define additional commands for each type of motion and

sensor combination you need. The PATH level further decomposes the pathpoints into a sequence of trajectories, which become the input for the PRIM

level.

The PRIM level decomposes trajectories into a sequence of intermediate points.

A trajectory consists of a goal point and parameters describing the path to

the goal point. RSL defines the straight-line Cartesian trajectory types and

the joint-interpolated trajectory type. The intermediate points become the

input for the JOINT level.

The JOINT level transforms intermediate points from Cartesian space to joint

space. The joint values are sent to the servo controls in the manufacturer's

robot controller.

Note: Keep in mind the different kinds of code in RSL. RSL contains data,

such as the name of an object; algorithms, consisting of paths, pathpoints and trajectories, such as the RSL steps to accomplish a transfer

task; and SMACRO code that defines the control levels.

9.2 RSL OVERVIEW

This section describes the syntax of RSL statements. See Appendix B, "User

Word Summary", for the exact syntax of each RSL statement. The section also

includes some example RSL code.

The Pose Statement

The pose statement, -pose-, defines a position, or the physical location, of

the robot. A pose consists of a translation, represented by a vector, and a rotation, represented by a quaternion. The translation and rotation give the

tool frame relative to the base frame of the robot.

With a six-axis robot, you may need to use up to three robot arm configuration

flags to resolve the ambiguities of the inverse transform operation that

transforms a pose into joint angles. These flags depend on the robot you use

and the interface between RCS and the manufacturer's robot controller.

You may enter poses directly from the keyboard; or you may position the robot

with a joystick or sensor-based algorithm and then record the pose. For

information on how to enter a pose, see Section 9.3» "Entering and Editing RSL

Source Code", later in this chapter.

9.2 RSL OVERVIEW

9-3
The Movetable Statements

A movetable defines relative positions, using a combination of rotations and

translations. That is, a movetable defines a coordinate transform. Adding a movetable to an existing pose produces a new location.

For example, if you define a pose at one corner of a table, you can define the

other three corners of the table using movetables. If you want to reposition

the table, you have to update only one pose—the movetables do the rest.

Defining a movetable requires several RSL statements such as -mtb-, , and

-mtb-end-. Each transform line, , specifies either a vector translation or

a rotation. You can also define a movetable that is the exact inverse of

another movetable using the -imtb- statement.

The Location Statement

The location statement, -loc-, defines a location as the combination of a pose

and a movetable. Locations may be goal points, or the origin of a coordinate

frame in which to define motions. RSL adds the movetable and the pose just

before the control system needs the result, enabling you to modify the data

structures in real time. You can fine-tune a recorded pose by defining a movetable without using the robot. Also, you can define several related

locations in terms of the same pose, so that RSL redefines the locations when

it redefines the pose.

The Array Statement

Arrays may be one-, two-, or three-dimensional. The statement -arr- defines

an array. The origin of an array is a location. A movetable specifies the

displacement from one sector to the next sector along each dimension of the

array. A sector is an element of an array. Use arrays to make palletizing

operations easier.

The Object Statement

The object statement, -obj-, defines an object that consists of the object

name and a list of grip numbers and movetables. The grip numbers define

different orientations for gripping the object. RSL finds the grip orientation by adding the movetable to the object frame. Note that you may never

refer to an object without a grip number.

The Path Statements

A path is an algorithm for performing simple tasks such as moving between

locations or grasping an object. The path algorithm may be a simple path in

space that guarantees no collisions, or the path may be more complex, requiring sensor input to help locate an object. Paths consist of a sequence of

steps called path-points.

9.2 RSL OVERVIEW

9-4

C
The path statement syntax has two parts: the path statement and a sequence of

path-point lines. The statement -path- defines the type and goal of the path;

the -ppt- lines give the sequence of steps in the algorithm.

The path type identifies the intended purpose of the path. RSL provides five

path types: move-to, approach-pickup, depart-pickup, approach-release, and

depart-release. You may define other path types, using these types as models.

The rest of this section describes each of these five types of paths:

• The move-to path specifies how to move the robot quickly while it is carrying an object from near the starting location to near the destination location. The approach and depart paths handle slower movement closer to the

starting and destination locations.

• The approach-pickup path specifies how to move the robot, with an empty end

effector, toward an object at the goal location. The approach-pickup path

starts from a safe location near the goal and stops at the goal location.

• The depart-pickup path specifies how to move the robot to pick up an object

at a goal location. The depart-pickup path starts at the goal location and

stops at a safe nearby location while the robot grasps the object.

• The approach-release path specifies how to move the robot while it is

grasping an object. The approach-release path starts at a safe location

near the goal and stops at the goal location.

• The depart-release path specifies how to move the robot at a goal location

to release an object. The depart-release path starts at the goal location

and stops at a safe nearby location, leaving the object at the goal

location.

The Path-Point Statement

Each path-point consists of a single command. Typically, the commands initiate a motion, which a sensor condition terminates. The structure of the pathpoints depends heavily on the specific sensors and applications you are using.

In general, path-points consist of a command phrase, a location phrase, and a trajectory phrase, although you may define other structures.

The command phrase gives the motion type, and specifies the sensor condition

that terminates the motion. The location phrase specifies a location that RSL

uses in one of two ways: as an intermediate goal point, or as a coordinate

frame with translation along or rotation about an axis. The trajectory phrase

specifies the trajectory type (Cartesian straight-line or joint interpolated)

and the parameters (acceleration, maximum velocity, and neighborhood) RSL uses during execution of the path-point.

RSL provides only the goto path-point. The goto path-point specifies a motion

of the robot to be a goal location using either straight-line Cartesian or joint-interpolated trajectories. You can add other path-points.

9.2 RSL OVERVIEW

9-5
The Round-Robin Statement

The round-robin statement defines a round-robin or a circular list in a file.

RSL uses round-robins to pass information between control levels. When one control level writes a record to the next lower control level, the lower level

reads the record previously written. For a more detailed explanation of

round-robins, see Section 10.2, "RSL Data Structures" in Chapter 10.

Example RSL Code

This section gives some simple examples of RSL code, and explains what each

example does.

-pose -- TABLE 0.04361 0.999 0.0005033 0.00166

-39.83 -8.702 0.0216

1.0 1.0 -1.0

This code defines a pose named TABLE. The first four numbers give the orientation expressed as a quaternion. The next three give the position expressed

as a Cartesian vector. The last three give the arm configuration. (For a PUMA 760, the arm configuration is lefty, elbow up, wrist flipped.) This pose

defines the position and orientation of a table.

-mtb- CORNER

t-tool 20.0 0.0 0.0

-mtb-end-

-mtb- TABLE-SAFE

t-tool 10.0 15.0 10.0

r-tool Z 20.0

-mtb-end-

-mtb- UP5

t-tool 0.0 0.0 5.0

-mtb-endThis code defines three movetables, intended for use with the TABLE pose. The

first movetable defines a corner of the table. The TABLE pose is at one corner of the table, with the x axis along one edge, the y axis along the

other edge, and z up. CORNER is 20 inches away along the x axis. TABLE-SAFE

is a point above the center of the table that is a pass-through point for

motions to and from the table. The point is rotated 20 degrees about the z axis. UP5 is a point 5 inches up along the z axis. It defines an intermediate point for moving to points on the table.

(

9.2 RSL OVERVIEW

9-6
-loc- TABLE TABLE nul

-loc- CORNER TABLE CORNER

-loc- TABLE-SAFE TABLE TABLE-SAFE

This code defines locations. Locations are always the sum of a pose and a movetable. They are used in paths and path-points (poses cannot be used

directly). These four locations associate the movetables defined above with

the TABLE pose, indicating the appropriate positions and orientations for the

table.

-path- approach-pickup nul loc CORNER

-ppt- goto loc TABLE_SAFE joint 10.0 ^^0.0 20.0

-ppt- goto goal UP5 cart 0.03 0.03 1.0

0.25 1.5 6.0

-ppt- goto goal nul cart 0.03 0.10 0.0

0.25 0.5 0.0

This code defines a path used for moving to the corner of the table. The

first path-point moves towards the location TABLE-SAFE (above the middle of

the table). The trajectory is joint-interpolated, with acceleration limited

to 10 percent of maximum and velocity limited to 40 percent of maximum. When

all joints are within 20 degrees of the TABLE-SAFE location, the system steps

to the next path-point.

The second path-point goes towards the intermediate goal defined by the location CORNER, plus the movetable UP5. Thus, the intermediate goal is TABLE + CORNER + UP5, or 5 inches above the corner of the table. The motion is a Cartesian straight line. For information on the velocity and acceleration parameters, see Appendix B, "User Word Summary". The second path-point is complete

when the tool-point is within 1.0 inch and 6.0 degrees of the intermediate

goal. The last path-point moves to the goal TABLE + CORNER and stops there.

9.3 ENTERING AND EDITING RSL SOURCE CODE

When you build a new application or change the data for an existing application, you need to enter or edit RSL source code. To enter new source code,

type the data into a block using the RCS screen editor, described in Section

6.7» "Editing a Block of Code". Also use the screen editor to edit existing

source code.

You can enter new robot poses by using the joystick to position the robot.

Then enter RECORD-POSE [ pose-name

]

. RECORD-POSE stores the current robot

position in the pose with the specified pose-name. RECORD-POSE creates a new

pose record if the pose-name is not already defined.

You can also enter the pose directly into a block by specifying the block number, the line number, and the name of the pose. For example, to enter SECTOR

into block 23, line 5, enter 23 5 TYPE-POSE SECTOR . TYPE-POSE enters the pose

into the block beginning at the line specified.

9.3 ENTERING AND EDITING RSL SOURCE CODE

9-7
9.4 COHPILING RSL SOURCE CODE

Like SMACRO code, you compile RSL code by loading the blocks containing the / source code. The compiling words in RSL compile the code into a linked list " representation in common memory files. Like SMACRO code, you can recompile

all RSL code; you may edit and recompile any piece of code, and any other code

that uses it will use the new version.

Unlike SMACRO, RSL has garbage collection; a path may be recompiled several

times without wasting any space in the files. Other named data structures

have no garbage collection; you cannot remove a pose, for example. Thus, you

may run out of space if you keep defining more and more data structures such

as poses and locations. To avoid running out of space, restore the system to a clean state and recompile all the RSL source code.

Recompiling code is easier with RSL than with SMACRO; to restore the system to

a clean state, you simply reinitialize all the files using ~re-init-file

(rather than using D>M and RESTORE on several boards). Block 990 on RSL is

set up to do this restoration, as well as reload the RSL code. (You must edit

block 994 and your directory blocks to be sure all of your code is loaded.)

Note that the control system must not be running the robot when the RSL code

is completely reloaded; 990 executes HALT to guarantee that the robot is not

running. Small pieces of code may be loaded with the control system running,

as long as the control system is not actually using that code. To be safe,

HALT the system before loading RSL code.

If you run out of file space (indicated by a "FILE FULL" message), but do not

have extra code loaded, you can increase the number of records allotted to

each file by editing the file declaration (in the 100 block section on the RSL %

board). You must recompile the SMACRO code for all levels and the RSL code

for this change to take effect. You may run out of the common memory space

allotted to files; type F-MEM to display the amount of memory left. To change

the allocation of common memory, edit absolute block 1402 and reload the base

and application code.

In general, RSL checks for errors and gives appropriate error messages. (The

appendices of this manual do not list these messages.) If you get an error

message, simply edit the block to correct the error, then reload the code.

You do not have to use the "RESTORE or D>M commands to fix errors with RSL.

When you load block 990 on RSL, it reloads the initialization blocks for each

level after compiling all the RSL source code. This is done because the

levels use several reserved records in RSL (mainly the round-robins) and must

look up record numbers, which may have changed as a result of recompilation.

9.5 EXECUTING RSL COMMANDS

To execute RSL commands, you load a block containing a command for the TASK

level. For example, move to the TASK&PATH board and use the directory block

structure to locate the TRANSFER command. Listing block shows that user commands are defined in the 900 section. Listing block 900 shows that the

input commands for the task level are in the 910 section. Listing block 910

shows that the TRANSFER command is in block 913.

(

9.5 EXECUTING RSL COMMANDS

9-8
Load block 913. RCS executes the TRANSFER command specified in block 913.

You can also execute the TRANSFER in Show mode, in which case RSL displays the

status-report, status-arg-out, and joint angles for each level as the robot

executes the transfer.

To see the status of the command being executed, load block 928 on RSL. This

block displays the status-report and status-arg-out variables for each level.

A status-report of means the command is executing, of 1 means the command is

done, and of 2 means an error occurred. The status-arg-out variable gives the

error types. (Refer to Chapter 10, "RSL Control Levels", for a description of

these errors.) Alternatively, you can display the variable error-list, the

owner of the error-report variables, on each level.

To issue another command, simply load another block. Blocks 910 through 979 on TASK are available for user commands. Most RSL commands are interruptible.

If you issue a new command, the old command aborts and the new command starts

executing. To suspend and then resume command execution, press the HOLD-SET

button on the joystick. The HOLD-SET button causes the robot to stop moving

and command execution to be suspended. To resume execution, press the

HOLD-CLEAR button.

Note that the GO and HALT coimnands are not commands to the control system.

The GO and HALT commands start and stop the control system.

9.5 EXECDTING RSL C0M4ANDS

9-9

Chapter 10

RSL CONTROL LEVELS

The first three sections of this chapter provide an overview of RSL and

describe the RSL data structures and compiler. The last four sections

describe TASK, PATH, PRIM, and JOINT, the four hierarchical control levels

that make up RSL. These control levels decompose each task you enter at the

keyboard into a series of primitive commands that a robot can execute to

accomplish a task. The sections describe the function of each control level

and provide command descriptions, status information, variable descriptions,

control-level routine descriptions, and a discussion of the error conditions

for each control level.

10.1 OVERVIEW OF RSL CONTROL LEVELS

The RSL system contains five main segments of code: the RSL compiler and the

four control levels TASK, PATH, PRIM, and JOINT. Each segment has its own vocabulary. This chapter refers to segments by using the vocabulary name for

each segment. (The context of the discussions distinguishes RSL as the whole

system from RSL as the compiler.)

•

10.1 OVERVIEW OF RSL CONTROL LEVELS

10-1
Figure 10-1 gives an overview of the relationships between RSL and the control

levels.

[2g[L {FSI]@©

Pose

Movetable

Locations

Path Types

Traj parameters

task

sequence of paths

RCS

communications

N^ 28 msec PATH

path

sequence of

trajectory segments

<^f

(J»

Sonars

j

RCS

communications

28 msec

trajectorg segment

/s

sequence of

poses

<^

RCS

communications

N^ 28 msec

pose commanded

joint angles

robot

RS-232

28 msec

Joystick

Figure 10-1. RSL files and control levels.

RSL compiles environmental data and algorithms into files in common memory.

The control levels use the files to execute commands. The TASK level decomposes user commands into a series of paths. The PATH level decomposes those

10.1 OVERVIEW OF RSL CONTROL LEVELS

10-2
paths into path-points and then into trajectories. The PRIM level executes

Cartesian trajectories, by sending a new pose to the JOINT level every cycle.

The JOINT level transforms the poses to joint values, and sends them to the

servo controls in the manufacturer's robot controller. For joint trajectories, PRIM sends the command to JOINT, which executes it, sending new joint

values to the servo mechanisms every cycle.

The rest of this chapter gives an introductory description of the source code

for all five segments and describes the RSL data structures. The source code

descriptions introduce you to the overall structure of RSL code.

The descriptions of individual routines are not exact translations of the

SMACRO code into English. Rather, they describe the functions of the routines. When you understand the descriptions in this chapter, you should be

able to understand the source code without the functional descriptions.

The internal structures of the four control levels are similar, but they are not exactly the same. Each section of this chapter begins with a description

of the input commands and status feedback for the level, followed by an overview of the level's structure, the preprocess routines, the command-process

routines, and the postprocess routines.

Note that when a variable owner is given as an input or output for a routine,

the members of the owner are the actual inputs and outputs.

The command descriptions include the command syntax. Commands to the TASK

level are different from those to the other levels. The TASK input is an ASCII string; the other levels accept numerical data. The user never gives

commands directly to the lower levels, only to the TASK level. So the TASK

level needs to be very flexible and user-friendly. The lower levels have less

flexible inputs and use fixed record descriptions. Thus, the syntax descriptions for the lower levels only indicate which of the fields in the input com- mand record are actually used by that command.

The command syntax shows parameter names enclosed in square brackets. When

you enter the commands, separate the parameters with spaces.

10.2 RSL DATA STRUCTURES

RSL represents data structures and algorithms as a linked list of records,

kept in files in common memory. These files are the user files described in

earlier chapters of this manual. The data within these files resides in the

user file portion of common memory.

Typically, the records contain pointers to other files, numeric data, and names. For linear displacement values, the unit of measurement is inches.

For angles, the unit of measurement is degrees. Internally, RSL represents

angles as radians. Names in RSL can have up to 15 ASCII characters, excluding

spaces.

RCS provides each file with a free list of records for garbage collection, and

SMACRO file operators to maintain the free list.

10.2 RSL DATA STRUCTURES

10-3
The following sections explain the RSL data structures: pose, movetable,

location, array, object, path, path-point, trajectory, and round-robin. Each

section describes the record structure of a file for the RSL data structure

type. RSL uses the RCS language SMACRO to define the data files. SMACRO provides the linked-list programming structure used for RSL files. A SMACRO

variable owner defines the record, with each member of the owner defining a field in the record. The SMACRO file declaration specifies the maximum number

of records allowed in the file. You may change this number to fit the size of

your application.

The Pose Data Structure

The pose file in common memory has the following structure:

55 bytes VAR-0 pose-rec

15 strv "pose-name"

7 1:fa pose

3 1:fa conf-flag

50 rec FILE POSE-FILE

where:

• "pose-name" contains the name of the pose.

• pose contains the seven numbers giving the rotation quaternion and the

translation vector for the pose.

• conf-flag contains the three robot arm configuration flags.

The pose file is a single linked list. When you define a new pose, RSL adds

the pose to the end of the list. RSL does not Include a provision for removing poses. When you reload the source code for a pose, RSL updates all the

fields.

The Movetable Data Structure

The movetable file in common memory has the following structure:

127 bytes VAR-0 mtb-rec

15 strv "mtb-name"

iv Ist-line-type 3 Is fa Ist-line-para

iv 2nd-line-type 3 1:fa 2nd-line-para

iv 3rd-line-type 3 1:fa 3rd-line-para

iv 4th-line-type 3 1:fa 4th-line-para

iv 5th-line-type 3 Is fa 5th-line-para

iv 6th-line-type 3 Isfa 6th-line-para

iv 7th-line-type 3 1:fa 7th-line-para

iv 8th-line-type 3 1:fa 8th-line-para

100 rec FILE MOVETABLE-FILE

10.2 RSL DATA STRUCTURES

10-4
where:

• "mtb-name" contains the name of the movetable.

• Ist-line-type through 8th-llne-para contain the lines of the movetable.

The first integer in each line contains a code number that identifies the

line type, and the next three floating-point numbers contain the parameters

for that type of line. Some line types require less than three parameters.

(A movetable may contain up to eight lines.) Table 10-1 lists the line

types and parameters.

Note; The line types given in Table 10.1 are used for the internal representation only and are not the same as the line types in the syntax

for defining movetables.

Table 10-1. Movetable Line Types.

Parameters

none.

X, y, z components of the vector in the

tool frame.

X, y, z components of the vector in the

base frame.

sine and cosine of half the angle about

the X axis of the tool frame.

sine and cosine of half the angle about

the y axis of the tool frame.

sine and cosine of half the angle about

the z axis of the tool frame.

The movetable file is a single linked list. When you define a new movetable,

RSL adds the movetable to the end of the list. RSL does not include a provision for removing movetables. When you reload the source code for a movetable, RSL updates all the fields.

The Location Data Structure

The location file in common memory has the following structure:

19 bytes VAR-0 loc-rec

15 strv "loc-name"

iv loc-pose-'^

iv loc-mtb-"

20 rec FILE LOCATION-FILE

Code Line Type

nul

1 tool-trn

2 base-trn

3 tool-rotx

4 tool-roty

5 tool-rotz

10.2 RSL DATA STRUCTURES

10-5
where

:

• "loG-name" contains the name of the location. ^

• loc-pose-^ contains a pointer to the pose for "loc-name" in the POSE-FILE.

RSL sets the pointer when it defines the location.

• loG-mtb-^ contains a pointer to the movetable for "loc-name" in the

MOVETABLE-FILE. RSL sets the pointer when it defines the location.

The location file is a single linked list. When you define a new location,

RSL adds the location to the end of the list. RSL does not include a provision for removing locations. When you reload the source code for a location,

RSL updates all the fields.

The Array Data Structure

The array file in common memory has the following structure:

88 bytes VAR-0 arr-rec

10 strv "arr-name"

iv base-loc-*

iv x-#-sectors

iv y-#-sectors

iv z-#-sectors

iv //-sectors

iv x-mtb-"

iv y-mtb-"

iv z-mtb-*

20 1:a sector-list

iv arr-pose-

(

10 rec FILE ARRAY-FILE

where:

• "arr-name" contains the name of the array.

• base-loc-"" contains a pointer to the location in LOCATION-FILE that is the

origin of the array.

• x-//-sectors , y-Zi^-sectors , and z-#-sectors contain the number of sectors

along the x, y, and z axes of the location frame.

• //-sectors contains the total number of sectors.

• x-mtb-^ , y-mtb-^ , and z-mtb-^ contain pointers to the movetables in

MOVETABLE-FILE for the displacement from one sector to the next sector

along the respective axes of the location frame. The movetables should

have only lines of type tool-trn.

(

10.2 RSL DATA STRUCTORES

10-6
• sector-list contains a list of sectors giving the order in which RSL loads

or unloads the array.

• arr-pose-"^ contains a pointer to the pose that gives the position of the

current sector during loading or unloading.

All fields, except sector-list, are set when RSL defines the array. TASK sets

the field sector-list when it receives a TRANSFER command to load or unload

the array.

RSL reserves a pose record for arr-pose-* when you declare the array. TASK

calculates the value of the pose from the base location and sector movetables

at the beginning of execution of a path involving the sector as the source or destination.

RSL numbers sectors starting at the origin of the location frame, sector 0.

Then it increments along the x, y, and z axes of the location frame, incrementing X first, y second, and z third.

The array file is a single linked list. When you define a new array, RSL adds

the array to the end of the list. RSL does not include a provision for removing arrays. When you reload the source code for an array, RSL updates all the

fields, clearing the sector-list.

The Object Data Structure

The object files in common memory have the following structure:

17 bytes VAR-0 obj-name-rec

15 strv "obj-name"

iv obj-grip-L-*

5 rec FILE OBJ-NAME-FILE

4 bytes VAR-0 obj-grip-rec

iv grip#

iv grip-mtb-*

20 rec FILE OBJ-GRIP-FILE

where :

• "obj-name" contains the name of the object.

• obj-grip-L-^ contains a pointer to a list of the grips for each object in

OBJ-GRIP-FILE.

• grip# contains the grip number of the object.

• grlp-mtb-'' contains a pointer to a movetable that defines the grip in

MOVETABLE-FILE.

10.2 RSL DATA STRDCTDRES

10-7
Typically, grip 1 has a nul movetable and RSL defines other grips relative to

grip 1.

OBJ-NAME-FILE contains a linked list of all object names. OBJ-GRIP-FILE con- tains a list for each object. RSL does not include a provision for removing

objects or object grips. When you reload the source code that defines a grip

definition, RSL updates the field grip-mtb-* and preserves all other fields.

The Path Data Structure

The central path file in common memory is the PATH-POINT-FILE. The

PATH-POINT-FILE has the following structure:

4 bytes VAR-0 ppt-rec

iv ppt-command

iv ppt-para"

100 rec FILE PATH-POINT-FILE

where

• ppt-command contains the path-point command.

• ppt-para* contains a pointer to the command parameter file.

The path-point file contains one list for each defined path. RSL does not

include a provision for removing paths. When you reload a path, RSL returns

the current list for that path to the free list and creates a new list. RSL

also returns the associated records in the command parameter file to their

free lists and creates new lists as needed. You may redefine paths as often

as you like without wasting file space.

Each path-point command has one command parameter file. This file contains

any parameters related to the path-point. RSL provides only the goto pathpoint, and thus, only the GOTO-FILE command parameter file.

The move-to path type

The move- to file in common memory has the following structure:

12 bytes VAR-0 move-to-rec

iv move-to-obj-"

iv move-to-start-type

iv move-to-start-*

iv move-to-dest-type

iv move-to-dest-*

iv move-to-path-'*

40 mem FILE MOVE-TO-FILE

10.2 RSL DATA STRUCTORES

10-8
where

• move-to-obj-'* contains a pointer to the object grip record in

OBJ-GRIP-FILE.

• move-to-start-type contains the starting location type. The location type

must be either loc or arr.

• move-to-start-'^ contains a pointer to the starting location in

LOCATION-FILE or ARRAY-FILE.

• move-to-dest-type contains the destination location type (loc or arr).

• move-to-dest-'^ contains a pointer to the destination.

• move-to-path-'' contains a pointer to the path in the PATH-POINT-FILE.

The move-to file is a single linked list. A new record is added to this file

when a move- to path for a new object/start location/destination is defined.

RSL does not include a provision for removing paths. When you reload a move-to path, RSL updates the field move-to-path-* to point to the new path.

The structures of the other path types are similar to the structure of

move-to. Because of the similarity, the following sections give the structure

of the path type records without a complete description.

The approach-pickup path type

The approach-pickup file in common memory has the following structure:

8 bytes VAR-0 approach-pickup-rec

iv appr-pick-loc-type

iv appr-pick-loc-*

iv appr-pick-obj-"

iv appr-pick-path-"

40 mem FILE APPROACH-PICKUP-FILE

The depaurt-pickup path type

The depart-pickup file in common memory has the following structure:

8 bytes VAR-0 depart-pickup-file

iv dept-pick-loc-type

iv dept-pick-loc-''

iv dept-pick-obj-*

iv dept-plck-path-''

40 mem FILE DEPART-PICKUP-FILE

10.2 RSL DATA STRDCTURES

10-9
ZI

The approach-release path type

The approach-release file in common memory has the following structure:

8 bytes VAR-0 approach-release-rec

iv appr-rel-loc-type

iv appr-rel-loc-^

iv appr-rel-obj-^

iv appr-rel-path-''

40 mem FILE APPROACH-RELEASE-FILE

The depart-release path type

The depart-release file in common memory has the following structure:

8 bytes VAR-0 depart-release-file

iv dept-rel-loc-type

iv dept-rel-loc-''

iv dept-rel-obj-"

iv dept-rel-path-''

40 mem FILE DEPART-RELEASE-FILE

The Path-Point Data Structure

The goto file in common memory has the following structure:

8 bytes VAR-0 goto-rec

iv goto-loc-type

iv goto-loc-'^

iv goto-traj-type

iv goto-traj-''

100 rec FILE GOTO-FILE

where:

• goto-loc-type contains the type of location.

• goto-loc-^ contains a pointer to the location.

• goto-traj-type contains the trajectory type: cart or joint.

• goto-traj-^ contains a pointer to the trajectory parameters in

CARTESIAN-FILE or JOINT-FILE.

The goto file is a single linked list. When you define a goto path-point, RSL

adds the goto path-point to the end of the list. RSL removes the goto pathpoint whenever a path containing goto path-points is deleted as part of

redefinition.

10.2 RSL DATA STRDCTORES

10-10
The Trajectory Data Structure

The files for the Cartesian and joint trajectory types in common memory have

the following structure:

24 bytes VAR-0 cart-rec

fv amax

fv vmax

fv trn-nbrhd

fv gmax

fv wmax

fv rot-nbrhd

100 rec FILE CARTESIAN-FILE

where:

• amax contains the maximum allowed magnitude of the translational acceleration, in inches per cycle per cycle.

• vmax contains the maximum allowed magnitude of the translational velocity,

in inches per cycle.

• trn-nbrhd contains the translational distance in inches from the current

goal location at which the trajectory routine reports done.

• gmax contains the maximum allowed magnitude of the rotational acceleration,

in degrees per cycle per cycle.

• wmax contains the maximum allowed magnitude of the rotational velocity, in

degrees per cycle.

• rot-nbrhd contains the rotation neighborhood, the rotational distance in

degrees from the current goal location at which the trajectory routine

reports done.

12 bytes VAR-0 joint-rec

fv j-acc

fv j-vel

fv j-delta

100 rec FILE JOINT-FILE

where:

• j-acc contains the maximum allowed acceleration of any joint, given as the

percentage (between and 100) of the hardware maximum for each joint.

• J-vel contains the maximum allowed velocity of any joint, given as the percentage (between and 100) of the hardware maximum for each joint.

10.2 RSL DATA STRUCTURES

10-11
• J-delta contains the difference in degrees from the location Joint values

at which the trajectory routine reports done. When the trajectory reports

done, all Joint values are within this delta.

Each file is structured as a single linked list. RSL adds records to the

appropriate list whenever a path-point is defined. RSL removes records whenever a path-point containing the trajectory is deleted as part of a path

redefinition.

The Round-Robin Data Structure

A round-robin is a circular list in a file, called the containing file. Use

round-robins to store information temporarily. For example, if you are using

a slow sensor, such as a vision sensor that may require up to 15 cycles to

take a reading, use a round-robin to store robot poses for the previous 15

cycles. This technique enables the sensor to access the position of the robot

at every cycle since the sensor started the reading,

RSL also uses round-robins to pass information between control levels. When

one control level writes a record to the next lower level, the lower level

reads the record written previously.

As Illustrated in Figure 10-2, for example, in cycle 1 PATH writes the goal

pose to record 1 and puts the pointer in goal-pose-'^-out. Also in cycle 1,

PRIM reads the pose from record 3 (put there by PATH in the last cycle). This

pose is pointed to by goal-pose-^-in. After cycle 1, COMM moves PATH'S output

command buffer (containing goal-pose-*-out) to PRIM'S input command buffer

(containing goal-pose-^-in) . Then in cycle 2, PATH writes the goal pose to

record 2 and PRIM reads from record 1

.

10.2 RSL DATA STRUCTURES

10-12
PATH

goa1-pose-'-out

^ cycle 1

write pose

±.

PRIM

goal-pose-"-in

PATH

goal-pose-'-out

\^

PRIM

goal-pose-'-in

POSE-FILE

2

3

cycle 2

POSE-FILE

2

3

read pose

Figure 10-2. Using a round-robin to transfer information

between control levels.

10.2 RSL DATA STRDCTDRES

10-13
The round-robin file in common memory has the following structure:

17 bytes VAR-0 r-rec

15 strv "rr-name"

iv rr-^

iv rr-size

10 mem FILE ROUND-ROBIN-FILE

where:

• "rr-name" contains the name of the round-robin.

• rr-^ contains the record number of the beginning of the circular list in

the containing file.

• rr-size contains the number of records in the round-robin.

The round-robin file is a single linked circular list. RSL does not include a provision for removing round-robins. When you redefine a round-robin, RSL

returns the records in the containing file to the free list, and then creates

a new circular list.

Note: The containing file is not identified by any field in this record. You

must manually keep track of which containing file is associated with

each round-robin. In RSL, the name of the round-robin denotes the

containing file.

10.3 RSL COMPILER

The RSL compiler compiles RSL source code describing locations, movetables,

objects, and paths into a linked-list representation, stored in common memory

files. The RSL compiler consists of a set of routines that interpret the

source code and build the data and algorithm files. Each data type has its

own compiling routine or routines.

Table 10-2 lists the compiling words for each data type.

Table 10-2. Data Type Compiling Words.

RSL Data Type Compiling Word

pose -posemovetable -mtb-, , -mtb-end-, -imtblocation -locarray -arr- object -objpath -path-, -pptround-robin -rr10.3 RSL COMPILER

10-1^
Note that the compiling word is an abbreviation of the data type name enclosed

by dashes. RSL uses these same abbreviations consistently when naming variables and routines.

The rest of this section describes some RSL compiling routines. If you extend

RSL to include new path-points, path types, or trajectory types, you have to

add new compiling routines, similar to the ones described here to accommodate

the extensions. These compiler routines call utility routines to perform com- mon functions. For more information on extensions see Chapter 11, "RSL

Extensions",

Utility Routines

Each file that contains a data type name has an associated search routine that

reads a name from the input stream, stores the name in the name field of the

local template for the file, and searches the file for that name. If the

search routine finds the name in the file, the routine sets the record# to the

found record. If the search routine does not find the record name in the

file, the routine sets the record# to 0. Table 10-3 lists the files and the

associated routines:

Table 10-3. Data Type Search Routines,

RSL Files Routines

POSE-FILE POSE-"

MOVETABLE-FILE ^f^B-"

LOCATION-FILE LOC-"

ARRAY-FILE ARR-"

OBJ-NAME-FILE OBJ-"

ROUND-ROBIN-FILE RR-"

SAME-BLOCK? is an example of a utility routine called by many of the other

compiling routines.

SAME-BLOCK?

The SAME-BLOCK? utility routine compares the current source block number

with the block number stored in the current record. If the numbers are different, the routine displays the message redefined in different block,

and displays the old block number. This message should prevent you from

using the same name twice.

RSL includes the location types loc, arr, tool, and goal. VHien you add location types, you need to add to the routine READ-LOC-PHRASE , which is defined

next.

10.3 RSL COMPILER

10-15
READ-LOC-PHRASE [loc type] [loc name]

The READ-LOC-PHRASE utility routine stores the location type in the variable loc-type. Then it searches the corresponding file for loc name and

stores the record* in loc-'*. READ-LOC-PHRASE aborts execution if it does

not find the location. Because READ-LOC-PHRASE does not add records to a

file, it does not have a STORE or REMOVE routine.

Environmental Data Routines

Environmental data routines compile information about objects in the environment such as the position of an object relative to the robot. The routine

-pose- is described here as an example.

-pose- [name] [pose numbers] [configuration flags]

This environmental data routine calls POSE-" to read the pose name and

check that it is not already defined. Then -pose- calls #.READ 10 times

to read in the pose numbers and configuration flags, storing them in the

corresponding fields in the POSE-FILE local record, pose-rec. If the

pose is already defined, it calls SAME-BLOCK? and stores the local template to the found record. Otherwise, it adds the local template to the

list in POSE-FILE, pointed to by the variable first-record.

Routines to Compile Trajectories

READ-TRAJ-PHRASE, STORE-TRAJ-PHRASE, and REMOVE-TRAJ-PHRASE are the highest

level compiler routines used with trajectories. Use these routines when you

add other trajectory types to RSL.

READ-CART-TRAJ [cart traj parameters]

READ-CART-TRAJ is an example trajectory type routine that calls #.READ

five times to read in the Cartesian trajectory parameters, storing them

in the local template of CARTESIAN-FILE.

READ-JOINT-TRAJ [joint traj parameters]

READ-JOINT-TRAJ is an example trajectory routine that calls #.READ three

times to read in the joint trajectory parameters, storing them in the

local template of JOINT-FILE.

READ-TRAJ-PHRASE [traj type] [traj parameters]

READ-TRAJ-PHRASE is a compiling routine that calls //READ to read in the

trajectory type, storing it in traj-type. READ-TRAJ-PHRASE aborts if the

trajectory type is invalid. READ-TRAJ-PHRASE also executes a case statement to call a routine to read the trajectory parameters for the type.

10.3 RSL COMPILER

10-16
STORE-TRAJ-PHRASE

STORE-TRAJ-PHRASE is a compiling routine that stores the traj-type local

template to its file, adding to the list of file records.

STORE-TRAJ-PHRASE sets traj-" to the record// stored. The path-point rou- tine calls this routine after checking the rest of the path-point syntax,

REMOVE-TRAJ-PHRASE

REMOVE-TRAJ-PHRASE is a compiling routine that deletes the trajectory

parameter record pointed to by the variable traj-* from the traj-type

file.

Routines to Compile Path-Points

RSL compiles paths in two stages. First, RSL compiles the path and then the

path-points. The routine -path- compiles the identifying information for the

path, and creates a list in PATH-POINT-FILE. The routine -ppt- compiles the

path-points, adding them to the list in PATH-POINT-FILE.

You must provide two routines for each path-point you add to RSL; one that

compiles the path-point and one that removes it for garbage collection. By

convention, the path-point command consists of lowercase characters, the com- piling routine has the same name in uppercase characters, and the removing

routine has the same name in uppercase characters with -REMOVE appended to the

end. For example, the goto path-point command is goto, the compiling routine

is GOTO, and the removing routine is GOTO-REMOVE.

The compiling routine must read in all the fields of the path-point, checking

that any referred- to items, such as movetables and locations, are defined

before modifying any files. Then the compiling routine stores the results in

the appropriate files. One of these files must be the primary path-point

parameter file. The record# of the record added to that file must be put in

the variable ppt-para-'' to be stored in PATH-POINT-FILE by the routine -ppt-.

You must add the new compiling routine to the case statement in -ppt-, and you

must add the removing routine to the case statement in PPT-REMOVE. Use the

directory block system in the source code to find empty blocks in which to

write your routines.

The compiling routines for the RSL path-point goto are described below:

GOTO [loc phrase] [traj phrase]

This routine calls READ-LOC-PHRASE and copies loc-type and loc-'' into the

variables goto-loc-type and goto-loc-'^. (These variables are fields in

the GOTO-FILE local template goto-rec.) GOTO then calls READ-TRAJ-PHRASE

and copies traj-type into goto-traj-type. At this point, all fields have

10.3 RSL COMPILER

10-17
been read and any errors detected so the records may be written to the

files. GOTO writes the records to the files by calling

STORE-TRAJ-PHRASE, copying traj-" to goto-traj-*. Then GOTO adds the

local template to GOTO-FILE and sets ppt-para-'' to the record* stored.

GOTO-REMOVE

This routine retrieves the record from GOTO-FILE pointed to by

ppt-para-*^, copies the variables goto-traj-type and goto-traj-* into

traj-type and traj-", calls REMOVE-TRAJ-PHRASE , and removes the record

from GOTO-FILE.

-ppt- [ppt command] [ppt parameters]

This routine stores the ppt command type in ppt-command, executes a case statement to call the corresponding compiling routine, then adds the ppt

record to the current path in PATH-POINT-FILE. (Note that -path- puts an invalid ppt record at the beginning of the list when it is created.

Therefore, -ppt- checks first-ppt to see if it should store to that

record or add a record to the list.)

Routines to C<Miplle Paths

Each path type you add to RSL must have enough parameters to identify individual paths of that type. You provide a routine that reads the identifying

parameters, creates a list in PATH-POINT-FILE, and stores the data to the

path-type file. When a path is redefined, you must call PATH-CLEAR to delete

the old path from PATH-POINT-FILE and the path-point command parameter files.

You must also modify the path files. You must add your routine to the case statement in -path-.

Two typical parameters that identify a path are locations and objects. The

utility routine READ-LOC-PHRASE may be used to read location phrases. A routine used to read object phrase, a compiling routine for the system path type

move-to, and some associated routines are described below.

READ-OBJ-PHRASE [obj name] [grip#]

This routine searches the object files for the name and grip number. If

they are not found, the routine aborts. Then the routine sets obj-grip-'

to the record* in the OBJ-GRIP-FILE.

PATH-CLEAR

This routine deletes the path in PATH-POINT-FILE starting at path-", exe- cuting PPT-REMOVE for each path-point. PPT-REMOVE deletes all records

added to path-point parameter files for the path.

10.3 RSL COMPILER

10-18
MOVE-TO [obj phrase] [start loc phrase] [destination loc phrase]

This routine calls READ-OBJ-PHRASE and copies obj-grip-" to

move-to-obj-''. MOVE-TO then calls READ-LOC-PHRASE , and copies loc-type

and loc-" into move-to-start-type and move-to-start-'^. Then MOVE-TO

calls READ-LOC-PHRASE again, and copies loc-type and loc-" into move-todest-type and move-to-dest-". MOVE-TO has now read all input fields, and

is ready to write the data to the files.

MOVE-TO searches MOVE-TO-FILE for the object, start location, and destination location. If a match is found, the old path is removed. If not

found, a record is added to the MOVE-TO-FILE list. In either case,

path-own-" is set to the record// in MOVE-TO-FILE, so that move-to-path-"

may be set later.

After the correct MOVE-TO-FILE record is found, a list is created in

PATH-POINT-FILE, and move-to-path-" is set. The ppt-command is set to -1

for a path with no path-points. If such a path is redefined, PPT-REMOVE

does not abort.

-path- [path-type] [parameters]

This routine sets path-type to the path type. It then executes a case statement to execute the corresponding routine, which reads the parameters and creates a list in PATH-POINT-FILE. The variable first-ppt is

set to true, so that -ppt- stores to the first record in the list, rather

than adding a record to the list.

10.4 THE TASK LEVEL

The TASK level interprets and executes robot task commands entered at the keyboard, or more commonly, loaded from a block. You can define your own tasks

using state tables, or you can use the MOVE-TO and TRANSFER tasks provided on your system tape. You must use the TASK utility routines when you create rou- tines to perform other tasks.

TASK Conmands

The following commands execute at the TASK level: RESTART, PAUSE, MOVE-TO,

and TRANSFER. This section explains the function and provides the syntax of

each command.

RESTART command

The syntax of the RESTART command is!

RESTART

10.4 THE TASK LEVEL

10-19
RESTART sends RESTART to PATH, and sets the current location and object to

nul. After sending the RESTART command, TASK reports its status as executing,

until the PATH level reports done. Then TASK level also reports its status as done.

PAUSE command

The syntax of the PAUSE command is:

PAUSE

PAUSE sends PAUSE to the PATH level, and sets the current location and object

to nul. After you issue PAUSE, the TASK level reports its status as executing

until the PATH level reports its status as done. Then the TASK level also

reports its status as done.

MOVE-TO command

The syntax of the MOVE-TO command is:

MOVE-TO [object] [grip#] [destination location type] [destination]

[sector]

where

:

• object specifies the name of the object you are directing RSL to move.

• grip# specifies the number of the grip for the specified object.

• destination location type can be array (arr) or location (loc).

• destination specifies the destination for the MOVE-TO command.

• sector specifies the array sector containing the destination. This field

is Included only if the destination location type is an array (arr).

MOVE-TO sends a single move-to path to the PATH level. MOVE-TO uses the current location as the start location. The destination becomes the current

location when the path is complete.

MOVE-TO reports an error if it does not find the path. After you issue

MOVE-TO, the TASK level reports its status as executing until the PATH level

reports its status as done. Then the TASK level also reports its status as done.

TRANSFER command

The syntax of the TRANSFER command is:

TRANSFER [object phrase] [source location phrase] [source sector list]

[destination location phrase] [destination sector list]

10.1 THE TASK LEVEL

10-20
where :

• object phrase contains the object name and grip number.

• source location phrase contains the location type and name of the source.

• source sector list is a list of numbers, terminated by ;; and giving the

sectors of the source array. This field is included only if the source location type is an array (arr).

• destination location phrase contains the location type and name of the

destination.

• destination sector list is a list of numbers, terminated by ;; and giving

the sectors of the destination array. This field is included only if the

destination location type is an array (arr).

TRANSFER sends a sequence of path commands to the PATH level and updates the

current location each time it completes the execution of a path.

TRANSFER sends the following sequence of paths, in the order shown, to the

PATH level:

1. move-to [object] [source] [destination]

2. approach-pickup [object] [source]

3. depart-pickup [object] [source]

4. move-to [object] [source] [destination]

5. approach-release [object] [destination]

6. depart-release [object] [destination]

If the source or the destination is an array, RSL repeats the specified

sequence of paths for each sector in the sector list. If both the source and

the destination are arrays, the sector lists must have the same lengths.

After you issue TRANSFER, the TASK level reports its status as executing until

the PATH level indicates that all paths are complete by reporting its status

as done. Then the TASK level also reports its status as done.

TASK Input CoBBand Buffer

The TASK input command buffer consists of the following variables:

inc-command-#-in

The user increments this integer variable each time the user issues a new command

.

input-command

The user stores each new command in this 128-character string variable.

10.4 THE TASK LEVEL

10-21
TASK Status Information

To provide status feedback, the TASK level returns an echo of the input command, and a status report.

The TASK output status buffer consists of the following five variables:

cycle-#-status-out

Returns the cycle count when TASK returns its status. The changing value

of this integer variable verifies that the TASK level is running.

inc-command-#-echo-out

Returns a copy of the inc-command-ZA-in variable. This information

enables you to know for which command TASK is returning status

information.

command-echo

Returns a copy of the string stored in input-command. This information

enables you to know for which command TASK is returning status

information.

status-report

Returns the current status of TASK. The possible values for this integer

variable and their meanings are:

Value Meaning Description

executing The current command is still executing.

1 done The current command is finished executing.

2 error An error occurred. (See status-arg-out.

)

status-arg-out

Returns the error status. The possible values for this integer variable

and their meanings are:

Value Meaning Description

noerror TASK detected no errors.

1 path-error PATH reported an error to TASK.

2 command-error TASK received an invalid command or parameters.

3 nul-path TASK could not find one of the specified paths.

4 programmer TASK detected a programming error.

TASK Variables

This section describes internal TASK variables.

t->IN

TASK uses this variable as a pointer to the current position in the

input-command buffer variable.

10.4 THE TASK LEVEL

10-22
t-word

This variable holds a word read from the current position in the

input-command buffer variable.

t-#

This variable holds a number read from the current position in the

input-command buffer variable.

state-label

This variable holds the label for the current state. TASK routines

derived from state graphs use this variable.

cur-loc-type

The cur-loc-type variable specifies the current location type.

cur-loc-*

The cur-loc-* variable points to the current location.

cur-obj-*

The cur-obj-" variable points to the current object.

com-loc-type

The com-loc-type variable holds the commanded location type determined by

READ-LOC-PHRASE.

com-loc-'*

The com-loc-* variable holds the commanded location pointer determined by

READ-LOC-PHRASE.

com-obj-*

The com-obj-" variable holds the commanded object pointer determined by

READ-OBJECT-PHRASE

.

search-result

This variable owner contains the variables that hold the output of

path-search routines.

goal-type, goal-*, obj-*, path-''

These variables hold the output of path-search routines. These variables

are members of the search-result variable owner.

arr-pose-"

This variable points to the pose for the current sector in the current

array. ARRAY-POSE is used as a dummy name for this pose.

TASK Errors

TASK uses the variable status as an error flag. At the beginning of each

cycle, the value of status is noerror. Any routine that detects an error sets

status to indicate an error. TASK notes this error, sets status-arg-out to

the appropriate value, and sends a PAUSE command to the PATH level. TASK does

not finish executing the current task after detecting an error.

10.4 THE TASK LEVEL

10-23
TASK Utilities

This section provides general descriptions of the TASK utilities listed below.

Use the LOC command to find the exact code for each routine on your system.

WREAD-COMMAND READ-SECTOR-LIST

#READ-COMMAND CALC-SECTOR-POSE

READ-OBJ-PHRASE WAIT-PATH-DONE

READ-LOC-PHRASE TASK=>PATH

The description of these utilities begins with a list of the input and output

variables.

WREAD-COMMAND

Input Variables Output Variables

input-command t~word

t->IN t->IN

status

Reads a word, delimited by a space, from the input-command buffer variable. The routine stores the word in t-word and Increments t->IN by the

number of characters in the word.

#READ-COMMAND ^

Input Variables Output Variables

input-command t-#

t->IN t->IN

status

Reads a string, delimited by a space, from the input-command buffer variable and increments t->IN by the number of characters in the string. It

then searches for the string in the system dictionary, using the current

vocabulary. If the string is in the dictionary, #READ-COMMAND checks to see that it is an integer or sequential variable and, if it is, stores

the value in t-#.

If the string is not in the system dictionary or if it is not an integer

or sequential variable, #READ-COMMAND converts the string to an integer

and stores the result in t-#. If the string is not a valid integer,

#READ-COMMAND aborts.

READ-OBJ-PHRASE

Input Variable Output Variables

input-command com-obj-'

t->IN status r

10.4 THE TASK LEVEL

10-24
Calls WREAD-COMMAND and #READ-COMMAND to read an object name and grip number

from the input command buffer. READ-OBJ-PHRASE then finds the recordyA of the

corresponding entry in the object data structure.

READ-LOC-PHRASE

Input Variable Output Variables

input-command com-loc-type

com-loc-"

status

Calls #READ-COMMAND and WREAD-COMMAND to read a location type and name

from the input command buffer. READ-LOC-PHRASE stores the location type

in the com-loc-type variable. READ-LOC-PHRASE searches the location data

structure for the name and sets com-loc-* to the record// of the record

containing the name.

READ-SECTOR-LIST

Input Variables Output Variables

input-command sector-list

com-loc-* status

Calls #READ-COMMAND until it reads the entire sector list, which is terminated by ; ;

CALC-SECTOR-POSE

Input Variables Output Variable

sector ARRAY-POSE

arr-rec

Calculates the pose for the sector of the array in arr-rec and stores the

pose in the RSL data structure POSE-FILE at the position pointed to by

arr-pose-*.

WAIT-PATH-DONE

Input Variable Output Variables

path-status status-report

cur-var

Checks if the path-status variable indicates done and, if so, sets the

status-report variable to done, sets cur-loc-type to equal goal-loc-type.

10.4 THE TASK LEVEL

10-25
sets cur-loc-* to equal goal-loc-'', and sets cur-obj-'' to equal

obj-"-out. WAIT-PATH-DONE does nothing if the path-status variable indicates executing. r'

TASKr>PATH

Input Variable

search-result

inc-coinmand-#-out

Output Variable

path-command-var inc-command-#-out

Sets the value of output-command to PATH, copies the value of

search-result to the corresponding fields in path-command-var, and increments the value of inc-command-#-out.

TASK Processing

The three stages for the TASK level are PRE-PROCESS, COMMAND-PROCESS, and

POST-PROCESS, which correspond to the preprocessing, decision-processing, and

postprocessing stages discussed in Chapter 2, "RCS Overview".

PRE-PROCESS reads the command and status inputs, and sets the flags needed by

COMMAND-PROCESS. COMMAND-PROCESS, the decision-processing stage, reads the

command parameters, searches for paths, and sends commands to the command buffer of the PATH level. POST-PROCESS performs the "housekeeping" required to

prepare TASK for the next command.

TASK preprocessing

The TASK routine PRE-PROCESS calls READ-COMMAND and PATH-STATUS.

READ-COMMAND

Input Variables

input-command

inc-command-#-in

old-inc-command-#-in

Output Variables

"command-name"

new-command

status

status-arg

t->IN

old-inc-command-#-in

Checks if the value of inc-command-Zit-in has changed since the last cycle

and, if so, sets the status report and status-arg-out variables to indicate no error, sets the new-command variable to true, and copies the

value of inc-command-#-in to old-inc-command-#-in. Calls WREAD-COMMAND

to read the first word contained in the input-command buffer variable.

Stores the first word in the "command-name" variable. (The "commandname" variable includes the double quotation marks.)

(

10.^ THE TASK LEVEL

10-26
PATH-STATUS

Input Variables

status-in

inc-coimnand-#-out

inc-coinmand-#-echo-in

Output Variable

path-status

Verifies that inc-coimnand-#-out matches inc-cominand-#-echo-in, indicating

that the PATH level responded to the current command and that the value

of the status-in variable is valid. PATH-STATUS then copies the value of

status-in to the path-status variable. If the PATH level has not

responded, PATH-STATUS sets path-status to executing.

TASK decision processing

The TASK routine COMMAND-PROCESS executes the current task routine. If the

value in status-report is error, COMMAND-PROCESS executes only the RESTART

command

.

If neither status-report nor status indicates an error, COMMAND-PROCESS exe- cutes the task routine corresponding to the "command-name" set in PRE-PROCESS.

If "command-name" does not contain a valid command, COMMAND-PROCESS sets

status-report to error and sets status-arg to command-error. After

COMMAND-PROCESS executes the specified task routine, it copies the value of

status-arg to status-arg-out.

The following is a list of routines used in COMMAND-PROCESS for the RESTART,

PAUSE, and MOVE-TO commands. This list does not include the routines for

TRANSFER, most of which are similar to the routines for MOVE-TO.

TASK-RESTART

TASK-PAUSE

MOVE-TO

MOVE-TO-PARAM

MOVE-TO-SEARCH

The descriptions of these routines follow.

TASK-RESTART

Input Variable

new-command

inc-command-#-out

Output Variables

path-command-var

process-var

status-report

Sends RESTART to the PATH level and waits for prim-status to indicate

done.

10.4 THE TASK LEVEL

10-27
TASK-PAUSE

Input Variable

new-command

Sends PAUSE to the PATH level,

Output Variables

path-command-var

status-report

MOVE-TO

Input Variables

new-command

input-command

Output Variables

path-command-var

status-report

Reads the command parameters and finds the path by calling MOVE-TO-PARAM

and MOVE-TO-SEARCH. If MOVE-TO-SEARCH finds the path without finding any

errors, MOVE-TO calls TASK=>PATH. If new-command indicates false,

MOVE-TO calls WAIT-PATH-DONE. MOVE-TO sets the status as described under

the "MOVE-TO" command.

MOVE-TO-PARAM

Input Variables

input-command

cur-loc-type

cur-loc-''

Output Variables

move-to-rec

sector

ARRAY-POSE

status

status-arg

C

Reads the rest of the parameter information in the input-command buffer

variable by calling READ-OBJ-PHRASE , READ-LOC-PHRASE , and #READ-COMMAND

MOVE-TO-PARAM then uses this information to set the parameters for

MOVE-TO-SEARCH.

MOVE-TO-SEARCH

Input Variable

move-to-rec

Output Variables

search-result

status

status-arg

Searches the MOVE-TO-FILE for a record that matches move-to-rec and sets

the fields of search-result if it finds a match.

C

10.4 THE TASK LEVEL

10-28
TASK postprocessing

The TASK routine POST-PROCESS calls CLEAN-UP.

CLEAN-UP

Input Variable Output Variable

input-command-var output-status-var

Echoes the input-command and inc-command-#-in, and then sets

cycle-#-status-out

.

10.5 THE PATH LEVEL

The PATH level interprets and executes path and path-point commands received

from the TASK level. PATH executes paths by retrieving each successive pathpoint and waiting for the lower levels, PRIM and JOINT, to complete the exe- cution of the path-point. PATH executes path-points by reading the appropriate sensors and sending motion commands to the PRIM level.

PATH Commands

The following commands execute at the PATH level: RESTART, PAUSE, and PATH.

This section describes the function and provides the syntax of each command.

RESTART command

The syntax of the RESTART command is:

RESTART

RESTART sends RESTART to PRIM and resets the debug variables. After issuing

the RESTART command, PATH reports its status as executing until PRIM reports

done. Then PATH reports done to TASK.

PAUSE command

The syntax of the PAUSE command is:

PAUSE

PAUSE sends PAUSE to the PRIM and JOINT levels. After issuing PAUSE, PATH

reports done to the TASK level immediately, without requesting confirmation

from PRIM and JOINT.

10.5 THE PATH LEVEL

10-29
(

PATH command

The syntax of the PATH command is:

PATH [path-"] [goal-type] [goal-"] [obj-"]

where:

• path-" points to the path to be executed.

• goal-type can be either a location (loc) or an array (arr).

• goal-" points to the goal location or the array describing the path. Pathpoint commands use this information to determine paths for the PRIM and

JOINT levels to execute.

• obj-" points to the current object. Some path-point routines use this

information to obtain the grip movetable or other object-dependent data.

PATH executes the path pointed to by path-". The PATH level reports its

status as executing until it completes the execution of all path-points. Then

the PATH level reports done to the TASK level.

PATH Input CCTHmand Buffer

The PATH input command buffer consists of the following variables:

inc-command-#-in ( TASK increments this integer variable each time it sends a new command to

the PATH level.

input-command

TASK sends this integer variable to PATH to identify the command. Commands are numbered as follows: 0-RESTART, 1 -PAUSE, and 2-PATH.

path-"

TASK sends this integer pointer variable to PATH to identify the path.

goal-type

TASK sends this integer variable to PATH to indicate the type of goal

location.

goal-"

TASK sends this integer pointer variable to PATH to identify the goal

location.

obj-"

TASK sends this integer pointer variable to PATH to identify the current

object.

10.5 THE PATH LEVEL

10-30
PATH Status Information

To provide status feedback to the TASK level, the PATH level returns a status

report, and echoes the input command and incremental command number.

PATH uses the following five variables to return status to the TASK level:

cycle-#-status-out

Returns the cycle count when PATH returns its status. The changing value

of this integer variable verifies that the PATH level is running.

inc-command-#-echo-out

Echoes the integer count of new commands received by the PATH level as indicated by the inc-command-#-in variable. This information enables

TASK to know for which command PATH is returning status information.

command-echo

Echoes the string stored in inc-command-#-in. This information enables

you to know for which command PATH is returning status information.

status-report

Returns the current status of PATH,

variable and their meanings are:

The possible values for this integer

Value Meaning

executing

done

error

Description

The current command is still executing.

The current command is finished executing.

An error occurred. (See status-arg-out.)

status-arg-out

Returns the error status,

and their meanings are:

The possible values for this integer variable

Value Meaning

noerror

1 prim-error

2 command-error

3 ppt-para

Description

PATH detected no errors. PRIM reported an error to PATH.

PATH received an invalid command or parameters,

PATH detected invalid ppt-command parameters.

PATH Errors

When PATH detects an error of any type, it sets the status-report variable to

indicate an error, stores the label for the error in the status-arg-out variable, and sends the PAUSE command to the PRIM level. PATH does not complete

the execution of a path-point after detecting an error. (The ppt-done variable remains set to false.)

PATH utility routines set the status and status-arg variables. The calling

routine must set the status-report and status-arg-out variables.

10.5 THE PATH LEVEL

10-31
PATH Processing

The three processes for the PATH level are PRE-PROCESS, COMMAND-PROCESS, and

POST-PROCESS. PRE-PROCESS reads the command, status, and sensor inputs for

COMMAND-PROCESS. COMMAND-PROCESS, the decision-processing stage, interprets

the command and the command parameters, executes paths and path-points, and

sends commands to the command buffer of the PRIM level. POST-PROCESS sends

the TASK level confirmation for each command received and performs the "housekeeping" required to prepare PATH for the next command.

The output command from PATH to PRIM consists of a pose, configuration flags,

trajectory type, and trajectory parameters. The path-point routines in PATH

store the pose, configuration flags, and trajectory type in the variable ovmer

prim-com-var, and the trajectory parameters in the local template of the file

corresponding to the trajectory type. The POSE-ROUND and TRAJ-ROUND routines

in the POST-PROCESS stage of the PATH level put the trajectory parameters into

the PATH>PRIM round-robins.

PATH preprocessing

The PATH routine PRE-PROCESS calls NEW-COMMAND?, PRIM-STATUS, and TOOL-POSE-'

If you add sensors to your system, you can have PRE-PROCESS call your sensor

routines also.

NEW-COMMAND?

Input Variables

inc-command-#-in

old-inc-command-#-in

Output Variables

new-command

old-inc-command-#-in

status

status-arg

(

Sets the new-command flag to true if the value of inc-command-#-in has

changed since the last cycle. (That is, if inc-command-#-in does not

equal old-inc-command-#-in. ) NEW-COMMAND? also sets the status and

status-arg variables to noerror.

PRIM-STATUS

Input Variables

status-in

inc-command-#-out

inc-comraand-#-echo-in

Output Variables

prim-status

Sets prim-status to the same value as status-in if inc-command-#-out

matches inc-command-#-echo-in. This match indicates that the PRIM level

responded to the current command, and that the status-in variable represents the current PRIM status. If these variables do not match, PATH

sets prim-status to executing.

10.5 THE PATH LEVEL

10-32
TOOL-POSE-* '^ Input Variables

tp-cycles

rbt-pose-*

Output Variables

tool-pose-'^

Sets tool-pose-* to the best guess of the tool pose of the robot for the

current cycle. For the best guess, TOOL-POSE-* uses the pose stored in

the RBT-POSE round-robin tp-cycles before the current cycle.

PATH decision processing

The PATH routine COMMAND-PROCESS reads the input command and uses a case statement to determine which of the COMMAND-PROCESS commands to execute. If

the status-report variable indicates an error, COMMAND-PROCESS freezes the

error state and will not execute any command other than RESTART.

See "PATH Status Information" earlier in this chapter for a description of the

status information that the COMMAND-PROCESS routines return in the

status-report and status-arg-out variables.

PATH-RESTART

Input Variables

new-command

prim-status

Output Variables

prim-command-var

status-report

status-arg-out

Sends RESTART to the PRIM level and waits for prim-status to indicate

done.

PATH-PAUSE

Input Variables

new-command

prim-status

Sends PAUSE to the PRIM level.

Output Variables

prim-command-var

status-report

status-arg-out

PATH-PATH

Input Variables

new-command

prim-status

Input-command-var

Output Variables

prim-comraand-var

status-report

status-arg

10.5 THE PATH LEVEL

10-33
Initializes the PATH variables if new-command is true. Then, if the last

path-point is complete, PATH-PATH calls NEW-PPT? to retrieve the next

path-point and calls PATH-POINT to execute the path-point. If C

prim-status is error, PATH-PATH sets status-report to error, sets ^

status-arg to prim-error, and does not execute PATH-POINT.

NEW-PPT?

Input Variables Output Variables

ppt-done ppt-rec

last-ppt new-ppt

next-ppt-" last-ppt

ppt-done

path-done

next-ppt-''

Reads the next path-point record from the current path and sets flags

ppt-done, new-ppt, and last-ppt. NEW-PPT? stores the current path-point

information in ppt-rec, the PATH-POINT-FILE local template. NEW-PPT?

does not retrieve the ppt command parameter record; the path-point rou- tines (for example, GOTO) retrieve this record.

To indicate the start of a new path-point, NEW-PPT? sets new-ppt to true

during the cycle in which a path-point routine is retrieving a new pathpoint record. NEW-PPT? sets new-ppt to false during other cycles.

The path-point routines set ppt-done to true when they finish executing v

each path-point. NEW-PPT? sets ppt-done to false when it retrieves the

next path-point record.

NEW-PPT? sets last-ppt to true if the current path-point is the last

path-point in the current trajectory.

GOAL-POSE

Input Variables Output Variables

goal-type prim-com-conf-flag

goal-^ pose-add

obj-'' status

status-arg

Calculates the goal pose for the current path. If the goal-type is

invalid, GOAL-POSE sets status to error and status-arg to command-error.

C

10.5 THE PATH LEVEL

10-34
TRAJ-PHRASE

Input Variables

traj-type

traj-*

Output Variables

prlm-com- traj-type

traj para file local template

status

status-arg

Sets prim-com-traj-type to traj-type and retrieves the trajectory parameters and stores them in the local template of the corresponding file.

Your sensor routine can modify the trajectory parameters before PATH

sends them to PRIM so that sensor path-point servo algorithms can control

the velocity and acceleration of the robot.

TRAJ-PHRASE sets status to error and status-arg to ppt-para if the

traj-type parameter is invalid.

LOC-PHRASE

Input Variables

loc-type

loc-*

Output Variables

prim-com-pose

prim-com-conf-flag

status

status-arg

Interprets a location phrase in a path-point by calculating the pose for

the specified location and storing the pose in the prim-com-pose and

prim-com-conf-flag variables. LOC-PHRASE sets status to error and

status-arg to ppt-para if the loc-type parameter is invalid.

GOTO

Input Variables

ppt-rec

new-ppt

prim-status

Output Variables

prlm-com-var

traj para file local record

ppt-done

status

status-arg

Executes the goto path-point. If new-ppt is true, GOTO retrieves the ppt

parameters from GOTO-FILE and sets the specified pose and trajectory

parameters by calling LOC-PHRASE and TRAJ-PHRASE. If new-ppt is false,

GOTO waits for prim-status to indicate done and then sets ppt-done to

true.

10.5 THE PATH LEVEL

10-35
PATH postprocessing

The PATH routine POST-PROCESS sends the TASK level confirmation for each com- mand received and performs the "housekeeping" required to prepare PATH for the

next command. POST-PROCESS calls CLEAN-UP, POSE-ROUND, and TRAJ-ROUND.

CLEAN-UP

Input Variables

inc-command-#-in

cycle-count

input-command

Output Variables

inc-command-#-echo-out

cycle-#-status-out

command-echo

Echoes the command and inc-command-# to the TASK level.

POSE-ROUND

Input Variables

prim-com-pose

prim-com-conf-flag

path-pose-^

Output Variables

path-pose-*

goal-pose-*-out

PATH> PRIM-POSE round-robin

Puts prim-com-pose and prim-com-conf-flag into the PATH> PRIM-POSE

round-robin.

(

TRAJ-ROUND

Input Variables

prim-com-traj-type

traj-para-file-local-record

path-cart-*

path-joint-*

Output Variables

path-cart-*

path-Joint-*

traj-type-out

PATH> PRIM-CART round-robin

PATH> PRIM-JOINT round-robin

Puts the traj-para-file-local-record corresponding to prim-com-traj-type

into the PATH> PRIM-CART or PATH> PRIM-JOINT round-robin.

10.6 THE PRIM LEVEL

The PRIM level receives trajectories from the PATH level, transforms these

trajectories into positions, and sends these positions to the JOINT level.

The JOINT level converts the positions to the primitive commands sent to the

robot controller.

(

10.6 THE PRIM LEVEL

10-36
PRIM Commands

The following commands execute at the PRIM level: RESTART, PAUSE, and TRAJ.

This section explains the function and provides the syntax of each command.

RESTART command

The syntax of the RESTART command is:

RESTART

RESTART clears any error conditions, sets the hold-set variable to false, and

sends RESTART to the lower level, JOINT. After executing RESTART, PRIM

reports its status as executing until the JOINT level reports its status as done. When JOINT reports done, PRIM sets the current location to the feedback

position, sets the current velocity and acceleration to 0, and resets the

debug variables. Then PRIM reports done to PATH.

PAUSE command

The syntax of the PAUSE command is:

PAUSE

PAUSE sends the PAUSE command to JOINT when the joystick is inactive. The

PAUSE command ensures that JOINT performs its processing only when you are using the joystick. After executing PAUSE, PRIM reports its status as executing when the joystick is active, and done when the joystick is inactive.

TRAJ command

The syntax of the TRAJ command is:

TRAJ [traj-type] [traj-para-*] [goal-pose-*]

where :

• traj-type specifies the type of trajectory, either Cartesian or joint.

• traj-para-"^ points to the trajectory parameters.

• goal-pose-* points to the goal pose.

TRAJ executes the specified trajectory. The traj-type parameter can have a value of either or 1 as follows:

(Cartesian)

Specifies that the type of trajectory is a straight line in Cartesian

space from the start pose to the goal pose. While executing a Cartesian

TRAJ command, PRIM reports its status as executing until the system

10.6 THE PRIM LEVEL

10-37
detects that the actuator is within a specified range of the goal. The

variables trn-nbhrd and rot-nbhrd specify this range. After the system

verifies that the robot is within range, PRIM reports its status as done

to PATH.

(Joint)

Specifies that the type of trajectory is linear interpolation in joint

space from the start pose to the goal pose. While executing a joint TRAJ

command, PRIM reports its status as executing until the robot reports

that all joint angles are within the target range. The variable j-delta

specifies the target range for joint angles. PRIM reports its status as done when the system verifies that the joint angles are within range.

Note: The joint trajectory algorithm does not decelerate to a stop at

the goal. If the robot reaches the goal, it oscillates around the

goal rather than stops. Use the Cartesian trajectory algorithm to

stop the robot at a goal.

PRIM Input CCTnmand Buffer

The PRIM input command buffer consists of the following variables:

inc-command-#-in

PATH increments this integer variable each time it sends a new command to

the PRIM level.

input-command

PATH sends this integer variable to PRIM to identify the command. Commands are numbered as follows: 0-RESTART, 1 -PAUSE, and 2-TRAJ.

traj-type-in

PATH sends this integer variable to PRIM to indicate the type of

trajectory.

traj-^-in

PATH sends this integer pointer variable to PRIM to Identify the

trajectory parameters, which are in a file corresponding to the

trajectory type in traj-type-in.

goal-pose-^-in

This integer pointer variable identifies the current pose in POSE-FILE.

PRIM Status Information

To provide status feedback to the PATH level, the PRIM level returns a status

report and a feedback pose, and echoes the input command and its incremental

command number.

(

(

10.6 THE PRIM LEVEL

10-38
PRIM uses the following six variables to return status to the PATH level:

1

cycle-#-status-out

Returns the cycle count when PRIM returns its status. The changing value

of this integer variable verifies that the PRIM level is running.

inc-coinmand-#-echo-out

Echoes the integer count of new commands received by the PRIM level as indicated by the inc-command-#-in variable. This information enables

PATH to know for which command PRIM is returning status information.

command-echo-out

Echoes the string stored in inc-command-#-in. This information enables

you to know for which command PRIM is returning status information.

status-report

Returns the current status of PRIM,

variable and their meanings are:

The possible values for this integer

Value Meaning

executing

done

error

Description

The current command is still executing.

The current command is finished executing.

An error occurred. (See status-arg-out.)

t

status-arg-out

Returns the error status,

and their meanings are:

The possible values for this integer variable

Value Meaning

12

3

Note:

noerror

joint-error

command-error

hold

Description

PRIM detected no errors. JOINT reported an error to PRIM.

PRIM received an invalid command or parameters.

The HOLD-SET joystick button paused the robot.

The hold status argument is not an error. PRIM sets the

status-report variable to executing when you push the HOLD-SET

button. You can clear this status by pushing the HOLD-CLEAR

button or by sending the RESTART command to PRIM.

rbt-pose-''

Returns a pointer to the feedback pose calculated by adding the tool

movetable to the JOINT feedback pose.

•

PRIM Trajectory Information

RSL supports two types of trajectories: Cartesian straight-line and joint

interpolated. The PRIM level executes the Cartesian trajectories and the

JOINT level executes the joint trajectories. Therefore, this section discusses the joint trajectories only when they affect the execution of Cartesian

trajectories. See Section 10.7, "The Joint Level", for information on joint

trajectories.

10.6 THE PRIM LEVEL

10-39
The differences between the two types of trajectories can cause problems when

you follow one type of trajectory with the other. Ideally, the transition

from the tool-point velocity and acceleration of one trajectory to the next

should be as smooth as possible. To accomplish this smooth transition, PRIM

must track the output of the joint algorithm and maintain current information

on position and velocity.

To maintain current position and velocity data, PRIM uses the joint feedback

pose to update this data for the Cartesian trajectory algorithm during every

cycle of a joint trajectory motion. Because PRIM and JOINT execute on separate boards, communication timing delays the feedback pose information by one

cycle. Output commands incur an additional delay of one cycle. Therefore,

PRIM calculates the appropriate current position by adding twice the current

velocity (in inches per cycle) to the feedback pose. PRIM uses the history of

the feedback pose to calculate the approximate velocity.

Another problem arises during Cartesian motion. Because JOINT limits the

joint velocity and acceleration, the actual output from JOINT may be different

from the command that PRIM sends to JOINT. If JOINT reports its status as next-point or done, PRIM executes the trajectory routine to generate the next

point. However, if JOINT reports its status as executing, PRIM updates the

current position using the history of the feedback pose, rather than generating a new point. This procedure produces errors in the velocity and acceleration profiles, but minimizes path errors. To minimize velocity and acceleration profile errors, try to set the Cartesian trajectory parameters so that

JOINT does not have to limit them.

Joystick HOLD-SET and HOLD-CLEAR Buttons

The PRE-PROCESS stage of the PRIM level sets the hold-set variable to true

when you push the HOLD-SET button on the joystick controller. When the

hold-set variable is true, COMMAND-PROCESS ignores the input command (except

RESTART) and sends PAUSE to the JOINT level to stop the robot. In this case,

PRIM sets the status-report variable to executing and the status-arg-out variable to hold. When you push the HOLD-CLEAR button, PRIM sets hold-set to

false, sets new-command to true, and restarts the current input command.

PRIM Variables

This section describes internal PRIM variables.

joint-com-pose

This variable (along with joint-com-conf-flag) holds the current command

that PRIM is sending to JOINT. The joint-com-pose and current-pose variables may contain different values when JOINT is executing a joint trajectory or scaling a Cartesian point to limit the motion of the joint.

C

(

(

10.6 THE PRIM LEVEL

10-40
joint-com-conf-flag

The joint-com-conf-flag (along with joint-com-pose) holds the current

command that PRIM is sending to JOINT. The joint-com-conf-flag and

current-conf-flag variables may contain different values when JOINT is

executing a joint trajectory or scaling a Cartesian point to limit the

motion of the joint.

current-pose

This variable (along with current-conf-flag) holds the current position

of the robot. The command routine executing during the current cycle

sets the current-pose variable.

current-conf-flag

The current-conf-flag variable (along with current-pose) holds the current position of the robot. The command routine executing during the

current cycle sets the current-conf-flag variable.

current-vel

This six-element array holds the current velocity. The first three elements represent the rotation velocity vector and the last three elements

represent the translation velocity vector. The command routine executing

during the current cycle sets the current-vel variable.

last-pose

This variable holds the last position of the robot. At the beginning of

each cycle, PRE-PROCESS copies the value of current-pose to last-pose.

The command routines use last-pose as the current position when they

build a trajectory.

last-vel

This six-element array holds the last velocity. As with the current-vel

array, the first three elements of the last-vel array represent the rotation velocity vector and the last three elements represent the translation velocity vector. At the beginning of each cycle, PRE-PROCESS copies

the value of current-vel to last-vel. The command routines use last-vel

as the current velocity when they build a trajectory.

feedback-pose

PRIM transforms the feedback position from JOINT to the tool-point pose

and stores this information in the feedback-pose variable.

feedback-conf-flag

PRIM copies the feedback configuration flags from JOINT and stores this

information in the feedback-conf-flag variable.

last-feedback-pose

The last-feedback-pose variable (along with last-feedback-conf-flag)

holds the last feedback position. Before updating the feedback-pose

variable, PRE-PROCESS copies the value of feedback-pose to

last-feedback-pose

10.6 THE PRIM LEVEL

10-41
last-feedback-conf-flag

The last-feedback-conf-flag variable (along with last-feedback-pose)

holds the last feedback position. Before updating the feedback-conf-flag

variable, PRE-PROCESS copies the value of feedback-conf-flag to

last-feedback-conf-flag.

hold-set

This variable indicates the state of the HOLD-SET and HOLD-CLEAR buttons

on the joystick controller. The hold-set variable indicates true after

you press the HOLD-SET button, and false after you press the HOLD-CLEAR

button.

PRIM Errors

When PRIM detects an error of any type, it sets the status-report variable to

indicate an error, stores the label for the error in the status-arg-out variable, and sends the PAUSE command to the JOINT level. Error reporting overrides status reporting. PRIM does not send any commands to JOINT after

detecting an error. One exception to the above rule is if the current input

command is PAUSE and JOINT is reporting a joint-limit error, PRIM does not

report an error. In this case, the CREEP button on the joystick commands

CREEP to JOINT, clearing the error.

PRIM Processing

The three processes for the PRIM level are PRE-PROCESS, COMMAND-PROCESS, and

POST-PROCESS. PRE-PROCESS reads the command, joystick status, and JOINT

status, and prepares for COMMAND-PROCESS. COMMAND-PROCESS, the decisionprocessing stage, interprets the command and the command parameters, and sends

joint commands to the command buffer of the JOINT level. POST-PROCESS sends

the PATH level confirmation for each command received and performs the "housekeeping" required to prepare PRIM for the next command.

(

PRIM preprocessing

The PRIM routine PRE-PROCESS calls NEW-COMMAND?, JOY-STATUS, and JOINT-STATUS.

NEW-COMMAND?

Input Variables

inc-command-#-in

old-inc-command-#-in

Output Variables

new-command

old-inc-command-#-in

status

status-arg

Sets the new-command flag to true if the value of inc-command-#-in has

changed since the last cycle. (That is, if inc-command-#-in does not

equal old-inc-command-#-in. ) NEW-COMMAND? also sets the status and

status-arg variables to noerror.

10.6 THE PRIM LEVEL

10-42
•

JOY-STATUS

Input Variables Output Variables

hold-set joy- la

joystick ports joy- lb

joy-2a

joy-2b

hold-set

joy-status

new-command

Reads the joystick ports and stores the binary image of the switches in

the variables joy- la, joy- lb, joy-2a, and joy-2b. (See Appendix F,

"Joystick Schematics", for more information.) JOY-STATUS sets the

joy-status variable to active if the joystick enable switch is on and a motion switch is active. JOY-STATUS sets the joy-status variable to

inactive if the joystick enable switch is off or a no-motion switch is

active.

JOY-STATUS sets the new-command variable to true if the hold-clear switch

is active and the hold-set variable indicates true. If the hold-set

switch is active, JOY-STATUS sets the hold-set variable to true. If the

hold-clear switch is active, JOY-STATUS sets the hold-set variable to

false.

m JOINT-STATUS

Input Variables Output Variables

status-in prim-status

inc-command-#-out feedback-pose

inc-command-#-echo-in feedback-conf-flag

joint-pose-* RBT-POSE round-robin

tool movetable

Sets joint-status to the same value as status-in if inc-command-#-out

matches inc-command-#-echo-in. This match indicates that the JOINT level

has responded to the current command, and that the status-in variable

represents the current JOINT status. If these variables do not match,

PRIM sets joint-status to executing.

If the current input command is not RESTART, JOINT-STATUS does two

things. First, it adds the specified tool movetable to the joint feedback pose and places this combination in the RBT-POSE round-robin and in

the feedback-pose variable. By checking for the RESTART conmiand, PRIM

avoids trying to add the tool movetable to a meaningless pose. Second,

JOINT-STATUS copies the values of the feedback configuration flags to the

RBT-POSE round-robin and the feedback-conf-flag variable.

10.6 THE PRIM LEVEL

10-43
PRIM decision processing

If the hold-set variable is false and the status-report variable does not f"

indicate an error, the PATH routine COMMAND-PROCESS uses a case statement to

determine which of the commands in this section to execute. If hold-set is

true and input-command is not RESTART, COMMAND-PROCESS commands JOINT to

pause. If the status-report variable indicates an error, COMMAND-PROCESS

freezes the error state and does not execute any command other than RESTART.

PRIM-RESTART

Input Variables Output Variables

new-command joint-command

joint-status inc-command-#-out

hold-set

current-pose

current-conf-flag

current-vel

debug variables

Checks if new-command is true and, if so, sets the value of the

joint-command variable to joint-restart, increments inc-command-#-out,

sets hold-set to false, and resets the debug variables. If new-command

is false, PRIM-RESTART waits for joint-status to indicate done and then

sets current-vel to zero and sets current-pose and current-conf-flag to

the combination of the feedback pose and the tool movetable. ^-

PRIM-PAUSE

Input Variables Output Variables

new-command joint-com-pose

joint-status joint-com-conf-flag

status-arg-in joint-command

joy-status inc-command-#-out

joy-la current-pose

joy- lb current-conf-flag

joy-2a current-vel

joy-2b

Checks if new-command is true and, if so, sets the value of the

joint-command variable to joint-pause, increments inc-command-#-out, and

sets current-vel to 0. If new-command is true and joy-status is active,

PRIM-PAUSE increments the inc-command-#-out variable and calls JOYSTICK

and STRAIGHT-LINE to interpret the joystick command. If new-command is

true and joy-status is inactive, PRIM-PAUSE sets the current velocity and

acceleration to 0.

10.6 THE PRIM LEVEL

10-44
If the value of Joint-status is error and the value of status-arg is

Joint-error when you press the CREEP button on the joystick console,

PRIM-PAUSE sets the Joint-command variable to joint-creep and increments

inc-command-#-out. In response to other error conditions, PRIM-PAUSE

sets Joint-command to PAUSE.

TRAJ

Input Variables

last-pose

last-vel

traj-type-in

traJ-'^-in

goal-pose-*-in

Output Variables

Joint-com-pose

Joint-com-conf-flag

Joint-command

inc-command-#-out

current-pose

current-vel

Calls CART-TRAJ or JOINT-TRAJ depending on whether the value of the

traj-type-in variable is cart or joint.

CART-TRAJ

Input Variables

last-pose

last-vel

traJ-^-in

goal-pose-^-in

Output Variables

Joint-com-pose

Joint-com-conf-flag

joint-command

inc-command-#-out

current-pose

current-conf-flag

current-vel

Executes the specified Cartesian straight-line trajectory. CART-TRAJ

calls STRAIGHT-LINE to build the trajectory and monitors the joint

status. In response to any error conditions, CART-TRAJ sets jointcommand to PAUSE.

JOINT-TRAJ

Input Variables

traj-*-in

goal-pose-*-in

status-in

Output Variables

Joint-com-pose

joint-com-conf-flag

joint-command

inc-command-#-out

current-pose

current-conf-flag

current-vel

#

10.6 THE PRIM LEVEL
Sends a joint trajectory to the JOINT level and monitors joint status.

In response to any error conditions, JOINT-TRAJ sets joint-command to

PAUSE. ^

JOYSTICK

Input Variables Output Variables

joy- la Rg

joy- lb xg

joy-2a vmax

joy-2b amax last-pose wmax

gmax

Adds the motion indicated by the joystick to last-pose and stores the

result in Rg and xg for use by STRAIGHT-LINE. JOYSTICK sets vmax to the

value resulting from the equation (joy-max-v) • 2**(-vel) and sets wmax

to the value resulting from the equation (joy-max-w) • 2**(-vel), where

vel represents the setting of the velocity switch on the joystick.

JOYSTICK sets variables amax and gmax equal to vmax and wmax,

respectively.

STRAIGHT-LINE

Input Variables Output Variables ^

Rg current-pose

xg current-vel

vmax amax wmax

gmax

last-pose

last-vel

Executes the straight-line algorithm.

PRIM postprocessing

The PRIM routine POST-PROCESS sends to the PATH level confirmation for each

command received and performs the "housekeeping" required to prepare PRIM for

the next command. POST-PROCESS calls CLEAN-UP and, if the current command is

not RESTART, calls COMMAND-RR.

10.6 THE PRIM LEVEL

10-46
CLEAN-UP

Input Variables Output Variables

input-command-var output-status-var

Echoes the command and inc-command-# to the PATH level.

COMMAND-RR

Input Variables Output Variables

joint-com-pose PRIM> JOINT-POSE round-robin

joint-com-conf-flag PRIM>JOINT-TRAJ round-robin

joint-rec

Adds the inverse tool movetable to the contents of the joint-com-pose

variable and puts the resulting pose and the joint trajectory parameters

in the PRIM> JOINT round-robins.

10.7 THE JOINT LEVEL

The JOINT level receives positions expressed in Cartesian coordinates from the

PRIM level, transforms these positions to robot joint coordinates, and controls joint velocities and accelerations.

The design of the JOINT level is modular so that you can replace the existing

robot-dependent modules (the interface routines and transforms) with new modules designed to control your specific robot.

The two basic modes of motion for JOINT are Cartesian-space motion and jointspace motion. In the Cartesian-space mode, the PRIM level interpolates

Cartesian paths between the start and end positions by generating and executing a new point along a Cartesian path each cycle. The JOINT level transforms

each path-point to joint coordinates and, if necessary, scales the move to

meet velocity and acceleration limits.

In the joint-space mode, the PRIM level passes the goal position from the PATH

level to the JOINT level. The JOINT level generates a joint-interpolated trajectory to the goal position.

The routines that the JOINT level executes fall into two categories:

robot-independent and robot-dependent. The functions of the robot-independent

routines do not change if you use a different robot. The functions of the

robot-dependent routines are specific to the Puma 760 robot. You must provide

your own routines to accommodate other robots.

10.7 THE JOINT LEVEL

10-47
JOINT CcHmnands

The following commands execute at the JOINT level: RESTART, PAUSE, CARTESIAN, I JOINT-TRAJ, and CREEP. This section provides the syntax and explains the ^ function of each command.

RESTART command

The syntax of the RESTART command is:

RESTART

RESTART clears all errors, sets the current joint velocity and acceleration to

0, and resets the debug variables. When the robot interface reports its

status as done, RESTART reads the feedback joint values and then sends these

values back to the JOINT level on succeeding cycles to maintain the current

position. RESTART ignores acceleration limits.

While executing RESTART, the JOINT level reports its status as executing until

the robot interface reports done. Then JOINT reports done to PRIM.

PAUSE command

The syntax of the PAUSE command is:

PAUSE

PAUSE continues sending the most recently commanded joint values to the robot

interface. PAUSE ignores acceleration limits. After sending PAUSE, JOINT

reports its status as done immediately.

CARTESIAN command

The syntax of the CARTESIAN command is:

CARTESIAN [pose-"]

where:

• pose-"" points to the position to which the robot is being moved.

CARTESIAN is best used to move through a series of points in a Cartesian

motion, where the distances between successive points are small. JOINT transforms each pose it receives from PRIM into a set of goal joint values and

moves the robot to the position indicated by pose-'*. If necessary, JOINT

scales the commanded trajectory to stay within the specified hardware limitations as it interpolates each step along the trajectory.

10.7 THE JOINT LEVEL

10-i|8
While executing CARTESIAN, JOINT reports its status as executing if the interpolated step size is larger than the system parameter next-point-scalethreshold. PRIM should not send any new points to JOINT when the JOINT status

is executing.

If the step size is the same or smaller than this system parameter, JOINT

reports its status as next-point. The next-point status indicates that PATH

should send the next Cartesian step on the next cycle.

JOINT reports its status as done when the commanded joint values equal the

goal joint values. The done status indicates that PRIM should send a new goal

point on the next cycle.

JOINT-TRAJ command

The syntax of the JOINT-TRAJ command is:

JOINT-TRAJ [pose-"] [traj-para-"]

where:

• pose-" points to the position to which the robot is being moved.

• traj-para-" points to the trajectory parameters.

JOINT-TRAJ is best used to move through large joint-interpolated path segments. JOINT transforms each pose it receives from PATH into a set of goal

joint values and moves the robot to the position indicated by pose-". If

necessary, JOINT scales each step to stay within the limitations specified by

traj-para-" as it interpolates the trajectory. While executing JOINT-TRAJ,

JOINT reports its status as executing if the commanded joint values are outside the range of the goal joint values specified by the j-delta variable.

JOINT reports done after the coimnanded values are within the j-delta range.

CREEP command

The syntax of the CREEP command is:

CREEP

CREEP recovers from the joint-limit error state by commanding all joints that are within the creep-delta distance from a joint limit to move away slowly

from the limit at a speed specified by creep-vel. The creep-delta distance

and the creep-vel velocity are user-defined values.

While executing CREEP, JOINT reports its status as executing until all joint

movements are complete. Then CREEP reports done.

10.7 THE JOINT LEVEL

10-^49
JOINT Input Conmand Buffer

The JOINT input command buffer consists of the following variables:

inc-comman(i-#-in

PRIM increments this integer variable each time it sends a new command to

JOINT.

input-command

PRIM sends this integer to JOINT to identify the command. Commands are numbered as follows: 0-RESTART, 1 -PAUSE, 2-CARTESIAN, 3-JOINT-TRAJ , and

^-CREEP.

pose-^-in

PRIM sends JOINT this pointer to the commanded pose in POSE-FILE.

traj-^-in

PRIM sends JOINT this pointer to the traj-para in the PRIM> JOINT-TRA

J

round-robin.

JOINT Status Information

To provide status feedback to the PRIM level, the JOINT level returns a status

report, returns a feedback pose, and returns echoes of the input command and

its incremental command number.

JOINT uses the following six variables to return status information to the

PRIM level:

cycle-#-status-out

Returns the cycle count when JOINT returns its status. The changing

value of this integer variable verifies that the JOINT level is running.

inc-command-#-echo-out

Echoes the integer count of new commands received by the JOINT level as indicated by the inc-command-y/-in variable. This information enables

PRIM to know for which command JOINT is returning status information.

command-echo-out

Echoes the integer stored in inc-command-#-in. This information enables

PRIM to know for which command JOINT is returning status information.

status-report

Returns the current status of JOINT. The possible values for this integer variable and their meanings are:

Value Meaning Description

executing The current point is still executing.

1 done The joint has reached its goal location.

2 error An error occurred. (See status-arg-out.

)

3 next-point The joint reached an intermediate path-point.

10.7 THE JOINT LEVEL

10-50

i
status-arg-out

Returns the error status. The possible values for this integer variable

and their meanings are:

Value Meaning Description

noerror PRIM detected no errors.

1 lower-level The servo reported an error to JOINT.

2 command-error JOINT received an invalid command or parameters.

3 joint-limit A joint has reached its limit.

U reach-limit The goal pose is outside the reach of the robot.

5 configuration The commanded configuration is invalid.

pose-*-out

Contains the pointer to the feedback pose, which is the output joint val- ues transformed to the wrist pose. During the execution of a RESTART

command, the feedback pose gives the startup position of the robot. During the execution of the CARTESIAN and JOINT-TRAJ commands, the feedback

pose can update the Cartesian trajectory routines with the actual com- manded position.

JOINT Errors

When JOINT detects an error of any type, it sets the status variable to indicate an error, stores the label for the error in the status-arg-out variable,

and sends the last valid joint values to the robot. At this point, COMMANDPROCESS does not execute any command other than RESTART, with one exception.

If the error is joint-limit, COMMAND-PROCESS allows the CREEP command to correct the error.

JOINT ProcesalDg

The three processes for the JOINT level are PRE-PROCESS, COMMAND-PROCESS, and

POST-PROCESS. PRE-PROCESS reads the command from the PATH level and the

status from the servo. COMMAND-PROCESS, the decision-processing stage, calculates trajectories for robot motion and scales the motion to meet velocity and

acceleration limits. POST-PROCESS sends the JOINT level confirmation for each

command received and performs the "housekeeping" required to prepare JOINT for

the next cycle.

JOINT preprocessing

The JOINT routine PRE-PROCESS calls NEW-COMMAND? and SERVO-STATUS.

10.7 THE JOINT LEVEL

10-51
NEW-COMMAND?

Input Variables

inc-command-#-in

old-inc-command-#-in

Output Variables

new-command

old-inc-command-#-in

status

status-arg

Sets the new-command flag to true if the value of inc-command-#-in has

changed since the last cycle (That is, if inc-command-#-in does not

equal old-inc-command-#-in. ) NEW-COMMAND? also sets the status and

status-arg variables to noerror.

SERVO-STATUS

Input Variables

inc-command-#-out

inc-Gommand-#-echo-in

status-in

Output Variables

servo-status

Checks if the values of inc-command-#-out and inc-command-#-echo-in are equal (indicating that status-in contains the status of the last com- mand). If these values are equal, SERVO-STATUS sets the value of

servo-status to the value of status-in. If these values are not equal,

SERVO-STATUS sets the value of servo-status to executing.

JOINT decision processing

If the status-report variable does not indicate an error, the JOINT routine

COMMAND-PROCESS uses a case statement to determine which of the routines in

this section to execute. If the status-report variable indicates an error

other than joint-limit, COMMAND-PROCESS freezes the error state and does not

execute any command other than RESTART. COMMAND-PROCESS allows CREEP to execute if the error is joint-limit.

JOINT-RESTART

Input Variables

joints-in

new-command

servo-status

Output Variables

output-command

inc-command-#-out

servo-com-joint

status-report

v-current

overflow cycle

max-process-time

min-process-time

10.7 THE JOINT LEVEL

10-52
•

•

•

Checks if new-command is true and, if so, sets the value of the

output-command variable to RESTART, increments inc-command-#-out, sets

v-current to 0, and resets the debug variables. If new-command is false,

JOINT-RESTART waits for servo-status to indicate done and then calls

READ-SERVO-STATUS to set servo-com-joint to the feedback joint values.

JOINT-PAUSE

Input Variables Output Variables

none inc-command-#-out

v-current

Pauses the robot, leaves the current joint values unchanged in the

servo-com-joint variable, sets v-current to 0, and increments

inc-command-#-out

.

CARTESIAN

Input Variables Output Variables

pose-'^-in servo-com-joint

v-current v-current

old-ja

Retrieves the commanded pose and configuration flags, calls CART> JOINT

and CART-CONFIGURE to convert the pose to joint values, calls SCALE to

limit the joint velocities and accelerations (using the hardware maximum

limits), stores the result in servo-com-joint, and calls JOINT-LIMITTEST. If JOINT-LIMIT-TEST does not result in an error, CARTESIAN increments inc-command-#-out. If JOINT-LIMIT-TEST results in an error,

CARTESIAN sets the value of servo-com-joint to that of old-ja.

JOINT-TRAJ

Input Variables Output Variables

pose-^-in servo-com-joint

traj-'^-in v-current

v-current

old-ja

Retrieves the commanded pose, configuration flags, and trajectory parameters; calls CART> JOINT and JOINT-CONFIGURE to convert the pose to joint

values; calls SCALE to limit joint velocities and accelerations (using

the commanded trajectory parameters), stores the result in

servo-com-joint, and calls JOINT-LIMIT-TEST. If JOINT-LIMIT-TEST does

not result in an error, JOINT-TRAJ increments inc-command-#-out. If

JOINT-LIMIT-TEST results in an error, JOINT-TRAJ sets the value of

servo-com-joint to that of old-ja.

10.7 THE JOINT LEVEL

10-53
(

SCALE

Input Variables Output Variables

xg servo-com-joint

scaling-var scaling-var

Scales the step from servo-com-joint to xg to meet the velocity and

acceleration limits, and ensures that the joint motions are coordinated

to reach their goals simultaneously.

JOINT postprocessing

The JOINT routine POST-PROCESS sends to the PRIM level confirmation for each

command received, and performs the "housekeeping" required to prepare JOINT

for the next command. POST-PROCESS calls CLEAN-UP and, if the

input-command-var is not RESTART (or if the command is RESTART and the

status-report variable indicates done), calls FEEDBACK-POSE and

SET-SERVO-COMMAND

CLEAN-UP

Input Variables Output Variables

input-command-var output-status-var ^ v-current v-previous

servo-com-joint old-ja

Echoes the command and inc-command-# to the PRIM level, sets the value of

v-previous to that of v-current, and sets the value of old-ja to that of

servo-com-joint

FEEDBACK-POSE

Input Variable Output Variable

servo-com-joint RBT-POSE round-robin

Calls JOINT>CART to transform the value of servo-com-joint to a pose, and

stores that pose in the RBT-POSE round-robin.

JOINT Robot-Dependent Routines

The following commands control JOINT operations that are specific to the type

of robot the system is controlling. You must edit or replace these routines

to accommodate different robots.

10.7 THE JOINT LEVEL

10-54
READ-SERVO-STATUS

mk Input Variable

jolnt-in

Output Variable

servo-com- joint

READ-SERVO-STATUS converts the value of the jolnt-ln variable from the

servo format to radians and returns the converted value in

servo-com-joint

.

SET-SERVO-COMMAND

Input Variable

servo-com-joint

Output Variable

joint-out

SET-SERVO-COMMAND scales the value of the servo-com-joint value from

radians to the servo format and returns the converted value in joint-out,

REACH-CHECK

Input Variable

pose

Output Variable

status

status-arg

REACH-CHECK checks the pose variable to see if the commanded pose is

within the work volume of the robot. If the pose is not within the work

volume of the robot, REACH-CHECK sets the status variable to error and

the status-arg variable to reach-limit.

JOINT-LIMIT-TEST

Input Variable

servo-com-joint

Output Variable

status

status-arg

JOINT-LIMIT-TEST tests the servo-com-jolnt variable to see if it exceeds

the joint limits. If the servo-com-jolnt value exceeds the joint limits,

JOINT-LIMIT-TEST sets the status variable to error and the status-arg

variable to joint-limit.

JOINT>CART

Input Variable

servo-com-jolnt

Output Variable

pose

conf-flag

10.7 THE JOINT LEVEL

10-55
JOINT>CART transforms the value of servo-corn- joint to a pose and stores

the result in the pose and conf-flag variables.

CART> JOINT

Input Variable

pose

conf-flags (POSE-FILE local

template)

Output Variable

xg (goal joint values)

status

status-arg

CART> JOINT converts the value of the pose and configuration flags to

joint values and stores the result in xg, the goal joint values variable.

The conf-flag variable contains the configuration flags it reads from the

POSE-FILE local template.

In addition to the pose and conf-flag variables, CART> JOINT uses the

old-ja variable to determine the new joint values. The variable old-ja

stands for old-joint-angle. It holds the commanded joint values from the

previous cycle. It is set to servo-com-joint by POST-PROCESS. This process is similar to the way PRIM handles current versus old position and

velocity. See the transform documentation for your robot for details on poses and configurations.

Warning: CART> JOINT may generate a floating-point error interrupt that

aborts the control process if the pose is outside the work area

of the robot. Use REACH-CHECK to test the pose before using , CART> JOINT. (See also REACH-CHECK.) W

CART-CONFIGURE

Input Variable

xg

old-ja

Output Variable

xg

CART-CONFIGURE reads xg and old-ja and then modifies xg to minimize joint

motion by taking advantage of multiple configurations for the same pose.

See the transform documentation for your robot for definitions of

configurations

.

JOINT-CONFIGURE

Input Variable

xg

conf-flag

Output Variable

xg

JOINT-CONFIGURE reads xg and conf-flag and modifies the transform output

to match the commanded configuration. See the transform documentation

for your robot for definitions of configurations. (

10.7 THE JOINT LEVEL

10-56
Chapter 11

RSL EXTENSIONS

This chapter discusses how to incorporate user extensions to RSL. It assumes

that you have loaded the NBS-supplied system tape as described in Section 5.5,

"Software Installation Procedure", and that you have not yet modified the

code. "^

The extensions described in this chapter are extensions made while developing

RSL. The code is included as part of RSL on your system tape. To understand

the general procedures for making similar extensions to RSL, refer to the

blocks mentioned in this chapter.

11.1 UNDERSTANDING THE TYPES OF EXTENSIONS

RSL was developed in the context of the transfer task application and may be

inappropriate for other applications, such as tracing an object for a deburring operation. To overcome these potential limitations, you can extend the

RSL application by adding new tasks, paths, path-points, and trajectories to

the existing RSL control structure.

For example, you need a new trajectory for any type of motion other than

Cartesian straight-line or joint interpolated, such as circular motion. You

need new path-points whenever you add another sensor to the system. VHien you

develop a new application, both new tasks and new paths are required to

provide a hierarchical decomposition of that application.

After you understand the basic procedures, you may want to make more complex

extensions to RSL. For example, you can modify RSL to perform a quick change

operation that changes the tool movetable while a task is executing, or you

can add the ability to download RSL programs from a supervising computer. You

can also add new control levels, execute control levels in parallel, or run

two robots simultaneously.

11.2 ADDING A TASK TO RSL

You can extend RSL by adding a new task. Adding a task is a complex operation, that usually involves adding additional paths and path-points. This

section describes how to add the MOVE-TO task as if it were a new extension to

RSL, assuming the move-to path and goto path-point are present.

The syntax for the MOVE-TO task is:

MOVE-TO [object] [grip#] [destination location type] [destination]

[sector]

The MOVE-TO task issues a move-to path, using the current location as the

starting location. If the destination location type is an array (arr), then

the destination is the array sector given by the optional parameter sector.

MOVE-TO updates the current location when it completes the path. Refer to the

indicated blocks on the system tape for the actual MOVE-TO code.

11.2 ADDING A TASK TO RSL

11-1
To add the MOVE-TO task to RSL, you must make four additions. Table 11-1

lists the additions and their associated block numbers. These routines are

all on the TASK level on the TASK&PATH board. The block numbers listed assume

that you are on the TASK&PATH board with the OFFSET set at 9000. Remember

that you have to update the directory/load blocks when you add new routines to

RSL.

Table 11-1. Additions for the MOVE-TO Task.

Routine Addition

MOVE-TO Add this routine to execute the task, send a move-to path

to the PATH level, and wait for the PATH level to report

status done. Refer to block 513 for the routine MOVE-TO.

MOVE-TO-PARAM Add this routine to read the input parameters, looking up

record numbers in the object and location files. Refer to

blocks 511 and 512 for the routine MOVE-TO-PARAM.

MOVE-TO-SEARCH Add this routine to search for the proper MOVE-TO-FILE

record. Refer to block 402 for the routine MOVE-TO-SEARCH.

COMMAND-PROCESS Add MOVE-TO to the if-then-else list of legal commands that

the RSL routine COMMAND-PROCESS uses to execute tasks on

the TASK level. COMMAND-PROCESS is in block 591.

11,3 ADDING A PATH TO RSL

You can extend RSL by adding a new path. This section describes how to add

the move-to path type as if it were a new addition to RSL. Note that lowercase move-to is a path type and not the same as the MOVE-TO task described in

Section 11.2, "Adding a Task to RSL".

The syntax for the move-to path type is;

-path- [move-to] [object] [grip#] [start location type] [start location]

[destination location type] [destination location]

The move-to path type moves the robot quickly from near the start location to near the destination location. The approach and depart path types move the

robot when it is near the start location or the destination location. Refer

to the indicated blocks on the system tape for the actual move-to code.

Remember that you have to update the directory/load blocks when you add new

routines to RSL.

The following steps use the move-to path as an example of the general procedure you follow to add a similar path to RSL. The block numbers listed assume

that you are on the RSL board with the OFFSET set at 8000.

11.3 ADDING A PATH TO RSL

11-2
1. Define an RSL data structure for the new path type by creating a SMACRO

variable owner that lists the parameters for the new path type. The variable owner defines the record format for the move- to data structure file,

described in Section 9.2, "RSL Overview".

Insert the new file declaration in an empty block between blocks 14 1 and

149, the blocks reserved for RSL path-type file declarations. List block

141 to see the move-to path parameter file MOVE-TO-FILE.

2. Add the new path type to the list of legal path types. Block 195 contains

the sequential variable owner path-type-list that defines the legal RSL

path types. List block 195 to see the addition of the move-to sequential

variable to the path-type-list owner.

3. Add a routine that compiles the path parameters and starts the path-point

(ppt) list. The routine reads the new command and all its parameters,

looks up the record numbers for the locations and object, and creates a path-point list in the RSL PATH-POINT-FILE. The routine should store the

results of reading the command in the file created in Step 1 . List blocks

411 and 412 to see the routine MOVE-TO.

List blocks 413 and 4l4 to see the optional routine 7M0VE-T0 that displays

information about all currently defined move-to paths. You can create a similar routine for other path types.

4. Add the new path type to the case statement in the RSL routine -path- that

starts compiling an RSL path. List block 491 to see the move-to path type

in the case statement.

5. Initialize the new path file created in Step 1, by using the SMACRO file

operator ~re-init-file. List block 993 to see the initialization of the

MOVE-TO-FILE.

11.4 ADDING A PATH-POINT TO RSL

You can extend RSL by adding a new path-point. This section describes how to

add a range path-point that positions the tool point at a given distance from

a surface, using a sonar range finder. Although the range path-point is

included with RSL, you cannot use this path-point without a sonar and additional hardware circuitry to enable RCS to read the range.

The syntax for the range path-point is:

-ppt- range [sonar#] [range] [threshold] [{X, Y, Z}] [loc-phrase]

[traj-phrase]

The range path-point translates the tool point along the axis of the

loc-phrase frame, until the range read by the specified sonar is within the

threshold of the range. Refer to the indicated blocks on the system tape for

the actual range code.

11.4 ADDING A PATH-POINT TO RSL

11-3
Remember that you have to update the directory/load blocks when you add new

routines to RSL. To add the range path-point, you have to add code on the RSL

board and the TASK&PATH board.

Adding Code on the RSL Board

The following steps describe the additions you need to make on the RSL board

to add the range path-point or a similar path-point to RSL. The block numbers

listed assume that you are on the RSL board with the OFFSET set at 8000.

1

.

Define an RSL data structure for the new path-point by creating a SMACRO

variable owner that lists the parameters for the new path-point. The var- iable owner defines the record format for a new data structure file, similar to the data structures defined in Section 9.2, "RSL Overview".

Insert the new file declaration in an empty block between blocks 161 and

169, the blocks reserved for RSL path-point command parameters file declarations. List block 162 to see the range path-point parameter file

RANGE-FILE.

2. Add the new path-point to the list of legal path-points. Block 192 contains the sequential variable owner ppt-command-list that defines the

legal RSL path-points. List block 192 to see the addition of the range

path-point to the ppt-command-list owner.

3. Add a routine to compile the new ppt, read ppt syntax fields, look up the

record numbers for the location, and add records to the trajectory, range,

and path-point files. The routines must read and check all of the ppt

syntax fields before storing any records. You must leave the files in a clean state in case any errors occur in the ppt syntax fields. List block

3^3 to see the routine RANGE.

4. Add a garbage collection routine to remove records added by the routine in

Step 3. The routine should remove the records when a path containing a range ppt is redefined. List block 3^4 to see the routine RANGE-REMOVE.

5. Add the new path-point to the case statement in the RSL routine -ppt- that

defines path-points. List block 391 to see the addition of the range

path-point to the case statement.

6. Add the garbage collection routine in Step k to the case statement in the

RSL routine PPT-REMOVE. List block 395 to see the addition of the routine

RANGE-REMOVE to the case statement.

7. Initialize the new path-point file created in Step 1, by using the SMACRO

file operator ~re-init-file. List block 993 to see the initialization of

the RANGE-FILE.

11.4 ADDING A PATH-POINT TO RSL

11-4
Adding Code on the TASK&PATH Board

The following steps describe the additions you need to make on the TASK&PATH

board to add the range path-point or a similar path-point to RSL. All the

additions on the TASK&PATH board are to the PATH level. The block numbers

listed assume that you are on the TASK&PATH board in the PATH vocabulary with

the OFFSET set at 10000.

1. Add the variables needed to execute routines for the new path-point. The

variables you need to add depend heavily on the type of path-point you are adding to RSL. List block 141 to see the variables needed for the range

path-point. List block 142 to see the additional variables that give

addresses of the ports for the sonar interface, and some constants used in

the interface protocol.

2. Add any routines needed to process information from a sensor. These rou- tines depend heavily on the path-point and sensor you are adding to RSL.

List block 251 to see the addition of the range path-point routine SONARPORT-INIT that initializes the sonar interface port. List block 252 to see the addition of the routine SONAR-READ that reads the sonar range,

converts the range to inches, and stores the result in sonar-range.

3. Add any read routines specified in Step 2 to the RSL routine PRE-PROCESS.

List block 299 for the addition of SONAR-READ to the PRE-PROCESS routine

for the PATH level. This addition enables you to read the sonar every

cycle, making data available as soon as needed. (The SONAR-READ routine

is currently commented out.)

4. Add the command routines needed to execute the new path-point in empty

blocks between blocks 300 and 399. For the range path-point, list block

331 to see the routine TRANSLATE, which translates the current tool pose

by a specified delta along the specified axis. TRANSLATE stores the

result in prim-com-pose.

List block 332 to see the routine HALT, which sets prim-com-pose to the

current tool pose and sets the neighborhood fields of the current trajectory template to 0. HALT commands the robot to halt at the current tool

pose.

List block 411 to see the routine R-NEW-PPT, which retrieves the range

path-point parameters and initializes the range path-point variables.

List blocks 412 and 4l3 to see the routine RANGE, which executes the range

path-point.

5. Initialize the new path-point routines and variables. List blocks 982 and

983 to see the initialization of these variables and routines for the

range path-point.

11.4 ADDMG A PATH-POINT TO RSL

11-5
11.5 ADDING A TRAJECTORY TYPE TO RSL

You can extend RSL by adding a new trajectory type. This section describes

how to add a servo trajectory type to RSL. The code that implements this

trajectory type is included on the system tape and is loaded when you load

RSL.

The syntax for the servo trajectory phrase is:

servo [sensor-mtb] [inv-sensor-mtb] [goal-mtb] [trn-max-acc]

[trn-max-vel] [trn-min-vel] [max-range] [trn-nbrhd] [rot-max-acc]

[rot-max-vel] [rot-min-vel] [max-angle] [rot-nbrhd]

The servo trajectory type moves the sensor toward the goal (target pose plus

goal-mtb). The servo trajectory reports done when the robot is within the

neighborhood you specify in trn-nbrhd and rot-nbrhd. Servo decreases the

translation velocity linearly from trn-max-vel (for ranges greater than or equal to the max-range) to trn-min-vel at the goal (range=0). Servo decreases

the rotation velocity linearly from rot-max-vel (for angles greater than or equal to max-angle) to rot-min-vel at the goal (angle=0). Refer to the indicated blocks on the system tape for the actual servo code.

Remember that you have to update the directory/load blocks when you add new

routines to RSL.

To add the servo trajectory type, you have to add code on the RSL board, the

TASK&PATH board, and the PRIM board.

Adding Code on the RSL Board

The following steps describe the additions you need to make on the RSL board

to add the servo trajectory type or a similar trajectory to RSL. The block

numbers listed assume that you are on the RSL board with the OFFSET set at

8000.

1

.

Define an RSL data structure for the new trajectory type by creating a SMACRO variable owner that lists the parameters for the new trajectory

type. The variable owner defines the record format for a new data structure file, similar to the data structures defined in Section 9.2, "RSL

Overview".

Insert the new routine in an empty block between blocks 121 and 129, the

blocks reserved for RSL trajectory file declarations. List block 123 to see the servo trajectory-parameter file SERVO-FILE.

2. Add the new trajectory type to the list of legal trajectory types. Block

19^ contains the sequential variable owner traj-list that defines the

legal RSL trajectory types. List block 194 to see the addition of the

servo sequential variable to the traj-list owner.

11.5 ADDING A TRAJECTORY TYPE TO RSL

11-6
3. Add a routine to read the new command and all its parameters. The routine

should store the results of reading the command in the local template of

the file created in Step 1. List block 322 to see the routine

READ-SERVO-TRAJ.

4. Add the routine created in Step 3 to the case statement in the RSL routine

READ-TRAJ-PHRASE. List block 337 to see the addition of READ-SERVO-TRAJ

to the case statement.

5. Add the routine created in Step 1 to the case statement in the RSL routine

STORE-TRAJ-PHRASE . List block 338 to see the addition of SERVO-FILE to

the case statement.

6. Add the routine created in Step 1 to the case statement in the RSL routine

REMOVE-TRAJ-PHRASE . List block 339 to see the addition of SERVO-FILE to

the case statement.

7. Add a round-robin to pass the new trajectory type parameters from the PATH

level to the PRIM level. Add the round-robin in an empty block between

blocks 511 and 519, the blocks reserved for RSL round-robins. The roundrobin enables the PATH level to change parameters every cycle, if necessary. List block 511 to see the servo round-robin PATH> PRIM-SRV

.

8. Initialize the new trajectory file created in Step 1, by using the SMACRO

file operator ~re-init-file. List block 993 to see the initialization of

the SERVO-FILE.

Adding Code on the TASK&PATH Board

The following steps describe the additions you need to make on the TASK&PATH

board to add the servo trajectory type or a similar trajectory type to RSL.

All the additions on the TASK&PATH board are to the PATH level. The block

numbers listed assume that you are on the TASK&PATH board in the PATH vocabulary with the OFFSET set at 10000.

1. Add an integer variable to the SMACRO variable owner reserved-record* to

access the round-robin created in Step 7 of the previous section. List

block 173 to see the addition of the servo variable path-srv-^ to the

reserved-record# owner.

2. Add the new trajectory type file to the case statement in the RSL routine

TRAJ-PHRASE. This addition enables you to retrieve the appropriate record

from the data structure file, and also makes the new trajectory type legal

for the PATH level. List block 322 to see the addition of SERVO-FILE to

the case statement.

3. Add the new trajectory type to the case statement in the RSL routine HALT

block 332.

4. Add the new trajectory type and file to the case statement in the RSL routine TRAJ-ROUND. TRAJ-ROUND sends the trajectory parameters to the trajectory round-robin. List block 804 to see the addition of the servo

trajectory type and SERVO-FILE for the PATH> PRIM-SRV round-robin.

11.5 ADDING A TRAJECTORY TYPE TO RSL

11-7
5. Initialize the new trajectory variable created in Step 1. The variable

identifies the round-robin record for the RSL routine TRAJ-ROUND. List

block 981 to see the initialization of path-srv-*.

Adding Code on the PRIM Board

The following steps describe the additions you need to make on the PRIM board

to add the servo trajectory type or a similar trajectory type to RSL. The

block numbers listed assume that you are on the PRIM board with the OFFSET set

at 11000.

1. Add the variables and routines for the new trajectory type. The variables

you need to add depend heavily on the type of trajectory you are adding to

RSL. Refer to blocks 730 through 739 for the servo trajectory variables

and routines.

The Cartesian straight-line trajectory type is the basis for the servo trajectory. The routines transform the velocity of the tool point to the

sensor frame, command the goal pose as the goal of both the rotation and

translation parts of the trajectory, compute the maximum velocity as a function of the range to the goal, and transform the result back into a motion of the tool point.

2. Add the new trajectory type to the case statement in the RSL routine TRAJ.

This addition makes the new trajectory type legal for the PRIM level.

List block 791 to see the addition of the servo trajectory type to the case statement.

11.5 ADDING A TRAJECTORY TYPE TO RSL

11-8
Chapter 12

RCS APPLICATION EXAMPLES

This chapter describes two example applications of RCS. NBS developed each

application for a different project. The first application describes a machining workstation that is part of a totally automated factory project.

The second application describes a field materiel-handling robot that is part

of an Army-sponsored research project.

12,1 A MACHINING STATION IN THE AUTOMATED MANUFACTURING RESEARCH FACILITY

The National Bureau of Standards is developing an experimental factory called

the Automated Manufacturing Research Facility (AMRF). The AMRF will operate

as a small, totally automated, batch machine shop.

Currently the AMRF consists of five workstations: three machining stations, a cleaning and deburring station, and an inspection station. The AMRF maintains

a central database that provides information for the five workstations. Each

workstation uses robotic material handling for tasks such as machine-tool

loading and unloading, deburring parts, and loading a collet into a lathe.

The horizontal machining station and the cleaning and deburring station use RCS to maintain real-time control over the robot.

The following sections discuss the horizontal machining workstation in more

detail and give an example of unloading an incoming parts tray.

For more information, read the IEEE Computer Society reprint entitled, "A

Hierarchically Controlled, Sensory Interactive Robot in the Automated Manufacturing Research Facility". This paper is a reprint from the IEEE International Conference on Robotics and Automation, St. Louis, Missouri, March 25

to 28, 1985.

The Horizontal Machining Workstation

This example discusses the horizontal machining workstation. This workstation

contains a horizontal-machining center and a materiel-handling robot, the

Cincinnati Milacron T3 hydraulic, six-degree-of-freedom manipulator. The

function of the T3 robot is to load part blanks into the horizontal-machining

center fixtures and then unload the machined parts. The T3 robot also loads

and unloads the parts from the part trays and buffers of the workstation.

To meet the requirements of the AMRF, NBS equipped the T3 with a hierarchical

real-time control system (RCS), a 3-D vision system, a watchdog safety system,

an active pedestal, a quick-change device, and an instrumented servo- controlled gripper.

12.1 A MACHINING STATION IN THE AUTOMATED MANUFACTURING RESEARCH FACILITY

12-1
Figure 12-1 shows the major robot-related components of this workstation and

the workstation control system, which sends commands to the T3 RCS.

IWorkstalion

Control

System

Active

Pedestal

System

3-D Vision

Sensor

System

1 T3

1 Controller

1 and Robot

Figure 12-1. Major robot-related components of the horizontal

machining workstation.

12.1 A MACHINING STATION IN THE AUTOMATED MANOFACTORING RESEARCH FACILITY

12-2
Table 12-1 lists the functions of the major robot-related components of the

horizontal machining workstation.

Table 12-1. Functions of the Major Robot-Related Components of

the Horizontal Machining Workstation.

Component

RCS

3-D Vision Sensor System

Watchdog Safety System

Active Pedestal System

Quick Change

Servo-Controlled Gripper System

Function

Controls the operation of the T3 robot,

the active pedestal system, and the

quick change device.

Locates and identifies objects.

Monitors individual joint and toolpoint motions of the robot to prevent

the robot from damaging itself or other

equipment.

Regrips parts.

Changes end effectors.

Enables the T3 to open a gripper to a specified width or close a gripper with

a specified force.

The hardware and software configuration of the T3 RCS is more complex than the

RSL configuration described in earlier chapters, because the T3 RCS supports

additional devices.

Hardware configuration of the T3 RCS

The hardware configuration of RCS for the horizontal machining workstation

consists of six Intel 86/30 processor boards communicating via a MULTIBUS.

Three of the 86/30 boards contain the task decomposition levels: TASK,

SUBTASK, E-MOVE (elemental move), PRIM (primitive), PARTS GRIPPER, VALVE

GRIPPER, and QUICK CHANGE.

The final robot-dependent level, T3, is on a separate 86/30 board. Of the

other two remaining 86/30 boards, one contains a diagnostics system and the

communications process (COMM), and the other controls the graphics display

monitor.

12.1 A MACHINING STATION IN THE AUTOMATED MANUFACTURING RESEARCH FACILITY

12-3
The 86/30 boards have parallel I/O and A/D ports for communicating with sensors and actuators. For example, the board containing the E-MOVE and PRIM

control levels has access to proximity sensors and gripper beam-break sensors

through the parallel I/O ports of the board.

This implementation of RCS also includes six other boards: two memory boards

for the common memory, which contains user files, communications buffers, and

the system dictionary; a DMA (Direct Memory Access) board that provides commu- nications with the vision system; two 68000 processor boards that provide

access to other workstations on the network; and the board for controlling the

hard disk and tape drive.

Figure 12-2 shows the T3 RCS hardware configuration.

Beam Breaks

Holster Sensors

Joystick

T3 Controller

Resolvers

Workstation

Active Pedestal

86/30

Task/Subtask

Control Levels

86/30

E- Move /Prim

Control Levels

Hard DiskTape Drive86/30

T3

Control Level

68000

Local Area

Netvork

68000

Netvork

Protocol

Disk/Tape

Controller

Board

f. <—:.

y.

?-

86/30

Parts Gripper/

Valve Gripper/

Quick Change

Control Levels

86/30

Communications/

Diagnostics

Processor

86/30

Graphics

Display

Controller

DMA

Communications

vlth

Vision System

1 /2 Megabyte

Memory Board

Common Memory

1 Megabyte

Memory Board

Common Memory

MULTIBUS

Gripper

Activator

Gripper Sensors

Quick Change

Sensors

Quick Change

Activator

Graphics

Display

Vision

Figure 12-2. T3 RCS hardware configuration.

12.1 A MACHINING STATION IN THE AUTOMATED MANOFACTORING RESEARCH FACILITY

12-4
Software configuration of the T3 RCS

The RCS software configuration for the horizontal machining workstation con- sists of task decomposition control levels similar to the RSL application control levels. This application of RCS decomposes tasks using the control

levels: TASK, SUBTASK, E-MOVE, PRIM, and T3. The T3 level is robot dependent, transmitting the appropriate commands to the T3 controller.

In addition, the control levels PARTS GRIPPER, VALVE GRIPPER, and QUICK CHANGE

execute in parallel with the PRIM level, enabling the gripper system to position the gripper independently of the T3 robot motion. The control levels

PARTS GRIPPER, VALVE GRIPPER, and QUICK CHANGE transmit commands to the two

grippers and to the quick change actuator, respectively. Figure 12-3 shows

the control-level hierarchy.

Task

Level

d k

^ ' Subtask

Level

d k Active Pedestal

System

4 k

^ r 3-D Vision 4—

1

E-Move

Sensor System Level

A ' i

'

^ t t 1

^ L , F . r +

Parts Valve Quick

Prim Gripper Gripper Change

Level Level Level Level

k

'

4^ :

A

r Parts Valve Quick

T3 Gripper Gripper Change

Level

I

T3 Robot

Controller

Figure 12-3. T3 RCS control-level hierarchy.

12.1 A MACHIHING STATION IN THE AUTOMATED MANUFACTURING RESEARCH FACILITY

12-5
The COMMUNICATIONS/DIAGNOSTICS processor manages communications between

levels. This processor transfers the command and status buffers between

levels every 40 milliseconds, as set by the fixed cycle time of the T3 RCS.

Each control level processes a set of commands of decreasing complexity. A

typical command at the TASK level decomposes into several robot movements,

while a command at the PRIM level typically becomes one simple robot movement.

For example, a TRANSFER command consists of the following sequence of steps:

moving to the specified object at the specified location, identifying the

object orientation using the vision system, grasping the object, moving the

object to the destination point, and releasing the object. The other control

levels decompose these steps into simpler and simpler actions. For example,

the command DELTA-MOVE at the PRIM level moves the robot a short distance from

its current position.

12.1 A MACHINING STATION IN THE AUTOMATED MANDFACTURING RESEARCH FACILITY

12-6
Figure 12-4 shows the commands that each control level can process.

Task

Subtask

E-Move

Prim

Parts

Gripper

Valve

Gnpper

Quick

Change

TRANSFER REFIXTURE

UNLOAD ACQUIRE

MOVE PAUSE

POSITION

GET-ENDEFF GOTO-ENDPT >POSITION

FIX-GRIP GOTO-DEST RELEASE

GET-OBJECT MOVE-OBJ>D MOVE-SAFE

PLACE-OBJ S- PAUSE

POSITION

OPEN-GRIP

CLOSE-GRIP

POSITION

OPEN-GRIP

CLOSE-GRIP

UNLOCK-QC

LOCK-QC

MOY-TO-LOC LOCATE-OBJ GRASP-OBJ

MOV-TO-OBJ QC- DETACH RELEASE

MOY-OBJ-TO QC-ATTACH WITHDRAW

liOV-TO-YU E- PAUSE MOV-TO-HOL

DPART-THRU GO-UNTIL CONNECT

GO-THRU CONTACT UNSEAT

APPR-THRU SEAT REMOVE

STOP- AT- PT DELTA- MOVE PAUSE

GOTO-PT EXTRACT ROBOT- 1 NIT

Figure ^2-H. Control level commands for the T3 RCS.

12.1 A HACHINING STATION IN THE AUTOMATED MANUFACTURING RESEARCH FACILITY

12-7
Whenever possible, this RCS application uses the SMACRO state table statement

to decompose tasks. Figure 12-5 shows an example state table routine,

QC-DETACH, which decomposes a quick change operation, disengaging the current

end effector on the robot.

routine QC-DETACH-ST EDEF

state-table ref-action "qc-status-in"

state: new-command XX EXECUTING

GET-HOLSTER-D CONTACT

state: XX "executing" EXECUTING

state: contact-made "locked" EXECUTING QC-UNLOCK

state: contact-made "unlocked" EXECUTING SEAT

state: seated "unlocked EXECUTING EXTRACT

state: extracted "unlocked" EXECUTING

DETACH

VERIFYstate: detached XX EXECUTING

HOLSTER

DEPARTstate: executing XX EXECUTING

state: delta-move-done XX DONE

default-s1bate: STATE-ERR--MSG

end-state-table

end-routine

Figure 12-5. The QC-DETACH routine.

In the QC-DETACH routine,

tion and moves the robot

proximity sensors on the

ster. After the contact,

unlock, disconnecting the

robot then slides the end

slightly. RCS checks the

After the robot detaches

RCS first gets the correct holster position informainto contact with the holster. The application uses holster to determine when the robot contacts the holQC-DETACH commands the quick change device to

end effector and dropping it into the holster. The

effector to the seat position and moves away

sensors in the robot wrist to verify the detach,

the end effector, it departs from the holster.

Each control level uses similar routines to decompose the commands at that

level. Each control level consists of an executing routine that calls the

routines PRE-PROCESS, STATE-TABLE, and POST-PROCESS. These routines perform

the RCS functions of preprocessing, decision processing, and postprocessing,

respectively.

4

12.1 A MACHINING STATION IN THE AUTOMATED MANDPACTURING RESEARCH FACILITT

12-8
T3 ONLOAD Tray Example

One function of the T3 robot is to unload incoming parts from a tray and store

them in a buffer area. When the workstation sensors detect an incoming parts

tray, the workstation controller sends an UNLOAD command to the TASK level.

The workstation controller also sends the tray location point and the unload

buffer area as UNLOAD command parameters. RCS must obtain information about

the contents of the parts tray from the AMRF central database.

For this example, suppose the tray contains two rectangular part blanks and a valve body, as shown in Figure 12-6.

T3

Robot

Buffer

'MjII^(==^jiRP2I

Station-2

Slation-1

Figure 12-6. Example UNLOAD situation for the T3 robot.

The rectangular parts, RP1 and RP2, require the T3 to use a parts gripper, and

the valve body, VB1, requires the T3 to use a valve gripper. Assume that the

rectangular parts gripper is attached to the robot. Figure 12-7 gives a pseudocode example of the sequence of control statements generated by the

UNLOAD command.

12.1 A MACHINING STATION IN THE AUTOMATED MANUFACTURING RESEARCH FACILITY

12-9
Figure 12-7 lists statements down to the E-MOVE control level. Each

indentation indicates statements at the next lower control level.

UNLOAD ( STATION-2, BUFFER, SAFE )

GET-OBJECT ( RP1, STATION-2, SECTOR-3 )

MOV-TO-VU ( STATION-2, SECTOR-3 ) LOCATE-OBJ ( RP1 ) MOV-TO-OBJ ( RP1 ) GRASP-OBJ ( RP1 )

PLACE-OBJ ( RP1, BUFFER )

MOV-OBJ-TO ( RP1, BUFFER ) RELEASE ( RP1 )

GET-OBJECT ( RP2, STATION-2, SECTOR-4 )

MOV-TO-VU ( STATION-2, SECTOR-4 ) LOCATE-OBJ ( RP2 ) MOV-TO-OBJ ( RP2 ) GRASP-OBJ ( RP2 )

PLACE-OBJ ( RP2 BUFFER )

MOV-OBJ-TO ( RP2, BUFFER ) RELEASE ( RP2 )

GET-ENDEFF ( VALVE-GRIPPER )

MOV-TO-HOL ( ) QC-DETACH ( ) MOV-TO-HOL ( VALVE-GRIPPER ) QC-ATTACH ( VALVE-GRIPPER )

GET-OBJECT ( VB1, STATION-2, SECTOR-2 )

MOV-TO-VU ( STATION-2, SECTOR-2 ) LOCATE-OBJ ( VB1 ) MOV-TO-OBJ ( VB1 ) GRASP-OBJ ( VB1 )

PLACE-OBJ ( VB1, BUFFER )

MOV-OBJ-TO ( VB1, BUFFER ) RELEASE ( VB1 )

GOTO-ENDPT ( SAFE )

Figure 12-7. Pseudocode example of a T3 UNLOAD command.

12.1 A MACHINING STATION IN THE AOTOKATED MANDFACTORING RESEARCH FACILITY

12-10
STATION-2 and BUFFER are location-point arrays and SAFE is a location point.

The SECTOR parameter indicates which array position contains the specified

part. The TASK level obtains the value of SECTOR from the AMRF database

before the first SUBTASK command, GET-OBJECT.

The objects RP1, RP2, and VB1 have associated grip and vision information.

The control-level routines obtain much of the information needed to execute

the UNLOAD task from the files in common memory. For example, when the T3

must move from the BUFFER to the holsters for a quick change operation, the

system searches the trajectory file for a trajectory between the array BUFFER

and the fixed holster location point HOL-SAFE. If the system finds a trajectory, it uses the path-points and velocity parameters to move the robot;

otherwise, it uses the end points and default parameters.

The UNLOAD example includes three sequences of GET-OBJECT/PLACE-OBJ operations—one sequence for each object. The example includes an additional

GET-ENDEFF operation after the first two objects, because the T3 must change

grippers to pick up the valve body part. After the T3 unloads the valve body

part, it moves to the location labeled SAFE.

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

The U.S. Army Human Engineering Laboratory is developing a Field MaterielHandling Robot (FMR). When completed, the FMR project will include a specially developed robot designed to automate materiel handling. The Human

Engineering Laboratory is sponsoring NBS to develop an RCS-based robot con- troller for the FMR project.

One proposed task for the FMR is to locate, acquire, and transfer a randomly

oriented pallet load from a truck bed to a conveyor. The following sections

describe the hardware and software configurations required to accomplish the

transfer task.

The FMR application uses an extended version of RSL. The extensions add pathpoints to use the sensors mounted on the FMR end effector. The discussion of

this example assumes that you are familiar with the information on RSL in

Chapter 9, "Robot Sensor Language (RSL)", and Chapter 10, "RSL Control

Levels".

Hardware Configuration for the FMR

The specifications for the FMR robot include a reach of 25 feet with the ability to move a 4,000-pound load at speeds of up to 150 inches per second.

Commercially available robots cannot meet these specifications. NBS uses the

Unimate 4000 robot to test software and sensor development.

NBS developed a forklift-like end effector for the Unimate 4000 robot. The

fork enables the robot to insert tines into a pallet to transport the materiel

securely on the pallet. The fork also provides a structure on which to place

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-11
the sensors needed to position the fork for picking up a randomly oriented

pallet. Figure 12-8 shows the fork and sensor hardware and the associated

coordinate frame.

Tool frame origin

is level with face plate

and 23 inches in front

of sonar

Proximity

switches

Face plate

Downward facing sonar unit

Forward facing

sonar unit

Figure 12-8. Fork and sensor hardware for the FMR.

The sensor hardware enables the robot to orient the fork with the truck bed,

to align the fork with the desired entry side of the pallet, and to guide the

fork under the pallet. The sensors are Polaroid ultrasonic ranging devices or sonars, and optical proximity switches. Routines can control robot motions,

such as translations along and rotations about the tool axes, using the sonar sensors shown in Figure 12-8. For example, routines can control a roll motion

about the X-axis using sonars 3 and k.

The FMR application uses the same RCS hardware configuration as RSL. The FMR

contains four 86/30 processor boards containing the four RSL control levels

TASK, PATH, PRIM, and JOINT; a 512K memory board for common memory; and the

tape and disk controller board. The boards communicate through a MULTIBUS.

12.2 THE FIELD KATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-12
Figure 12-9 shows the hardware configuration for the FMR example.

Terminal Serial Switch Box Robot Joystick

<

'1*

Multibus

RSL

86/30

<4

^

COMMON

MEMORY

51 2K

Priam Winchester

Hard Disk

^—

Cipher Tape Drive

TAPE/DISK

CONTROLLER

t-> TASK/PATH

86/30

PRIM

86/30

Ultrasonics

(D

Proximity Switches

J

JOINT/COMM

86/30

f (

SLAVE Serial Interface

Unimate 4000

Robot Controller

Figure 12-9. RCS hardware configuration for the FMR,

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-13
Software Configuration for the FMR

The FMR application uses the same RCS software configuration as the RSL application. Figure 12-10 reviews the RSL control-level hierarchy and shows the

RSL data types and common memory data structure files.

Data

I

KSL

-ppt-

-loc-, -pose-, -mtb-

-obj-, -irr--

carctnj

joint traj

USER

MKMORY

MOVE-TO-FILE

APPR-PICK-RLE

DEPT-PICK-HLE

APPR-REURLE

DEPT-REL-HLE

PATH-POINT-HLE

LOC-HLE

POSE-HLE

MTB-HLE

OBJ-FILE

ARR-FILE

-| cart-file[

JOINT-HLE

Commands

1

TASK

Decompose Commands

into PATHS

PATH

Decompose PATHS

into sensor based

y GOAL POSES

EH

PRIM

Decompose GOAL POSES

into intermediate tiajeaory

POSES

EH

JOI NT

COMM

Decompose POSES into JOINT ANGLES

E~r

TINTMATK 4000

Figure 12-10. RCS software configuration for the FMR.

^

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-1^1
To locate a randomly oriented pallet, the FMR application extended RSL by adding path-points that use the sonar and proximity sensors. The new path-points

control individual sensor motion, scan the work volume and analyze the orientation of a pallet, and combine sequences of lower-level path-points so that

you can execute these sequences of path-points in parallel.

The new path-points are edge, range, equate, scan, align-grip, approachpallet, and pickup-pallet. The application also uses the RSL goto path-point.

The following list provides the syntax and a brief description of each FMR

path-point.

goto [location type] [location name] [traj type] [traj parameters]

Moves the robot directly to the location.

edge [sonar#] [range] [delta] [location type] [location name]

[traj type] [traj parameters]

Moves the robot toward the location name looking for an edge. The delta

parameter describes how large the edge is, and range specifies at what

distance to start looking for the edge.

range [sonar#] [range] [threshold] [axis] [location type]

[location name] [traj type] [traj parameters]

Moves the robot along the specified axis of the Cartesian frame specified by

the location type and location name. The robot moves to the range measured by

sonar (within threshold). The commanded translation is positive if the range

minus the sonar is greater than 0.

equate [sonar#1] [sonar#2] [threshold] [offset] [axis] [location type]

[location name] [traj type] [traj parameters]

Rotates about the axis of the Cartesian frame specified by the location type

and location name until the two selected sonars take the same reading (within

threshold). The rotation is positive if sonar#1 minus sonar#2 is greater than

0. If two sonars are on different but parallel planes, you can specify the

difference between them in offset.

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-15
scan [sonar#] [skip readings] [max object range] [min range delta]

[extra] [pose name] [location type] [location name] [traj type]

[traj parameters]

Determines the nominal location of a rectangular object. The robot scans an area taking range readings starting from the current position and ending at

the location name. When the sonars take readings, the routines associated

with scan link the readings to the position of the robot and store the positions in a file. The scan path-point returns the nominal pose of the object

in pose name.

align-grip [perm-edge-val] [perm-equal-val] [s1s2-offset] [extra]

[long-integer] [min-total-long] [max-short-side]

[side-equate-thresh] [location type] [location name]

[goto-traj-type] [traj parameters] [edge traj type]

[traj parameters] [equate traj type] [traj parameters]

Uses information from the scan path-point and the current sonar data to determine if the long side of the pallet faces the fork. By calling the edge,

equate, and goto commands, the align-grip path-point uses the trajectory

parameters to align the fork with the long side of the pallet.

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-16
Figure 12-11 shows a sequence of path-points similar to the path-points that

align-grip might execute. However, the figure makes some assumptions that

cannot be made until after sonar data processing, such as which direction to

move when looking for the edge.

O

n i

5^ I. Do Edge 2. Edgcdonc;now

do Range.

3. Range done;now

do Equate.

r

A Done.

Sonar axis Robot motion

axis ^

^ t

Figure 12-11. FMR path-point examples.

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-17
approach-pallet [t-x-sonar#] [t-x-range] [t-x-threshold]

[t-y-sonar#] [t-y-range] [t-y-threshold]

[r-x-sonar#1] [r-x-sonar#2] [r-x-offset] [r-x-threshold]

[r-y-sonar#1] [r-y-sonar#2] [r-y-offset] [r-y-threshold]

[location type] [location name]

[traj type] [traj parameters]

Achieves the proper height and orientation of the fork before the robot

inserts the fork under the pallet. The approach-pallet path-point calculates

four tool motions similar to the calculations for the range and equate pathpoints. The t-x- and t-y- parameters correspond to the parameters for range

path-points along the x and y axes. The r-x- and r-y- parameters correspond

to the parameters for equate path-points about the x and y axes.

pickup-pallet [sonar#] [z-correction] [extra]

[location type] [location name]

[traj type] [traj parameters]

Ensures that the fork tines do not hit the pallet feet while the robot inserts

the fork under the pallet. Optical proximity sensors detect when the tines

are too close to the pallet feet. The specified sonar# obtains the nominal

distance the fork must travel before a switch at the rear of the fork engages

the pallet. When a proximity sensor senses a pallet foot, the robot translates in the appropriate z direction until the sensor is no longer active.

Because of the narrow beam of the sensors, the robot also travels an additional z-correction after the sensor has cleared the foot.

FMR Transfer Example

This example provides the source code for the paths required to execute the

following TRANSFER command, which transfers PALLET 1 from TRUCK to CONVEYOR.

TRANSFER PALLET 1 loc TRUCK loc CONVEYOR

The six steps of a TRANSFER command specify the paths for the robot to pick

up, move, and release the pallet. The six steps are:

1. move-to PALLET 1 loc HOME loc TRUCK

2. approach-pickup PALLET 1 loc TRUCK

3. depart-pickup PALLET 1 loc TRUCK

U. move-to PALLET 1 loc TRUCK loc CONVEYOR

5. approach-release PALLET 1 loc CONVEYOR

6. depart-release PALLET 1 loc CONVEYOR

^

k

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-18
To execute the TRANSFER command, you must define and compile all six path

steps from the RSL board. The RSL code for the paths and path-points needed

to accomplish the TRANSFER command follow. The % character indicates a com- ment line.

% Move to a starting position (from home) before scanning the truck,

-path- move-to PALLET 1 loc HOME loc TRUCK

% Move to the predefined scan start location using a fast joint

% trajectory motion.

-ppt- goto loc SCAN-START

joint 30.0 30.0 5.0

% Scan the truck from left to right searching for a pallet, align

% with long side of pallet, and engage fork,

-path- approach-pickup PALLET 1 loc TRUCK

% Orient fork with the truck bed

% adjust roll.

-ppt- equate 4 3 .5 .0 X tool nul

cart .2 .15 .25 .3 .2 .25

% adjust pitch.

-ppt- equate 4 5 .5 20.0 Z tool nul

cart .2 .15 .25 .3 .2 .25

% Fork is now parallel with truck bed. Scan for pallet, return

% position in PALLET-POSE. SCAN-MTB causes the fork to travel in a

% base rotation motion.

-ppt- scan 50.0 .5 PALLET-POSE

tool SCAN-MTB joint 25.0 25.0 5.0

% Move to loc PALLET-LOC which consists of PALLET-POSE and a

% movetable to position the fork in front of the pallet,

-ppt- goto loc PALLET-LOC

joint 25.0 25.0 1.0

% Find the long side of the pallet,

-ppt- align-grip

4.0 8.0 0.0 .75 15.0 14. 5

tool nul

cart .3 .15 .25 .3 .15 .25

cart .3 .15 .25 .3 .15 .25

cart .3 .15 .25 .3 .15 .25

% Lower the fork to the truck bed. Ensure that the fork is parallel

% with the face of pallet and truck bed.

-ppt- approach-pallet

17.75 .5

4 28.5 .25

4 3 .0 .25

7 4 .0 .5

cart .3 .07 .25 .3 .07 .25

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-19
% Guide fork under the pallet until the rear switch signals engagement,

-ppt- pickup-pallet 7 .5 1.0

cart .3 .3 .25 .3 .15 .25 ^

% Depart by picking up the pallet and tilting it back.

-path- depart-pickup PALLET 1 loc TRUCK

% PALLET-UP 1 is an offset up from the current position under the

% pallet.

-ppt- goto tool PALLET-UP 1 cart .3 .3 .25 .3 .3 .25

% PALLET-UP2 tilts the pallet back,

-ppt- goto tool PALLET-UP2

cart .3 .3 .25 .3 .3 .25

% Move to an intermediate safe position.

-path- move-to PALLET 1 loc TRUCK loc CONVEYOR

% CONV-SAVE is a predefined safe position near the conveyor, which

% can be approached using a high- joint velocity,

-ppt- goto loc CONV-SAFE

joint 10.0 30.0 5.0

% Approach conveyor, a predefined location, and release pallet,

-path- approach-release PALLET 1 loc CONVEYOR

% C0NV-UP1 is an offset up from CONVEYOR goal. Goal type . % takes the movetable (C0NV-UP1) and adds it to the path goal w

% (CONVEYOR).

-ppt- goto goal C0NV-UP1

cart .3 .3 .25 .3 .3 .25

% Place pallet at the goal CONVEYOR,

-ppt- goto goal nul

cart .3 .3 .25 .3 .3 .25

% Extract fork tines.

-path- depart-release PALLET 1 loc CONVEYOR

% CONV-BACK is an offset up from the CONVEYOR goal,

-ppt- goto goal CONV-BACK

cart .3 .25 .25 .3 .25 .2

-ppt- goto loc CONV-SAFE

joint 10.0 30.0 5.0

^

12.2 THE FIELD MATERIEL-HANDLING ROBOT CONTROL SYSTEM

12-20
Chapter 13

DEBUGGING TECHNIQUES

This chapter describes several RCS debugging techniques, including debugging

interactively using Show mode, single-stepping through a routine, singlestepping control levels, isolating problems, creating debugging routines, and

using other debugging techniques.

13*1 DEBUGGING INTERACTIVELY USING SHOW MODE

In most high-level languages (when an interactive debugging system is unavailable), you debug routines, or procedures, by inserting write or print statements within the code, recompiling the code, and executing the code again.

SMACRO is interactive. You can perform the following functions at the

terminal: execute individual routines, assign values to variables, and display the contents of variables.

Show mode is a useful debugging tool, enabling you to display information at

the terminal. In Show mode, when you enter the name of an owner, RCS displays

the name of the owner and the contents of all the members. When you enter the name of a variable, RCS displays the value of the variable.

For example, if you are using the RSL application, move to the TASK&PATH board

and change to Show mode by entering _£S. Enter TDEF to ensure that you are in

the TASK vocabulary and then enter input-command , the variable that contains

the command that the user passes to the TASK level. RCS displays the contents

of the input-command, for example, PAUSE.

To see the values of all members in the output status buffer for the TASK

level, enter the name of the owner, output-status-var . RCS displays the name

of the owner and the contents of the members of the owner:

output-status-var

(iv) cycle-#-status-out =15

(iv) inc-coiimand-#-echo-out = 1 (strv) c(»iiiiiand-echo-out = PAUSE

(iv) status-report = (iv) status-arg-out =

13.1 DEBUGGING INTERACTIVELY USING SHOW MODE

13-1
For example, to test the robot transforms, set up block 21 on the JOINT/COMM

board as follows:

:S joint/c<Miiiii>21 LIST

21

$DEF

1 :R

2 10.deg 20.deg 30*(leg

3 40.deg 50.deg 60.deg ==> servo-com-Joint

4 TIME-P JOINT>CART

5 TIME-P CART>JOINT

6 :S

7 CR JS servo-com-joint

8 CR JS xg

9 CR PMS pose

10 CR conf-flag

11

12

13

14

15

Line 2 sets servo-com-joint to the desired joint values. Line 4 executes

JOINT>CART and displays the execution time. The input to JOINT>CART is in

servo-com- joint, the output is in pose and conf-flags. Line 5 executes

CART> JOINT and displays the execution time. The input to CART> JOINT is in

pose and conf-flags, the output is in xg. Lines 7 through 10 display the

inputs and outputs. Load block 21 by entering 21 LOAD . RCS yields the following output:

JOINT>CART 9750 usee

CART>JOINT 8300 usee

servo-com-joint

10. 20. 30. 40. 50. 60

xg

10. 20. 30. 40. 50. 60

pose as matrix

X y Z xyz

-0.6366 0.02272 0.7709 25.66

0.7712 0.0296 0.6359 9.082

-0.008369 0.9993 -0.03636 39.23

(1:fa) conf-flag = -1. 1. 1.

:S joint/comm>

Because xg has the same values as servo-com-joint, the two transforms are inverses of each other, as required. Block 21 displays the pose as a matrix

for easier interpretation. You can set the joint angles to simple values (for

example, or 90 degrees) to check the pose and conf-flag computation. To

13.1 DEBUGGING INTERACTIVELY USING SHOW MODE

13-2
check the computation, return to the master board, edit line 2 of block 12021,

move to the JOINT board, and reload block 21 (using ELOAD). Edit block 21 to

contain the simple joint angles in the following listing:

$DEF

1 :R

2 0.deg 0.deg 90.deg

3 0.deg 0.deg 0.deg ==> servo-ccxn-Joint

4 TDffi-P JOINT>CART

5 TDffi-P CAHT>JOINT

6 :S

7 CR JS servo-conni-Joint

8 CR JS XG

9 CR PMS pose

10 CR conf-flag

11

12

13

14

15

:S rsl

oad the block by entering 21 ELOAD. The output is:

JOINT>CART 7920 usee

CART>JOINT 6750 usee

servo-corn-Joint

0.0 0.0 90. 0.0 0.0 0.0

zg

0.0 0.0 90. 0.0 0.0 0.0

pose as matrix

X* y^ Z xyz

0.0 0.0 1. 23.62

0.0 1. 0.0 4.488

-1. 0.0 0.0 25.59

(1:fa) conf-flag = -1. 1. 1.

:S Joint/co]iiii>

These particular values correspond to the pose for the PUMA 760 with the elbow

at 90 degrees.

13.2 SINGLE-STEPPING THROUGH A ROUTINE

To locate an error within a routine, single-step through the routine one line

at a time. You can execute routines line by line in two ways: by making the

entire routine a comment and then restoring the routine one line at a timcj or by executing the FORTH equivalent of the code in the routine line by line at

the terminal (if possible).

9

13.2 SINGLE-STEPPING THROUGH A ROUTINE

13-3
To make an entire routine into a comment, you should first copy the routine to an empty block. Then use the screen editor to enclose the routine, except for

the first line of SMACRO code, in parentheses. Leave the screen editor, load

the block, and execute the routine. If you do not get an error, go back into

the screen editor and move the first parenthesis to include another line of

code. Continue this procedure until you find the problem.

Executing the code at the terminal works best for routines that manipulate

SMACRO files, because you can execute many of the SMACRO file operators

directly at the terminal. These file operators are:

add-list retrieve-l&r

add-record store

clear-list store-l&r

~re-init-file store-source

remove update-header

retrieve

Many other SMACRO operators have equivalents in FORTH that you can use to execute lines of code at the terminal. For example, the FORTH equivalent for the

SMACRO assignment operator (=>) is the FORTH store command ("!).

13-3 SINGLE-STEPPING THROUGH THE RSL CONTROL LEVELS

Often the best way to isolate an error is to single-step through the control

levels. In single-step, each step executes one communications cycle. To

single-step through the control levels, follow this procedure:

1

.

On the RSL board , enter 923 LIST .

2. Use the screen editor to select between dummy and real execution. Making

line 6 a comment selects single-step without the robot. Making line 5 a comment selects single-step with the robot.

3. Enter Task/path REMOTE to move to the TASK&PATH board.

4. Issue a command by loading a block that contains an RSL command. On the

NBS system tape, the directory block 910 lists the blocks containing RSL

commands. Enter 913 LOAD to issue a transfer task.

5. Enter 2Ji to return to the master board.

6. Enter HALT whenever you return to the master board from a slave board.

Entering HALT makes the single-step output easier to read.

7. Enter PAGE TT to execute one communications cycle.

13.3 SINGLE-STEPPING THROUGH THE RSL CONTROL LEVELS

13-4
Figure 13-1 shows sample output that RCS displays when you enter TT,

task: 2 transfer nul 01 arr ARRAY 00 08 ;; loc CONVEYOR

path: 13 2 1 1 1330 usee

2370 usee

:S task&path>

prim: 22 2 1 (fv) Izsl = 0.0

(fv) angRs r 0.0

10940 usee

:S priin>

Joint: 533 2 1 1. 1.

servo-eom-joint

53.3 -26.38 -79.08 -174.4 55.98 161.4

31880 usee

Figure 13-1. Single-step output.

TT commands each board to load block 919 in its offset. (TASK&PATH loads

TASK'S 919, and not PATH'S 919.) Block 919 on each level contains the words

that execute that level, and any debug or display words you may have added.

Here is block 919 on the TASK&PATH board:

TASK DEFINITIONS

1 :R 1 remote-aetive I 2 BOARD-PROCESS

3 :S

4 PDEF

5 ^ CR ppt-stsu?ted

6 ^ CR new-e(»miand

7 ^ CR ine-e(»niand-#-out

8

9 CR :R TDEF process-time "€ PRINT-TIME :S

10 CR :R PDEF process-time "§ PRINT-TIME :S

11

12

13

14

15

13.3 SINGLE-STEPPING THROUGH THE RSL CONTROL LEVELS

13-5
Here is block 919 on the PRIM board:

PRIM DEFINITIONS ^

1 :R 1 remote-active ! 2 BOARD-PROCF-SS

3 :S

4 CR Ixsl

5 CR angRs

6 % CR current-vel

7 CR :R process-time ~§ PRINT-TIME

8 % CR PMS Joint-com-pose

9

10

11

12

13

14

15

«

:S

Here is block 919 on the JOINT/COMM board:

% single step dummy mode JOINT DEFINITIONS

1 :R

2 1 remove-active ! 3 COJM-PROCESS JOINT-LEVEL

4 done "§ ==> status-in joint-out joint-in 12 "MOVE

5 inc-c(»nand-#-out "§ ==> inc-command-f-echo-in

6 CR JS servo-com-joint ^

7 * CR JS xg

^

8 $ CR JS v-current

9 :S

10 % CR PMS pose

11 $ CR conf-flag

12

13 CR :R process-time "§ PRINT-TIME :S

14

15

Note: The TASK&PATH and PRIM boards simply run BOARD-PROCESS, but the

JOINT/COMM board is more complex. The difference is because the

JOINT/COMM board must run without the robot communications, which are usually included in BOARD-PROCESS for that board.

13.3 SINGLE-STEPPING THROUGH THE RSL CONTROL LEVELS

13-6
The following example shows output from TT taken from the middle of a TRANSFER

task execution. The times shown are for 5 MHz boards.

task: 9 TRANSFER nul 01 arr ARRAY 00 08 ;; loc CONVEYOR

2

path: 8 2

1170 usee

2540 usee

:S task&path>

prim: 10 2

(fv) Ixsl = 5.263

(fv) angRs =0.0

14450 usee

:S prim>

joint: 78 2 1 1. 1.

servo-com-joint

13.45 053.7 -54.04 -0.003327 -72.47 18.45

32030 usee

:S joint/comm>

:S rsl>

The Display routine on each level generates the lines labeled with the level

name. (For example, the PRIM level Display routine generates the line prim:

10 2 0. TT sets the print-f of each level to true.) Other words in the

919 blocks on each level generate the additional output lines. The rest of

this section describes the output in detail, line by line.

task: 9 TRANSFER nul 01 arr ARRAY 00 08 ;; loc CONVEYOR

2

These lines are from the TASK Display routine. It shows the values of

inc-command-#-in (9), input-command (TRANSFER nul 01 arr ARRAY 00 08 ;; loc

CONVEYOR), status-report (0 is executing), status-arg-out (0 is noerror),

state-label (2), and sector-count (0).

path: 8 2

This line is from the PATH Display routine. It shows the values of

inc-command-#-in (8), input-command (2 - PATH), status-report (0 - executing),

status-arg-out (0 - noerror), ppt-command (0 - goto), and ppt-done

(0 - false).

1170 usee

This line is generated from the line "CR :R TDEF process-time ~@ PRINT-TIME

:S" in TASK block 919. It displays the execution time for the TASK level.

13-3 SINGLE-STEPPING THROUGH THE RSL CONTROL LEVELS

13-7
2540 usee

This line is generated by the line "CR :R PDEF process-time "§ PRINT-TIME :S"

in TASK block 919. It displays the execution time for the PATH level.

:S task&path>

This line is the prompt for the TASK&PATH board.

prim: 10 2

This line is from the PRIM Display routine. It shows the values of

inc-command-#-in (10), input-command (2 - TRAJ), status-report (0 - executing), status-arg-out (0 - noerror), and traj-type-in (0 - cart).

(fv) Ixsl = 5.263

This line is generated by the line "CR Ixsl" in PRIM block 919. It displays

the translational distance from the goal.

(fv) angRs = 0.0

This line is from the line "CR angRs" in PRIM block 919. It displays the

rotational distance from the goal.

14450 usee

This line is generated by the line "CR :R process-time ~@ PRINT-TIME :S" in

PRIM block 919. It displays the execution time for the PRIM level.

:S prim>

This line is the PRIM board prompt.

joint: 78 2 1 1. 1.

This line is from the JOINT Display routine. It shows the values of

inc-command-#-in (78), input-command (2 - CARTESIAN), status-report (1 - done), status-arg-out (0 - noerror), v-scale-min (1.), and a-scale-min (1.).

servo-com-joint

13.45 053.7 -54.04 -0.003327 -72.47 18.45

This line is generated by the line "CR JS servo-com-joint" in JOINT block

919. It displays the output joint angles in degrees.

13.3 SINGLE-STEPPING THROUGH THE RSL CONTROL LEVELS

13-8
32030 usee

This line is generated by the line "CR :R process-time ~@ PRINT-TIME :S" in

JOINT block 919. It displays the execution time for the JOINT level.

:S joint/comm>

:S rsl>

These lines are the prompts for the JOINT/COMM and RSL boards.

The word Display on each control level, and any variables executed in Show

mode in block 919 on each control level, generate this output. You can execute a number of cycles and watch the single-step display change by

entering [^cycles] TTT . Single-stepping through the control levels is often

helpful in locating errors.

13.4 ISOLATING PROBLEMS

When the system aborts a robot task or does not complete a task, debug the

problem first by determining where the problem occurred. If you can see that

the robot is not performing a task correctly, finding the cause of the problem

is usually easy. For example, if the robot starts a transfer task and hits an object while moving directly to the first sector of an array, you have to add

a path-point to the transfer routine that first moves the robot to a safe

location.

If the error is in the software, you have to determine where the problem

occurred and correct it. To illustrate this procedure, the following example

introduces an error onto the system tape, isolates the problem by singlestepping the control levels and tracing the execution of the task, and

restores RCS to its previous condition.

1. Start the system in background mode by entering the following commands:

CBOOT MBOOT init-cm 2 D>M

922 LOAD

2. Load block 928 to show the contents of the status-report and

status-arg-out variables on each level by entering the command:

928 LOAD

13.1 ISOLATING PROBLEMS

13-9
Edit block 981 on the PRIM level, as follows:

3981 ED

Introduce an error by editing block 98 1 to make line 9 a comment and to

include a new line 8 that sets tool-mtb-" to 0. The block should now

look as follows:

CHARACTER OPS

"A Insert On/Off

^E Erase Char

*K Mark to Keep

"Z Input Keep

LINE OPS BLOCK OPS SPECIAL OPS

"C Copy Line *F Forward Block PF1 Home PF2 Clear

"D Delete Line "P Previous Block *U Undo Block

*0 Open Line "G Goto Block If Want string

"T Transfer "N Next Want

*R Retire(quit) *X Cancel

BLOCK 3981 11981

PRIM DEFINITIONS

12

3

4

5

6

7

8

9

10

11

12

13

14

15

RR-" PRIM>JOINT-POSE retrieve rr- RR-" PRIM>JOINT-TRAJ retrieve rr-'

"§ ==> priiii>Joint-pose-rr-

"•§ ==> priin> joint-traj-rrRR-" RBT-POSE retrieve rr-* ~§ ==> rbt-pose-rr-'

==> tool-mtb-*

% MTB-"* TOOL-MTB retrieve recordf "§ ==> tool-mtb-'*

MTB-* INV-TOOL-MTB retrieve record# ~§ ==> inv-tool-mtb-'

^

Load the edited block containing the error by halting RCS execution and

moving to the PRIM board, as follows:

HALT

Prim REMOTE

981 ELOAD

Now single-step through the control levels until the error occurs.

Enter:

21

HALT

PAGE TT

The error message BOARD-PROCESS ABORTED appears after the first cycle of

single-step. Because the message appears before the prompt for the PRIM

board, the error occurred on the PRIM level.

13.4 ISOLATING PROBLEMS

13-10
»

Note: Some errors do not occur until RCS has single-stepped through many

cycles. Single-stepping through the control levels is often a useful debugging tool.

6. Move to the PRIM board and re-execute the word that caused the error. The error occurs again, enabling you to locate the block that aborted.

Enter:

Prim REMOTE

LOG BOARD-PROCESS

7. As you can see on the display, the routine BOARD-PROCESS executes several

other routines. Because PRIM-LEVEL is the only routine an RCS user is

likely to have changed, locate that routine by entering:

LOC PRIM-LEVEL

8. The routine PRIM-LEVEL also executes several routines, but an RCS user is

likely to have changed only the routines PRE-PROCESS, COMMAND-PROCESS,

POST-PROCESS, and Display. Execute these routines in the same order as PRIM-LEVEL executes them, stopping when an error occurs. Enter:

PRE-PROCESS

COMMAND-PROCESS

Executing COMMAND-PROCESS should cause the error to occur again.

9. Enter the following commands to display the last word executed and to

locate that word:

\N

10. Trace the execution of the routine COMMAND-PROCESS by displaying variables in Show mode to isolate the problem further. Enter:

jS

status-report

error

hold-set

false

input-command

prim-restart

11. At this point, COMMAND-PROCESS executes the routine PRIM-RESTART. Enter:

PRIM-RESTART

The error should occur again. Now locate PRIM-RESTART by entering:

\L

13. M ISOLATING PROBLEKS

13-11
12. Trace the execution of the routine PRIM-RESTART by displaying variables

in SHOW mode to isolate the problem further, as follows (the command N L

displays the rest of the routine):

new-command

true

joint-status

error

N L

joint-status

done

13. At this point, PRIM-RESTART executes the routine FEEDBACK-POSE. Execute

FEEDBACK-POSE, as follows:

FEEDBACK-POSE

The error should occur again. Now locate FEEDBACK-POSE by entering:

\k

14. Because the original error message said RCS aborted because of a record#, look for statements in FEEDBACK-POSE that assign values to

record// and display those variables. Enter:

joint-pose-""

tool-mtbNote: You cannot execute retrieve-from-field from the terminal.

15. Because tool-mtb-'" equals 0, you need to find where the variable

tool-mtb-" is initialized. Use the directory block structure to determine where PRIM level round-robin variables are initialized by entering:

LIST

900 LIST

980 LIST

981 LIST

16. Return block 98 1 to its original state by entering:

21

RED

13.4 ISOLATING PROBLEHS

13-12
Edit the block to contain the following code:

CHARACTER OPS

"A Insert On/Off

*B Erase Char

^K Hark, to Keep

'^Z Input Keep

LINE OPS

'^C Copy Line

"D Delete Line

'^0 Open Line

BLOCK 3981 11981

BLOCK OPS SPECIAL OPS

'F Forward Block PF1 Home PF2 Clear

'P Previous Block ''U Undo Block

*G Goto Block *W Want string

'T Transfer^

Next Want

"^R Retire (quit) '^X Cancel

PRIM DEFINITIONS

12

3

5

6

7

8

9

10

11

12

13

14

15

:R

RR-'

RR-'

PRIM>JOINT-POSE retrieve rr-'

PRIM>JOINT-TRAJ retrieve rr-'

"§ ==> priiii>joint-pose-rr-'

~§ ==> priin> joint-traj-rr-'

RR-* RBT-POSE retrieve rr-'* "§ ==> rbt-pose-rr-'

MTB-'* TOOL-MTB retrieve record* ~§ ==> tool-mtb-"

MTB-'* INV-TOOL-HTB retrieve record* ~§ ==> inv-tool-mtb-'

When you extend RSL, use this procedure to debug errors.

13«5 CREATING DEBUGGING ROUTINES

You can create your own routines to help debug problems, RSL contains several

debugging routines that display variables. Each control level contains a routine called Display and a list owner called List-display. Figure 13-2 lists

the routines Display and List-display for the PATH level. You can write similar routines to display other variables.

13.5 CREATING DEBUGGING ROUTINES

13-13
1909 10909 ABS

PATH DEFINITIONS

routine Display

if print-f (EQ) true

then

-T CR

-PRINT" path: " "PRINT inc-coinmand-#-in

"PRINT input-command

"PRINT status-report

"PRINT status-arg-out

"PRINT ppt-command

"PRINT ppt-done

endif

end-routine

1908 10908 ABS

PATH DEFINITIONS

LIST-0 List-display

m new-command

m ppt-done

m new-ppt

m path-done

m prim-status

m output-command

m inc-command-#-out

Figure 13-2. Display routine and List-display list owner

for the PATH level.

Note: In debugging routines when RSL is running in the background, you cannot

see the intermediate results of calculations. To show the intermediate

results, you can run RSL in the foreground and include "PRINT statements. However, "PRINT statements slow RCS operation.

13.6 USING OTHER DEBUGGING TECHNIQUES

You can also use other techniques to debug RCS hardware, RCS software, and RSL

software.

13.6 USING OTHER DEBUGGING TECHNIQUES

13-14
I

RCS Hardware Debugging Techniques

You can add the following optional RCS hardware to make some debugging operations easier:

• A hardware switch box enables you to use the hardware switch to communicate

directly with the other boards in the system. When only one board in the

system malfunctions, use the switch box to reset that board without rebooting the entire system.

• An oscilloscope on the bus busy enables you to see the signal on the

MULTIBUS. The signal goes down when the bus is busy.

RCS Software Debugging Techniques

Some techniques for debugging RCS software problems include:

• Check your spelling. Remember, reserved words in the FORTH dictionary have

three significant characters. SMACRO words have 31 significant characters.

• If the vocabulary of a control level is full, increase the size allocated

in block 9 of that control level.

• If the system dictionary for a board is full, edit the system vocabulary

declaration for that board to increase the size of the dictionary. These

declarations are located in absolute blocks 1406 to 1^12. You must reload

the base system for this to be effective.

• If you cannot access a slave board, try entering [board name] Board-seminitialize .

• Make sure you did not put a vocabulary identifier in routines that are more

than one block long.

RSL Software Debugging Techniques

Some techniques for debugging RSL software problems include:

• To check the current status of all control levels, enter 8928 0LOAD to display the status and status-arg-out information from all control levels.

• Check that all RSL source code blocks contain j^. The RSL compiler does

not work in other modes.

• If you are not sure what RSL code is loaded, enter HALT to halt the system

and then enter 8990 0LOAD to reload the code.

13.6 USING OTHER DEBUGGING TECHNIQUES

13-15
If the robot continues to reach a wrist joint-limit when moving to a pose,

try changing the wrist configuration by editing the wrist configuration

flag in the pose definition. Note that you cannot change the wrist configuration when using the joystick.

Write debugging routines to display variables.

13.6 USING OTHER DEBUGGING TECHNIQUES

13-16
Appendix A

RCS, 8087, AND DISK AND TAPE ERROR MESSAGES

This appendix lists the error messages that RCS displays to indicate error

conditions. The error messages include RCS, 8087, and disk and tape error

messages. RCS error messages consist of explanatory text. 808? error

messages consist of a display of the 808? register contents. Disk and tape

error messages consist of an error code described in the Rimfire manual.

A.I RCS ERROR MESSAGES

RCS error messages describe fatal and nonfatal errors. Fatal errors are the

result of problems in allocating memory space for an application. A fatal

error requires you to execute at least a RESTORE and a D>M, rather than simply

reload a single block, to recover from the error. RESTORE and D>M return the

system to the "clean" state that existed before you encountered the error. The fatal error messages include BUFFER OVERFLOW, DICTIONARY FULL, FILE FULL,

FILE SPACE FULL, SYSDICT FILE FULL, SYSDICT SPACE FULL, and vocab redefined

larger. The remaining error messages indicate nonfatal errors.

The following list describes the RCS error messages.

~var only

RCS detected something other than a SMACRO variable following ==>

(Nonfatal)

[ name ] ? The specified name is undefined. (Nonfatal)

6 msec time-out interrupt

An application program attempted to access an I/O port or a RAM address

that Is not physically present in the system. (Nonfatal)

ALREADY ASSIGNED HERE

RCS found more than one occurrence of the same variable in a list owner

(LIST-0). (Nonfatal)

base<>10

RCS detected that you were trying to load a block with DBG-ON without

first setting BASE to decimal. The block is not loaded. (Nonfatal)

buffer length mismatch

RCS detected that two buffers specified for a COMM transfer have different lengths. (Nonfatal)

A.I RCS ERROR MESSAGES

A-1
[name] BUFFER OVERFLOW

The current variable owner does not have room for the name to be defined.

BUFFER OVERFLOW is the most common fatal error. This error results from

the user specifying an insufficient number of bytes during the variable

owner declaration. The error actually occurs when the SMACRO compiler

assigns the members of that variable owner to the allocated space, which

is too small to hold the members. (Fatal)

coram table full

RCS cannot accept more than 60 COMM transfer definitions. (Nonfatal)

DICTIONARY FULL

The FORTH dictionary space is full. This condition results from defining

too many FORTH words or encountering too many errors while compiling

SMACRO routines. If the condition results from defining too many FORTH

words, you may be able to circumvent the condition by reloading the base

system with LOCATE-OFF. (RCS loads RSL with LOCATE-OFF automatically.)

RCS compiles SMACRO routines in FORTH space before moving them to SMACRO

space. If an error occurs during the compilation, RCS does not move the

part of the SMACRO routine already compiled to SMACRO space, thus using

up FORTH space. (Fatal)

[name] F-EXISTS

The specified name is a previously defined FORTH word. This error message is a warning only; RCS defines the SMACRO word. (Nonfatal)

FILE FULL

The current SMACRO file is full. This error can occur when you load the

RSL code. To correct this condition, delete some of the RSL code for

that file or increase the size of the file.

Deleting some RSL code and reloading the current set (enter 990 LOAD for

RSL) may solve the problem if the file does not use garbage collection

(such as the POSE-FILE or the LOCATION-FILE).

If you choose to increase the file size, you must use RESTORE and D>M to

return the system to a "clean" state before the file was declared on any

level. Then declare the file with the new size and reload the system.

Examine block H on each level to determine if the level declares the

file. (Fatal)

FILE SPACE FULL

The SMACRO file being declared is too large for the remaining space in

the common memory area allocated for user files. You can check the cur- rent size of the file space by entering F-MEM . To correct this condition, you must redefine the values of the fpage, ftop, and fbottom

variables in block 1402, and reload the base system. (Fatal)

floating point only

RCS detected something other than a floating-point number in the input

for the #.READ word. (Nonfatal)

*

A.I RCS ERROR MESSAGES

A-2
•

§)

ILLEGAL

RCS detected an illegal value following <=. (Nonfatal)

illegal type

RCS detected something other than a string, array, byte variable, integer

variable, floating-point variable, or a segment variable following ==>. (Nonfatal)

invalid preserve*

The preserve (or preserve-file) number is outside the range 1 through 9.

(Nonfatal)

invalid image#

The D>M image number is outside the range 1 through 5. (Nonfatal)

[name] Pre-locate

The indicated name cannot be found using LOG. (Nonfatal)

record* = The variable record* was when the program tried to manipulate a file.

(Nonfatal)

remove record not on list

The SMAGRO file-manipulation word, remove, could not find the specified

record number on the current list. This error indicates that remove did

not remove any records. (Nonfatal)

STAGK EMPTY

Program operation caused the FORTH stack to underflow. Syntax errors in

SMAGRO statements may cause this error. (Nonfatal)

SYSDIGT FILE FULL

RGS detected an attempt to add a word to a vocabulary that is already

full. Enter V-SIZE to determine the size of the current vocabulary. To

increase the size of a vocabulary, you must first use RESTORE and D>M to

return the system to a "clean" state where that vocabulary is not

defined. Then define the larger vocabulary. (Fatal)

SYSDIGT SPAGE FULL

The vocabulary being declared is too large for the remaining space in the

common memory area allocated for the system dictionary. You can check

the current size of the system dictionary by entering F-MEM . To correct

this condition, you must redefine the values of the dpage, dtop, and

dbottom variables in block 1402, and reload the base system. (Fatal)

u-STAGK-underflow

A stack used in compiling SMAGRO routines has underflowed. This message

indicates a syntax error, such as if you spelled "endif" as "end-if".

(Nonfatal)

vocab already exists

RGS detected an attempt to define more than one vocabulary with the same

name. Each vocabulary name must be unique throughout the entire system.

(Nonfatal)

A.1 RCS ERROR MESSAGES

A-3
vocab redefined larger

RCS detected an attempt to increase the size of a vocabulary when you L

redefined it. (Fatal)

var-owner only

RCS detected something other than a variable owner in a COMM transfer

definition. (Nonfatal)

A. 2 8087 ERROR MESSAGES

If the 8087 detects an error, it aborts the current operation and displays the

control, status, and tag registers (in binary). It also displays the instruction address (in either the FORTH or SMACRO segment), the opcode, and the

operand address (in either the FORTH or SMACRO segment). You can enter

0.0 0.0 F/ for an example of this display.

A. 3 RIMFIRE DISK AND TAPE ERROR MESSAGES

Disk and tape errors have the following format:

tape error [error code] block [block#] [word]

The error code gives the two Rimfire status bytes. The lower 6 bits of the

high order byte give the error code. See the Rimfire manual listed under

"Disk and Tape Controller Board" in the bibliography for a description of the ^ error codes. The block# gives the block where the error occurred, and word is

the error encountered.

(

A. 3 RIMFIRE DISK AND TAPE ERROR MESSAGES

A-li
Appendix B

USER WORD SUMMARY

This appendix describes the RCS and RSL user words. The word descriptions are grouped according to function and labelled with headings (See the Appendix B

portion of the table of contents at the beginning of this manual for a list of

the headings.) Within each group, the words are listed in ASCII order. The

descriptions include the required syntax showing the word and its parameters

in the order in which you should enter them.

Table B-1 lists the abbreviations and Table B-2 lists the phrases used to

describe the syntax of the words. Table B-3 helps you find the description of

a specific word in this appendix. This table lists all RCS and RSL user words

in ASCII order. The table consists of the word followed by its group heading,

the page number on which it is found in this appendix, and the page number

where it is discussed in the manual. The bottom of each page of the table

lists the ASCII character sequence to help you locate specific words. Because

of the length of this table, horizontal lines separate every five words.

Table B-1.

Abbreviation

var

ivar

iexp

fvar

fexp

war

vexp

qvar

qexp

pvar

pexp mvar

mexp

List of Abbreviations Used in the Syntax Descriptions

Meaning

Any variable, including subscripted arrays.

An integer or byte variable.

An integer expression, composed of integer variables and operators. Note that integer expressions do not contain parentheses.

A scalar floating-point variable, including subscripted floating-point arrays.

A scalar floating-point expression.

A vector variable.

A vector expression.

A quaternion variable.

A quaternion expression.

A pose variable.

A pose expression.

A matrix variable.

A matrix expression.

USER WORD SUMMARY

B-1
Table B-2.

Phrase

local template

current file

current record

current list

free list

List of Phrases Used in the Syntax Descriptions.

Meaning

The variable owner that serves as a template for

records in the file. The members define the

fields in the record.

The last file made current by executing its name. All file operations refer to this file.

The record in the current file pointed to by the

variable record//. If record* is 0, no current

record exists.

The linked list in the current file starting at

the current record. If record// is 0, no current

list exists.

The linked list of available records in the

current file. The variable avail-record points

to the free 1.

USER WORD SUMMARY

B-2
Table B-3. Complete List of RCS and RSL User Words in ASCII Order.

WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

!

tttin #.READ

#LLIST

#READ

$DEF

%

%%

FORTH words

Miscellaneous RCS words

SMACRO operator words

SMACRO operator words

Editing words

B-46

B-35

B-59

B-60

B-29

B-60

B-94

B-35

B-35

B-35

6-5

6-9

10-16

1

SMACRO operator words

RSL operating system words

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous RCS words

6-5

6-14

5-12

6-9

(((

()

(•)

(»/)

))

Miscellaneous RCS words

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO operator words

B-36

B-60

B-60

B-60

B-61

6-8

7-9

(+)

(-)

(/)

(ABS)

(AND)

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO Boolean-operator words

B-61

B-61

B-61

B-61

B-74

7-9

7-9

7-9

7-11

(COM)

(EQ)

(GE)

(GT)

(LE)

TltT

(MAX)

(MIN)

(MOD)

(NE)

SMACRO operator words

SMACRO Boolean-operator words

SMACRO Boolean-operator words

SMACRO Boolean-operator words

SMACRO Boolean-operator words

B-61

B-74

B-74

B-74

B-74

B-74

B-61

B-62

B-62

B-75

6-17

7-11

7-11

7-11

SMACRO Boolean-operator words

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO Boolean-operator words

7-11

7-11

+

-1#

FORTH words

FORTH words

FORTH words

Language words

Predefined SMACRO variable words

B-46

B-46

B-46

B-98

B-57

10-46

9-4

ASCII Sequence:

!"#$$&•()»+,-./ 0...9 : ;<=>?§ Aa...Zz [ \ ] " _ { I } '

OSER WORD LIST

B-3
WORD GROUP HEADING

-arr- -imtb-

-loc-

-mtb-

-mtb-endLanguage words

Language words

Language words

Language words

Language words

APPENDIX

PAGE #

B-98

B-98

B-99

B-99

B-100

MANUAL

PAGE #

9-4

9-4

9-4

9-4

9-4

•objpathpose-

-ppt-

-rrLanguage words

Language words

Language words

Language words

Language words

B-100

B-100

B-101

B-101

B-101

9-4

9-5

9-3

9-5

10-14

.( ).

FORTH words

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO operator words

B-46

B-62

B-62

B-62

B-62

7-17

7-9

7-9

7-9

,ABS.

,ATAN,SIN,COS.

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO operator words

SMACRO operator words

B-62

B-63

B-63

B-63

B-63

B^Fy

B-70

B-70

B-68

B-47

7-9

7-9

6-17

,ATAN.

,AXIS,ANGLE>Q.

.AXIS, SIN, COS>Q.

.CROSS.

.D

SMACRO operator words

SMACRO quaternion-operator words

SMACRO quaternion-operator words

SMACRO vector-operator words

FORTH words

.DOT.

.EQ.

.EQZ.

.Esc

.FRAC.

SMACRO vector-operator words

SMACRO Boolean-operator words

SMACRO Boolean-operator words

Miscellaneous RCS words

SMACRO operator words

B-68

B-75

B-75

B-36

B-63

7-11

7-11

.GE.

.GEZ.

.GT.

.GTZ.

.INT.

SMACRO Boolean-operator words

SMACRO Boolean-operator words

SMACRO Boolean-operator words

SMACRO Boolean-operator words

SMACRO operator words

B-75

B-75

B-75

B-75

B-63

7-11

7-11

7-11

7-11

ASCII Sequence:

I " # $ 5f & ' ()«+,-./ 0... 9 : ; < = > ? e Aa...Zz [ \ ] " _ { I } ~

USER WORD LIST

B-4
=ss=r==sss====sss::s==ss==;:==ss=sssss===s===srs==sr=r=r==

APPENDIX MANUAL

WORD GROUP HEADING PAGE # PAGE #

.LE. SMACRO Boolean-operator words B-75 7-11

.LEZ. SMACRO Boolean-operator words B-76 7-11

.LT. SMACRO Boolean-operator words B-76 7-11

.LTZ. SMACRO Boolean-operator words B-76 7-11

.M=>. SMACRO matrix-operator words B-71 7-10

.M>Q. SMACRO matrix-operator words B-71

.MAX. SMACRO operator words B-6M

.MIN. SMACRO operator words B-64

.MINUS. SMACRO operator words B-64

.MOD+-180. SMACRO operator words B-64

.NE. SMACRO Boolean-operator B-76 7-11

.NEZ. SMACRO Boolean-operator words B-76 7-11

.P=>. SMACRO pose-operator words B-72 7-10

.PINV. SMACRO pose-operator words B-72

.PP». SMACRO pose-operator words B-72

.PQ«. SMACRO pose-operator words B-72

.PV+. SMACRO pose-operator words B-72

.Q=>. SMACRO quaternion-operator words B-70 7-10

.Q> AXIS, ANGLE, SIN,COS.

SMACRO quaternion-operator words B-70

.Q> AXIS, SIN, COS. SMACRO quaternion-operator words B-71

.Q>M. SMACRO matrix-operator words B-72

.QINV. SMACRO quaternion-operator words B-71

.QP«. SMACRO pose-operator words B-73

.QQ». SMACRO quaternion-operator words B-71

.QV». SMACRO quaternion-operator words B-71

.ROT, SIN, COS. SMACRO pose-operator words B-73

.ROT. SMACRO pose-operator words B-73

.SIGN. SMACRO operator words B-64

.SIN, COS. SMACRO operator words B-64

.SQ. SMACRO operator words B-64

.SORT. SMACRO operator words B-65

.TRN. SMACRO pose-operator words B-73

.UNIT. SMACRO vector-operator words B-69

.V«S. SMACRO vector-operator words B-69

.V+. SMACRO vector-operator words B-69 7-16

ASCII Sequence:

!"#$$&•() -./0...9:;<=>?@Aa...Zz[\] { I } -

USER WORD LIST

B-5
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

.V-.

.V/S.

.V=>.

.V>Q.

.VINV.

S^dACRO vector-operator words

SMACRO vector-operator words

SMACRO vector-operator words

SMACRO quaternion-operator words

SMACRO vector-operator words

B-69

B-69

B-69

B-71

B-69

7-10

.VMAG.

.VMINUS.

.VP+.

/

SMACRO vector-operator words

SMACRO vector-operator words

SMACRO pose-operator words

Miscellaneous RCS words

FORTH words

B-70

B-70

B-7^

B-36

B-47

0-?

0-SMACRO

0.#

0ED

0ed

SMACRO Boolean-operator words

Miscellaneous SMACRO words

Predefined SMACRO variable words

Editing words

Editing words

B-76

B-90

B-58

B-30

B-30

7-15

6-23

6-23

5-14

7-15

0LIST

0LLIST

0LOAD

1#

1-?

Editing words

Editing words

Miscellaneous RCS words

Predefined SMACRO variable words

SMACRO Boolean-operator words

B-30

B-30

B-36

B-57

B-76

10#

1 0-SMACRO

11#

12#

Predefined SMACRO variable words

Predefined SMACRO variable words

Miscellaneous SMACRO words

Predefined SMACRO variable words

Predefined SMACRO variable words

B-58

B-57

B-90

B-57

B-57

6-17

12-SMACRO

13#

14#

15#

16#

Miscellaneous SMACRO words

Predefined SMACRO variable words

Predefined SMACRO variable words

Predefined SMACRO variable words

Predefined SMACRO variable words

B-90

B-57

B-57

B-57

B-57

17#

18#

19#

1:a

1:fa

Predefined SMACRO variable words

Predefined SMACRO variable words

Predefined SMACRO variable words

SMACRO declaration words

SMACRO declaration words

B-57

B-57

B-57

B-54

B-54

7-3

7-3

ASCII Sequence;

. /0...9 : ; <=> ?eAa...Zz [ \ ] ^ _ { I } - (

USER WORD LIST

B-6
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

2!

2#

2-SMACRO

2.#

2:a

FORTH words

Predefined SMACRO variable words

Miscellaneous SMACRO words

Predefined SMACRO variable words

SMACRO declaration words

B-47

B-57

B-90

B-58

B-54 7-3

2: fa

2e

2IN

20UT

2pi

SMACRO declaration words

FORTH words

FORTH words

FORTH words

SMACRO operator words

B-55

B-47

B-47

B-47

B-65

7-3

3#

32767#

4#

4-SMACRO

5#

Predefined SMACRO variable words

Predefined SMACRO variable words

Predefined SMACRO variable words

Miscellaneous SMACRO words

Predefined SMACRO variable words

B-57

B-57

B-57

B-90

B-57

6#

6-SMACRO

7#

8#

8-SMACRO

Predefined SMACRO variable words

Miscellaneous SMACRO words

Predefined SMACRO variable words

Predefined SMACRO variable words

Miscellaneous SMACRO words

B-57

B-90

B-57

B-57

B-90

87INIT

9#

C~EXEC

L

Miscellaneous RCS words

Predefined SMACRO variable words

FORTH words

FORTH words

Miscellaneous RCS words

B-36

B-57

B-47

B-48

B-36

6-15

6-4

:1

:L~EXEC

:0K

:R:r

Miscellaneous RCS words

FORTH words

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous RCS words

B-36

B-48

B-37

B-37

B-37

7-18

6-2

6-4

7-18

:S

:S-EXEC

;s

•<=

Miscellaneous RCS words

FORTH words

Miscellaneous RCS words

FORTH words

SMACRO declaration words

B-37

B-48

B-37

B-48

B-55

6-9

7-18

ASCII Sequence;

! " # $ 56 & ' ( ) » - . / 0...9 : ;<=>?« Aa...Zz [ \ ] " _ { I } -

USER WORD LIST

B-7
WORD GROUP HEADING

<PAGE

=>r>SEG

>PAGE

Miscellaneous RCS words

Miscellaneous RCS words

SMACRO operator words

SMACRO operator words

Miscellaneous RCS words

APPENDIX

PAGE #

B-37

B-37

B-65

B-65

B-37

MANUAL

PAGE #

6-9

7-10

e

??ARR

?LOC

7M0VE-T0

7MTB

FORTH words

RSL operating system words

RSL operating system words

RSL operating system words

RSL operating system words

B-il8

B-94

B-94

B-95

B-95

6-24

11-3

?OBJ

?POSE

@

a#

a-sysmax

RSL operating system words

RSL operating system words

FORTH words

SMACRO operator words

JOINT parameters

B-95

B-95

B-48

B-65

B-105

AA>Q

abort

abort-f

ABT

add-list

Miscellaneous RCS words

SMACRO statement words

Control-level words

RSL operating system words

SMACRO file-operation words

B-38

B-84

B-108

B-95

B-80 13-4

add-record

ADD-TO-TAPE

approach-pickup

approach-release

arr

SMACRO file-operation words

Tape words

Language words

Language words

Language words

B-80

B-28

B-101

B-102

B-102

7-13

6-29

9-5

9-5

6-9

ass/rec

AUTO?

avail-record

B

B»

SMACRO file-operation header variable words B-78

MBOOT/CUSTOM words B-19

SMACRO file-operation header variable words B-78

Editing words

SMACRO operator words

6-15

B-30

B-65

6-23

7-9

B-65

B-66

B-84

B-66

B-49

7-9

7-9

7-15

B+

fi- b-fill

B-to-stack

B.

SMACRO operator words

SMACRO operator words

SMACRO statement words

SMACRO operator words

FORTH words

ASCII Sequence:

. / 0...9 : ;<=>?§ Aa...Zz [ \ ] " _ { I } ~

USER WORD LIST

B-8
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

B/

B=>

BACKGROUND

BACKUP

BAD-TAPE

SMACRO operator words

SMACRO operator words

FORTH words

Tape words

Tape words

B-66

B-66

B-49

B-28

B-28

7-9

7-10

6-29

6-29

BASE

Basic

BI

blank

BLOCKS

Miscellaneous RCS words

MBOOT-CUSTOM words

Miscellaneous RCS words

SMACRO statement words

Editing words

B-38

B-19

B-38

B-84

B-30

5-11

6-23

Board-sem-initialize

BOOT-BASE-SYSTEM

BOOT-SYSTEM

buffer-ready-f

BUILD

Remote-slave words

MBOOT/CUSTOM words

MBOOT/CUSTOM words

COMM words

FORTH words

B-33

B-19

B-20

B-92

B-49

13-15

D-1

5-14

8-3

bv

bytes

bytes/record

cart case

SMACRO declaration words B-55 7-3

SMACRO declaration words B-55 7-4

SMACRO file-operation header variable words B-79

Language words B-102 9-7

SMACRO statement words B-85 7-17

case:

CBOOT

CLEAR

clear-list

CLR-BIT

SMACRO statement words

MBOOT/CUSTOM words

Editing words

SMACRO file-operation words

FORTH words

B-85

B-20

B-30

B-80

B-49

7-17

5-10

6-23

13-4

COMM COMM words

COMM-PROCESS COMM words

control-cycle-#-clks

COMM words

cos {angle} Predefined SMACRO variable words

CPRINT Printing words

B-92

B-92

B-92

B-58

B-26

4-3

6-15

6-28

CR

creep-delta

creep-vel

CUSTOM

CUSTOM?

Miscellaneous RCS words

JOINT parameters

JOINT parameters

MBOOT/CUSTOM words

MBOOT/CUSTOM words

B-38

B-106

B-106

B-20

B-20

6-15

10-49

10-49

4-3

D-1

ASCII Sequence:

- . / 0...9 : ;<=>?§ Aa...Zz [ \ ] { I } -

USER WORD LIST

B-9
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

cycle-count

cycle-time

D>M

Datamedia

Predefined SMACRO variable words

Control-level words

MBOOT/CUSTOM words

Terminal words

Datamedia-terminal Editing words

B-58

B-108

B-20

B-2M

B-31

B-38

B-38

B-20

B-2l|

B-26

4-5

5-12

5-12

DBG-OFF

DBG-ON

dbottom

DC

Dec-writer

Miscellaneous RCS words

Miscellaneous RCS words

MBOOT/CUSTOM words

Terminal words

Printing words

7-1

A-3

5-13

DECIMAL

default:

default-state:

DEFINITIONS

deg

Miscellaneous RCS words

SMACRO statement words

SMACRO statement words

Miscellaneous SMACRO words

Miscellaneous RCS words

B-39

B-85

B-85

B-90

B-39

6-15

7-17

3-3

6-4

depart-pickup

depart-release

Disk-fix

Display

DM?

Language words

Language words

MBOOT/CUSTOM words

Control-level words

MBOOT/CUSTOM words

B-102

B-102

B-21

B-109

B-21

9-5

9-5

6-8

6-13

do

dpage

dtop

DUMP

ED

SMACRO statement words

MBOOT/CUSTOM words

MBOOT/CUSTOM words

FORTH words

Editing words

B-85

B-21

B-21

B-49

B-31

7-10

A-3

A-3

6-16

ed

Ed-extend

EDIT

ELOAD

else

Editing words

Editing words

Editing words

Remote-slave words

SMACRO statement words

B-31

B-31

B-31

B-34

B-85

6-27

6-17

end-case

end-do

end-repeat

end-routine

end-state-table

SMACRO statement words

SMACRO statement words

SMACRO statement words

SMACRO declaration words

SMACRO statement words

B-85

B-85

B-85

B-55

B-85

7-17

7-10

7-10

4-4

3-3

ASCII Sequence:

! " # $ 5t & » ( ) • - . / 0...9 : ; < = > ? @ Aa...Zz [ \ ] " _ { I } ~

USER WORD LIST

B-10
APPENDIX MANUAL

WORD GROUP HEADING PAGE # PAGE #

end if SMACRO statement words B-86 6-17

enter-interrupt SMACRO statement words B-86 4-4

EQ B SMACRO Boolean-operator words B-77 7-11 erase SMACRO statement words B-86 6-1

ERASE-COMM-TABLE COMM words B-92 8-3

error-list Control-level words B-109

Esc Miscellaneous RCS words B-39

exit-interrupt SMACRO statement words B-86 4-4

F» FORTH words B-49

F+ FORTH words B-50

F- FORTH words B-50

F-ABS FORTH words B-50

F-MEM Miscellaneous RCS words B-39 9-8

f-segment SMACRO file-operation header variable words B-79

f-template SMACRO file-operation header variable words B-79

F. FORTH words B-50

F/ FORTH words B-50 A4

F>I SMACRO operator words B-66

false Predefined SMACRO variable words B-58 13-11

Fastbaud Terminal words B-24

fbottom MBOOT/CUSTOM words B-21 A-2

FILE SMACRO declaration words B-55 7-12

file-start SMACRO file-operation header variable words B-79

File-var SMACRO file-operation variable words B-78

FIND Editing words B-31 6-23

FIND-R Editing words B-32 6-23

first-record SMACRO file-operation header variable words B-79

FLOAT FORTH words B-50

fpage MBOOT/CUSTOM words B-22 A-2

from-stack SMACRO operator words B-66 7-15

FROM-TAPE Tape words B-29 5-11

ftop MBOOT/CUSTOM words B-22 A-2

Function-keys Terminal words B-24

fv SMACRO declaration words B-56 7-3

GET-FROM-DISK Miscellaneous RCS words B-39

ASCII Sequence:

! " # $ 5t & ' ( )»+,-./ 0... 9 : ; < = > ? e Aa...Zz [ \ ] " _ { I } -

USER WORD LIST

B-11
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

GE_B

GO

goal

goto

GT B

SMACRO Boolean-operator words

RSL operating system words

Language words

Language words

SMACRO Boolean-operator words

B-77

B-96

B-103

B-103

B-77

7-11

6-2

9-7

9-5

7-11

H.

HALT

HEX

I>F

identity-pose

FORTH words

RSL operating system words

Miscellaneous RCS words

SMACRO operator words

Predefined SMACRO variable words

B-50

B-96

B-39

B-66

B-58

"B=B5~

B-26

B-67

B-109

B-67

6-11

6-15

6-17

5-13

7-15

6-9

if

Image-writer

in-port

inc-command-#-in

index-on

SMACRO statement words

Printing words

SMACRO operator words

Control-level words

SMACRO operator words

init-cm

INPUT

INV-TOOL-MTB

IRR

iv

MBOOT/CUSTOM words

FORTH words

RSL parameters

FORTH words

SMACRO declaration words

Language words

PRIM parameters

RSL operating system words

PRIM parameters

PRIM parameters

B-22

B-51

B-108

B-51

B-56

5-13

7-3

joint

joint-traj-delay

Joint/comm

joy-max-v

joy-max-w

B-103

B-107

B-96

B-107

B-108

9-7

6-15

10-46

^o-ne

JS

L

LE_B

LIST

List-directory

Control-level words

Editing words

SMACRO Boolean-operator words

Editing words

Printing words

B-109

B-32

B-77

B-32

B-26

13-2

6-23

7-11

6-8

6-29

List-display

LIST-0

List-programs

Ij-limit

LOAD

Control-level words

Miscellaneous SMACRO words

Printing words

JOINT parameters

Miscellaneous RCS words

B-109

B-91

B-26

B-106

B-iiO

7-4

6-29

5-13

ASCII Sequence:

. / 0...9 : ;<=>?§ Aa...Zz [ \ ] * _ { I } ~

USER WORD LIST

B-12
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

load

LOG

loc

LOCATE-OFF

LOCATE-ON

Miscellaneous RCS words

Miscellaneous RCS words

Language words

FORTH words

FORTH words

B-40

B-40

B-103

B-51

B-51

6-7

6-4

6-9

LT_B m

MAP

mask-with

Master

SMACRO Boolean-operator words

Miscellaneous SMACRO words

MBOOT/CUSTOM words

SMACRO operator words

Remote-slave words

B-77

B-91

B-22

B-67

B-34

7-11

13-14

6-7

matches

matches-fields

matches-fields-r

matches-r

max-cycle-time

SMACRO Boolean file-operation words

SMACRO Boolean file-operation words

SMACRO Boolean file-operation words

SMACRO Boolean file-operation words

Control-level words

B-83

B-83

B-83

B-84

B-109

7-11

7-11

7-11

7-11

max/rec

MBOOT

mem

MEM>DISK

min-cycle-time

SMACRO file-operation header variable words B-79

MBOOT/CUSTOM words B-22 4-3

SMACRO declaration words B-56 7-6

MBOOT/CUSTOM words B-22 5-12

Control-level words B-110

MONITOR

MOVE

move

move-to

MOVE-TO

Remote-slave words

FORTH words

SMACRO statement words

Language words

TASK command words

B-34

B-51

B-87

B-103

B-104

3-7

6-8

MS Miscellaneous RCS words

N Editing words

next-point-scale-threshold

JOINT parameters

next-record SMACRO file-operation variable words

NE_B SMACRO Boolean-operator words

B-40

B-32

B-106

B-78

B-77 7-11

not-ready

NQUIT

nul

nzOFFSET

Predefined SMACRO variable words

Miscellaneous RCS words

Language words

Miscellaneous RCS words

Miscellaneous RCS words

B-58

B-40

B-103

B-40

B-41

8-3

6-8

5-14

ASCII Sequence:

! " # $ 5t & • ()»+,-./ 0... 9 : ; < = > ? @ Aa...Zz [ \ ] " _ { i } ~

DSER WORD LIST

B-13
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

OLOAD

Opaq

out-port

OUTPUT

overflow-cycle

Miscellaneous RCS words

Terminal words

SMACRO operator words

FORTH words

Control-level words

B-41

B-25

B-67

B-51

B-110

7-15

PAGE

page

PAGE-MOVE

PAGE-SEG-ERASE

Paper-tiger

Miscellaneous RCS words

Miscellaneous SMACRO words

Miscellaneous RCS words

Miscellaneous RCS words

Printing words

B-41

B-91

B-41

B-41

B-27

13-4

5-13

PAUSE

PDEF

PDUMP

PI

pi

TASK command words

Control-level words

Miscellaneous RCS words

FORTH words

SMACRO operator words

B-104

B-110

B-41

B-51

B-67

6-8

6-3

pi/2

PIC

PMAP

PMS

POFF

SMACRO operator words

FORTH words

MBOOT/CUSTOM words

Miscellaneous RCS words

RSL operating system words

B-67

B-52

B-23

B-42

B-96

13-2

Poff

PON

Pon

PRESERVE

PRESERVE-FILE

Terminal words

RSL operating system words

Terminal words

MBOOT/CUSTOM words

MBOOT/CUSTOM words

B-25

B-96

B-25

B-23

B-23

5-13

5-13

Prim

Print

print-f

PRINT-TIME

Printing

RSL operating system words

Printing words

Control-level words

Miscellaneous RCS words

Printing words

B-97

B-27

B-110

B-42

B-27

B-28

B-42

B-32

B-42

B-32

6-28

6-26

13-5

Pset-tab

QMS

QR

QS

Query-replace

Printing words

Miscellaneous RCS words

Editing words

Miscellaneous RCS words

Editing words

6-24

ASCII Sequence:

. / 0...9 : ;<=>?§ Aa...Zz [ \ ] " _ { I } ~

USER WORD LIST

B-14
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

r-tool

R-WITH

rad

RCS

READ"

Language words

Editing words

Miscellaneous RCS words

MBOOT/CUSTOM words

SMACRO operator words

B-10M

B-33

B-42

B-23

B-67

9-6

e-2k

5-13

ready

rec record*

RECORD-POSE

RED

Predefined SMACRO variable words

SMACRO declaration words

SMACRO file-operation variable words

RSL operating system words

Editing words

B-58

B-56

B-78

B-97

B-33

8-3

7-12

6-17

9-7

13-12

red

ref-blk

REMOTE

REMOTE-SLAVE

remove

Editing words

Miscellaneous RCS words

Remote-slave words

Remote-slave words

SMACRO file-operation words

B-33

B-42

B-34

B-34

B-80

B-87

B-58

B-105

B-93

B-23

6-25

6-8

6-3

5-13

13-^

repeat SMACRO statement words

reset Predefined SMACRO variable words

RESTART TASK command words

RESTART-COMM-TIMER COMM words

RESTORE MBOOT/CUSTOM words

B-28

B-23

B-81

B-81

B-81

7-10

6-8

6-15

6-11

Restore Printing words

RESTORE-FILE MBOOT/CUSTOM words

retrieve SMACRO file-operation words

re trieve-from-field

SMACRO file-operation words

retrieve-from-fields

SMACRO file-operation words

retrieve-l&r

retrieve-link

retrieve-source

rot-angle

rot-axis

SMACRO file-operation words

SMACRO file-operation words

SMACRO file-operation words

Predefined SMACRO variable words

Predefined SMACRO variable words

B-81

B-81

B-81

B-58

B-59

6-11

13-4

6-17

13-4

ROUND

routine

S-EQ

S-VAR-0

S=>

FORTH words

SMACRO declaration words

SMACRO Boolean-operator words

SMACRO declaration words

SMACRO statement words

B-52

B-56

B-77

B-56

B-87

4-4

7-4

6-17

ASCII Sequence:

. /0. ..9: ;<=>?§ Aa...Zz[\] { I } -

OSER WORD LIST

B-15
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

SAVE-ON-DISK

sd

SDEF

SEG-DUMP

SEG-MOVE

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous SMACRO words

Miscellaneous RCS words

Miscellaneous RCS words

B-43

B-it3

B-92

B-43

B-43

6-3

SEG=>

segv

set

SET-BIT

set-bit-in

SMACRO operator words

SMACRO declaration words

Predefined SMACRO variable words

FORTH words

SMACRO statement words

B-68

B-57

B-59

B-52

B-87

7-3

7-15

seqv

SHOW-TABLE

sin{angle}

Slave

Small

SMACRO declaration words

COMM words

Predefined SMACRO variable words

Remote-slave words

Printing words

B-57

B-93

B-59

B-3^

B-28

B-78

B-52

B-87

B-88

B-82

7-3

5-13

source-blk

SORT

state

state-table

store

SMACRO file-operation variable words

FORTH words

SMACRO statement words

SMACRO statement words

SMACRO file-operation words

2-5

13-4

store-l&r SMACRO

store-link SMACRO

store-source SMACRO

store-to-field SMACRO

store-to-fields SMACRO

file-operation words

file-operation words

file-operation words

file-operation words

file-operation words

B-82

B-82

B-82

B-82

B-82

13-4

13-4

strv

SYNC

t-base

t-tool

TAB

SMACRO declaration words

Remote-slave words

Language words

Language words

Miscellaneous RCS words

B-57

B-34

B-104

B-104

B-43

7-3

9-6

TALK\

TAPE

Task/path

TDEF

TDOC

Remote-slave words

Tape words

RSL operating system words

Control-level words

Tape words

B-35

B-29

B-97

B-110

B-29

5-11

6-11

6-3

ASCII Sequence:

!"# $ 5^ &'()•+, - . / 0...9 : ;<=>?§ Aa...Zz [ \ ] " _ { I } -

USER WORD LIST

B-16
APPENDIX MANUAL

WORD GROUP HEADING PAGE # PAGE #

Televideo Terminal words B-25 5-12

Televideo-terminal Editing words B-33 5-12

TGOTO Tape words B-29 5-11

then SMACRO statement words B-88 6-17

THRU B-43

Thru-tv Terminal words B-25 6-29

TIME-OUT-INIT Miscellaneous RCS words B-44 6-15

TIME-P Miscellaneous RCS words B-44 13-2

TIMER-READ Miscellaneous RCS words B-44

TIMER-START Miscellaneous RCS words B-44

TO-DESTINATION COMM words B-93 8-3

to-stack SMACRO operator words B-68 7-15

tool Language words B-104 12-20

TOOL-MTB RSL parameters B-108

tp-cycles Path parameters B-107

Tran Terminal words B-25

TRANSFER TASK command words B-105 6-7

TRANSFER-FROM COMM words B-93 8-3

TREWIND Tape words B-29 5-11

true Predefined SMACRO variable words B-59 6-26

TT RSL operating system words B-97 13-4

TTT RSL operating system words B-97 13-9

TUNLOAD Tape words B-29

TYPE-POSE RSL operating system words B-97 9-7

uj-limit JOINT parameters B-106

until SMACRO statement words B-88 7-10

V-SIZE Miscellaneous RCS words B-44 6-3

v-sysmax JOINT parameters B-107

VAR-0 SMACRO declaration words B-57 7-4

VOCABULARY SMACRO declaration words B-57

VT100 Terminal words B-26 5-12

VT 100- terminal Editing words B-33 5-12

w-fill SMACRO statement words B-88

WAIT-FOR-NEXT-COMM-CYCLE

COMM words B-93

WAIT-TASK-DONE Control-level words B-110

ASCII Sequence:

! " # $ Sf & ' ( )«+,-./ 0... 9 : ; < = > ? @ Aa...Zz [ \ ] { I } -

USER WORD LIST

B-17
WORD GROUP HEADING

APPENDIX

PAGE #

MANUAL

PAGE #

WFIX

while

WREAD

WUNLOAD

XX

MBOOT/CUSTOM words

SMACRO statement words

SMACRO operator words

MBOOT/CUSTOM words

Miscellaneous SMACRO words

B-24

B-89

B-68

B-24

B-89

7-10

7-18

6-30

X Y Z zero-bit-in

\L

\1

\N

Predefined SMACRO variable words

SMACRO statement words

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous RCS words

B-59

B-89

B-45

B-45

B-45

7-15

7-18

7-18

7-18

\n

\R

\r

\S

\s

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous RCS words

Miscellaneous RCS words

B-45

B-45

B-45

B-45

B-45

7-18

7-18

7-18

7-18

7-18

'^EQ'

X

{ }

Miscellaneous RCS words

SMACRO Boolean-operator words

Remote-slave words

SMACRO operator words

Miscellaneous SMACRO words

B-45

B-78

B-35

B-68

B-89

7-15

6-2

7-10

-I'?

'e'C! 'ce

FORTH words

FORTH words

FORTH words

FORTH words

FORTH words

B-52

B-52

B-53

B-53

B-53

13-^

6-9

"DUMP

'F"F! 'F? 'Fe

Miscellaneous RCS words

SMACRO statement words

FORTH words

FORTH words

FORTH words

B-45

B-89

B-53

B-53

B-53

6-25

'FR?

'INTERRUPT

'MEM

-MOVE

'PRINT

FORTH words

Miscellaneous SMACRO words

Miscellaneous RCS words

Miscellaneous RCS words

SMACRO statement words

B-53

B-92

B-46

B-46

B-89

H-i\

6-25

•PRINT"

're-init-file

"update-header

SMACRO statement words

SMACRO file-operation words

SMACRO file-operation words

B-89

B-83

B-83

6-25

13-4

ASCII SequeDce:

!"#$5{&' ( )*+,-./0...9: ;< = >?& Aa, ,Zz [ \ ] { I } -

USER WORD LIST

B-18
B.I RCS WORDS

This section describes user words defined in RCS, including SMACRO and COMM.

The RCS words include:

• Operating system words

• FORTH words

• SMACRO words

• COMM words

All block references are absolute, unless otherwise indicated.

Operating System Words

The operating system words include!

• MBOOT/CUSTOM words

• Terminal words

• Printing words

• Tape words

• Editing words

• Remote-slave words

• Miscellaneous words

MBOOT/CUSTOM words

% AUTO?

[d>m#] AUTO?

Lists the auto-load block for the specified D>M# on the current board.

Basic

Basic

Loads the second half of the basic FORTH system. Use this word after

MBOOT and before other load words.

BOOT-BASE-SYSTEM

BOOT-BASE-SYSTEM

Loads absolute block 1490 to boot the base system (1 D>M) on each board,

RCS WORDS: MBOOT/CUSTOM Words

B-19
BOOT-SYSTEM

BOOT-SYSTEM ,

Loads block 1460 to boot the slave boards in the system. You may edit

blocks 1460 through 1469 to configure the boot process.

CBOOT

[board#] CBOOT

Boots the Winchester disk from the board that you specify using board#.

Use CBOOT at power-up only.

CUSTOM

[custom#] CUSTOM

Loads a block (block 1370 + custom#) that loads a custom set of utilities

on the current board for an application. You must set up and maintain

this custom# block.

CUSTOM?

[custom#] CUSTOM?

Lists the custom block if the argument is present; lists the custom map

block if the argument is not present.

D>M

[d>m#] D>M

Loads a specified D>M image from disk to memory and loads the auto-load

block,

dbottom

dbottom

Specifies the bottom 20-bit address used by the system dictionary. The

pointer value in this FORTH variable consists of a segment and an offset

within the megabyte page specified by the dpage variable. You must set

the value above 1FFFF because a processor board interprets any lower

address as an on-board address instead of a common memory address. You

set dbottom in block 1402. (See also dpage and dtop)

RCS WORDS: MBOOT/CDSTOM Words

B-20
Disk-fix

Disk-fix

Loads the disk-patching utility.

DM?

[board//] DM?

Lists the D>M map block. If the argument is present, this word lists the

D>M map for the specified board. If the argument is not present, this

word lists the D>M map for the current board.

dpage

dpage

Specifies which megabyte page (using a pagecode) in common memory con- tains the system dictionary. You can use >PAGE to store a pagecode value

in this FORTH variable. You set the dpage variable in block 1402. (See

also >PAGE, under "Miscellaneous RCS words", dtop, and dbottom)

dtop

dtop

Specifies the top 20-bit address used by the system dictionary. The

pointer value in this FORTH variable consists of a segment and an offset

within the megabyte page specified by the dpage variable. You set the

dtop variable in block 1402. (See also dpage and dbottom)

fbottom

fbottom

Specifies the bottom 20-bit address used by the SMACRO files. The

pointer value in this FORTH variable consists of a segment and an offset

within the megabyte page specified by the fpage variable. You must set

the value above 1FFFF because a processor board interprets any lower

address as an on-board address instead of a common memory address. You

set the fbottom in block 1402. (See also fpage and ftop)

RCS WORDS: MBOOT/CDSTOM Words

B-21
fpage

fpage

ftop

Specifies which megabyte page (using a pagecode) in common memory con- tains the SMACRO files. You can use >PAGE to store a pagecode value in

this FORTH variable. You set the fpage variable in block 1402. (See

also >PAGE, under "Miscellaneous RCS words", ftop, and fbottom)

ftop

Specifies the top 20-bit address used by the SMACRO files. The pointer

value in this FORTH variable consists of a segment and an offset within

the megabyte page specified by the fpage variable. You set the ftop

variable in block 1402. (See also fpage and fbottom)

init-cm

init-cm

Initializes the common memory space by filling it with zeros. Block 1405

defines the area to be initialized. (When editing block 1405, you should

also edit block 1402, which sets the common memory pointer variables)

MAP

MAP

Lists the first map block.

MBOOT

[board#] MBOOT

Loads the first half of the basic FORTH system by loading block 9 from

1000 OFFSET. Use MBOOT at power-up and following a reset, and follow it

with Basic to load the second half of the basic FORTH system, or D>M to

boot a finished system.

MEM>DISK

[d>m#] MEM>DISK

Writes a D>M image of memory to disk and assigns a number to the image.

RCS WORDS: MBOOT/CDSTOM Words

B-22
PMAP

PMAP

Lists the preserve map block.

PRESERVE

[preserve*] PRESERVE

Writes an image (identified by preserved) of the current system dictionary to disk. (See also RESTORE)

PRESERVE-FILE

[preserve-file*] PRESERVE-FILE

Writes the current user files to disk. (See also RESTORE-FILE)

RCS

RCS

Loads RCS. Note that the system ignores any words typed after this word

on the same line.

RESTORE

[preserve*] RESTORE

Restores the specified system dictionary image from disk. (See also

PRESERVE)

RESTORE-FILE

[preserve-file*] RESTORE-FILE

Restores a specified set of user files from disk. (See also

PRESERVE-FILE)

RCS WORDS: MBOOT/COSTOM Words

B-23
WFIX

[block#] WFIX

Reformats the portion of the disk containing the specified block. This

word displays the range of blocks that would be affected by the reformatting and asks you to confirm that the reformatting is to take place.

This reformatting process usually repairs blocks that generate disk

errors.

WUNLOAD

WUNLOAD

Unloads the heads and powers down the drive motor of the Winchester disk

drive. You must use this command before you turn off the system.

Terminal words

Datamedia

Datamedia

Loads the control words required to use a Datamedia Elite 1521 A terminal

as the system console. (See also EDIT under "Editing words")

DC

[row] [column] DC

Positions the cursor at the specified row and column.

Fastbaud

Fastbaud

Sets the communication rate of the board to 19,200 baud. After issuing

this word, you must also set the terminal communication rate to 19,200

baud. For the TeleVideo 950, Fastbaud sets the rate to 19,200 automatically. For the VT100, you must set the baud rate manually. Fastbaud is

inappropriate for the Datamedia because the Datamedia does not operate at

19,200 baud.

Function-keys

Function-keys

Programs the function keys by loading block 1^05. You may edit block

1405 to customize the operations of the function keys.

RCS WORDS: Terminal Words

B-2it
Opaq

Opaq

Stops sending output to the printer. This word cancels the action of

Opaq. This word operates only when used with a TeleVideo 950 terminal.

(See also Tran)

Poff

Poff

Disables the printer port on the terminal so that output sent to the terminal is not also sent to the printer. (See also Pon)

Pon

Pon

Enables the printer port on the terminal so that output sent to the terminal is also sent to the printer. (See also Poff)

Televideo

Televideo

Loads the control words required to use a TeleVideo 950 terminal as the

system console. (See also EDIT under "Editing words")

Thru-tv

Thru-tv [words]

Executes Tran to send output to the printer, executes the words you enter

at the keyboard, then executes Opaq to stop sending the output to the

printer. This word operates only when used with a TeleVideo 950 terminal

or a VT100 terminal.

Tran

Tran

Sends all output to the system printer, including all control sequences

that the terminal normally intercepts and interprets. This word operates

only when used with a TeleVideo 950 terminal. (See also Opaq)

RCS WORDS: Terminal Words

B-25
VT100

VT100

Loads the control words required to use a DEC VT100 or compatible terminal as the system console. (See also EDIT under "Editing words")

Printing words

CPRINT

[start block*] [end block*] CPRINT

Prints the specified range of blocks at a density of 10 blocks per page.

Dec-writer

Dec-writer

Loads the control words required to use a Digital Equipment Corporation

DECwriter III as the system printer. (See also Printing)

Image-writer

Image-writer

Loads the control words required to use an Apple Imagewriter as the system printer. (See also Printing)

List-directory

List-directory

Places RCS in the list-directory mode, which is similar to the listprograms mode except that list-directory mode prints the comments (lines

3 through 11) in the load blocks instead of listing the program blocks.

These lines should provide a directory to the code contained in each

block.

List-programs

List-programs

Places RCS in the list-programs mode. In this mode, RCS prints at least

10 blocks per page (more if the blocks contain blank lines). The actual

number of blocks printed per page depends on the format of the 10-block

load block structure.

RCS WORDS: Printing Words

B-26
i

t

The best way to use this utility is to set up a block that lists an entire level as follows:

List-programs

Small

100 LOAD

200 LOAD

301 load 380 load

Restore

The word List-programs redefines "load" to be the listing word at the

beginning of the block, and the word Restore puts back the FORTH definition at the end of the block. The word Small instructs the printer to use condensed type. 100 LOAD prints the blocks normally loaded by 100;

this block is assumed to use "load" (and not "LOAD") to load 10-block

segments.

RCS prints only the nonblank lines from each block actually loaded. RCS

enhances the printing of the first line of each 10-block load block to serve as a label for the load block. (It does not print the rest of the

10-block load block)

RCS does not print the first line of each program block because it

assumes that the first line contains a vocabulary identifier. RCS prints

the block number on the line above the block and, if the current page

does not have enough room to print a complete 10-block load block, RCS

begins a new page.

Paper-tiger

Paper-tiger

Loads the control words required to use an Integral Data Systems Paper

Tiger as the system printer. (See also Printing)

Print

[start block#] [end block#] Print

Prints the specified range of blocks at a density of three blocks per

page.

Printing

Printing

Loads the printing utilities. Use this word after you select a specific

printer. (See also Dec-writer, Image-writer, and Paper-tiger)

RCS WORDS: Printing Words

B-27
Pset-tab

[column^] Pset-tab

Sets a printer tab stop at the specified column. (The first column is

column 1

)

Restore

Restore

Returns you to the mode you were using before you entered the

List-programs word or the List-directory word.

Small

Small

Selects condensed printing for the printers.

Tape words

ADD-TO-TAPE

[absolute start block#] [absolute end block#] ADD-TO-TAPE

Begins at the current tape position and writes the specified range of

blocks to tape.

BACKUP

BACKUP

Lists the backup block. You can edit this block to specify customized

tape backup procedures.

BAD-TAPE

[absolute start block#] [absolute end block//] BAD-TAPE

Extends the previous file (while preserving file numbers) on the tape to

cover a bad section detected by an attempted ADD-TO-TAPE. BAD-TAPE cannot work if the first file on the tape is bad.

RCS WORDS: Tape Words

B-28
t

FROM-TAPE

[absolute start block* ] [absolute end block*] FROM-TAPE

Begins at the current tape position and loads the specified range of

blocks into memory.

TAPE

TAPE

Loads the tape utility.

TDOC

[absolute start block*] [absolute end block*] [file*] TDOC

Moves the tape to the start of the specified file and then displays the

start and end blocks. TDOC also leaves the start block* and end block*

on the stack.

TGOTO

[file*] TGOTO

Moves the tape to the beginning of the specified file.

TREWIND

TREWIND

Rewinds the tape to the beginning.

TUNLOAD

TUNLOAD

Unloads the tape. RCS does not wait for the tape to finish unloading

before executing the next word you enter.

Editing words

*LLIST

[block*] #LLIST

Lists a block (specified by its relative block number) with relative and

absolute block numbers, but without line numbers.

RCS WORDS: Editing Words

B-29
0ED

0ed

[absolute block#] 0ED or [absolute block#] 0ed

Makes a block (specified by its absolute block number) the current block

and then enters the screen editor. (Loaded by EDIT)

(see 0ED)

0LIST

[absolute block#] 0LIST

Lists a block (specified by its absolute block number) with relative and

absolute block numbers and with line numbers.

0LLIST

[absolute block#] 0LLIST

Lists a block (specified by its absolute block number), but without line

numbers.

B

B

Decrements the current block number for listing or editing nearby blocks.

BLOCKS

[source block//] [destination block#] [#blocks] BLOCKS

Copies a number of blocks (specified by //blocks) from the source block

number to the destination block number. The source and destination block

ranges can overlap. (Loaded by Ed-extend)

CLEAR

[start block//] [end block//] CLEAR

Clears the specified range of blocks by filling the blocks with spaces.

(Loaded by Ed-extend)

RCS WORDS: Editing Words

B-30
Datamedia-terminal

Datamedia-terminal

Customizes the screen editor for the Datamedia terminal. (Loaded by

EDIT)

ED

ed

[block#] ED or [block*] ed

Makes a block (specified by its relative block number) the current block

and then enters the screen editor. If no block number is entered, the

screen editor is entered at the current block. (Loaded by EDIT)

(See ED)

EDIT

EDIT

Loads the screen editor. One of the following terminal customization

words must follow the word EDIT: TeleVideo-terminal, Datamedia-terminal,

or VT100-terminal. EDIT also loads the following screen editor words:

TeleVideo-terminal, Datamedia-terminal, VT 100- terminal, ED, ed, 0ED, 0ed,

RED, and red.

Ed-extend

Ed-extend

Loads the following command extensions to the line editor: BLOCKS,

CLEAR, FIND, FIND-R, and R-WITH.

FIND

[start block#] [end block*] FIND [string"]

Locates and displays each line within the specified block range containing the specified string. (Loaded by Ed-extend)

RCS WORDS: Editing Words

B-31
FIND-R

[start block#] [end block*] FIND-R [string*]

Locates and replaces all occurrences of the specified string within the

specified block range. You must precede FIND-R with R-WITH to specify

the replacement string. (Loaded by Ed-extend) (See also R-WITH)

L

Lists the current block with line numbers.

LIST

[ block* ] LIST

Lists a block (specified by its relative block number) with line numbers.

N

N

Increments the current block number for listing or editing nearby blocks.

QR

[start block*] [end block*] QR

Prompts you for the search and replace strings, then searches through the

specified range of blocks for the first occurrence of the search string.

After matching the search string, QR waits for you to enter a space, Y, or y, before replacing the string and then continuing to search for the

next occurrence.

You can enter a question mark (?) to receive help information. Entering

any other character causes QR to leave the matched string unchanged and

search for the next occurrence. (Loaded by Query-replace)

Query-replace

Query-replace

Loads the QR utility. (See also QR)

RCS WORDS: Editing Words

B-32
i

R-WITH

R-WITH [string"]

Places the specified string into the insert buffer. FIND-R uses the

string in the insert buffer as the replacement text for its search and

replace operation. (Loaded by Ed-extend) (See also FIND-R)

RED

RED or red

Makes current for editing the most recently accessed block on the most

recently accessed slave board. You must load RED by using 1124 0LOAD in

CUSTOM after you load the words Master and EDIT.

red

(See RED)

i

Televideo-terminal

Televideo-terminal

Customizes the screen editor for the TeleVideo 950 terminal. (Loaded by

EDIT)

VT 100- terminal

VT100-terminal

Customizes the screen editor for the VT100 terminal. (Loaded by EDIT)

Remote-slave words

Board-sem-initialize

[board segment] Board-sem-initialize

Initializes the semaphore used to control remote/slave operation. This

semaphore must be initialized by the master board for each slave board at

power-up.

RCS WORDS: Remote-Slave Words

B-33
ELOAD

[block#] ELOAD

Empties the local block buffers, then executes LOAD. You must use ELOAD

to reload a block onto a slave board after you have edited it from the

master board.

Master

Master

Loads the master utility.

MONITOR

[board segment] MONITOR

Displays all output from the specified board and then returns to the

master board when the slave becomes idle (waiting for input).

REMOTE

[board segment] REMOTE [stringX]

Places the master board into remote mode to communicate with the specified slave board, and then sends the slave board the specified string.

REMOTE-SLAVE

REMOTE-SLAVE

Places the current board into slave mode.

Slave

Slave

Loads the slave utility.

SYNC

[board segment] SYNC

Waits for the specified board to become idle (waiting for input).

C

RCS WORDS: Remote-Slave Words

B-34
TALK\

[board segment] TALK\ [string]

Sends the specified string to the specified board.

X

*x (This word is control-x, not caret-x)

Terminates slave mode on the current board and returns to the master

board, or returns from the master board to the most recently accessed

slave board.

Miscellaneous RCS words

" [string"] (This word consists of one double quotation mark character)

Displays the specified string. You can use this word in load blocks to

display comments during loading.

%

%%

f t

%

Indicates that the rest of the line is a comment.

Indicates that the rest of the block is a comment.

•' [string"] (This word consists of two single quotation mark

characters)

Reads a string of up to 256 characters from the keyboard or block. RCS

stores the string in a temporary area so you can use ==> to initialize a string variable.

RCS WORDS: Miscellaneous RCS Words

B-35
( [string] )

Enters a conunent that terminates with a closing parenthesis. You cannot

nest this kind of comment.

.Esc

.Esc [string]

Sends to the terminal an ASCII ESC code followed by the specified string,

You can use this word to program terminal options, such as function keys.

This word may be used only in FORTH words, and cannot be used in load

blocks. (See also Esc)

.^ [string] (This word consists of a period and a caret)

Converts the ASCII string into the corresponding control characters and

sends the control-character string to the terminal. You can use this

word to program terminal options, such as function keys. This word may

be used only in FORTH words, and cannot be used in a load block.

0LOAD

[absolute block#] 0LOAD

Loads the specified block from OFFSET, then restores the previous

OFFSET.

87INIT

87INIT

Initializes the 8087. All boards must execute 87INIT after booting RCS

at power-up.

:L

:L or :1

Places RCS in Locate mode.

:1

(See :L)

RCS WORDS: Miscellaneous RCS Words

B-36
:0K

ft :0K [string"]

Sets the system prompt to the specified string.

:R

:R

Places RCS in Run mode.

:r

See :R

:S

:S

Places RCS in Show mode.

:s W See :S

<PAGE

[pagecode] <PAGE

Converts a pagecode to a page number and leaves this page number on the

stack. (See also >PAGE)

==>

[values] ==> [variable]

Moves information from the stack to the specified variable in the current

vocabulary. RCS assumes that the information on the stack is correct for

the type of variable you specify.

>PAGE

[page#] >PAGE

Converts a page number to a pagecode and leaves the pagecode on the

Wfc stack. (See also <PAGE)

RCS HORDS: Miscellaneous RCS Words

B-37
AA>Q

[vector] [angle] AA>Q

Normalizes the specified vector and converts the vector and the access

angle (specified in radians) into a quaternion. This word leaves the

quaternion on the stack so that you can use ==> to initialize quaternion

variables.

BASE

BASE

Contains the current number base. The value of this variable affects all

input and output numbers. (See also BI, DECIMAL, and HEX)

BI

BI

Specifies base 2 operation. The action of this word affects all input

and output numbers. (See also BASE, DECIMAL, and HEX)

CR

CR

Sends to the terminal an ASCII carriage-return code followed by an ASCII

line-feed code.

DBG-OFF

DBG-OFF

Turns off debug load. (See also DBG-ON)

DBG-ON

DBG-ON

Turns on debug load. Debug load performs three tasks: displays each

block number before it is loaded, aborts the load if BASE is not decimal,

and displays any numbers still on the stack after each block is loaded.

Some of these numbers appear while loading SMACRO code, but any numbers

remaining on the stack when loading is complete indicate one or more

errors. (See also DBG-OFF)

RCS WORDS: Miscellaneous RCS Words

B-38
•

DECIMAL

DECIMAL

deg

Specifies base 10 operation. The action of this word affects all input

and output numbers. (See also BASE, BI, and HEX)

[angle in degrees] deg

Converts floating-point angle measurements from degrees to radians and

leaves the converted value on the stack.

Esc

Esc [string]

Sends to the terminal an ASCII ESC code, followed by the specified

string. You can use this word to program terminal options, such as function keys. This word may be used only in a load block, and cannot be

used in a FORTH word. (See also .Esc)

F-MEM

F-MEM

Displays the current, minimum, and maximum highest address for the system

dictionary and user files.

GET-FROM-DISK

[page] [segment] [page address] [start block#] [#blocks] GET-FROM-DISK

Moves #blocks * 1024 bytes of data from the disk beginning at the start

block# (specified by its absolute block number) to the specified RAM page

address. (See also SAVE-ON-DISK)

HEX

HEX

Specifies base 16 operation. The action of this word affects all input

and output numbers. (See also BASE, BI, and DECIMAL)

RCS HOR0S: Miscellaneous RCS Words

B-39
LOAD

[block*] LOAD

Loads the specified block.

load

[ block* ] load

Loads the specified block relative to the current ref-blk. (See also

ref-blk)

LOG

LOG [word]

Lists the source block for the specified word. The error message,

Pre-locate, indicates that you cannot list the specified word.

MS

MS [matrix variable]

Displays the name of the specified matrix variable and then displays its

contents.

NQUIT

NQUIT

Gorrects a problem (indicated by the loss of :R in the prompt) that

occurs in rare situations.

nz

nz

Gontains the specification for the maximum number of zeros FORTH displays

following the decimal point and before the most significant digit of a floating-point number. You can set this FORTH variable to display up to

32 characters in a floating-point number.

RCS WORDS: Miscellaneous RCS Words

B-40
OFFSET

OFFSET

Contains the value of the current offset. RCS adds the value of this

FORTH variable to relative block numbers to generate the absolute block

numbers

.

OLOAD

[offset] [blockilt] OLOAD (Oh-LOAD, not 0LOAD)

Changes the current OFFSET to the specified offset, loads the specified

block, and then restores the previous OFFSET.

PAGE

PAGE

Sends a PAGE character to the terminal. This PAGE (also called a form

feed) character may be different for different types of terminals.

PAGE-MOVE

[source seg] [address] [dest seg] [address] [#bytes] [pagecode] PAGE-MOVE

Moves #bytes from the specified address in the source segment to the

specified address in the destination segment. Either the source or the

destination segment must be in the current board. The other segment must

be in the page specified by the pagecode.

PAGE-SEG-ERASE

[page] [segment] PAGE-SEG-ERASE

Fills with zeros the 64-kilobyte segment beginning at the specified page

and segment address.

PDUMP

[page] [segment] [address] [#bytes] PDUMP

Displays kbytes (in hex) beginning at the specified page address.

RCS NORDS: Miscellaneous RCS Words

B-Ul
PMS

PMS [pose variable]

Displays the name of the pose variable and shows it as a rotation matrix

with a translation vector.

PRINT-TIME

[#tics] PRINT-TIME

Displays the result (in microseconds) of TIMER-READ execution. (See also

TIMER READ and TIMER-START)

QMS

QMS [quaternion variable]

Displays the name of the specified quaternion matrix variable and shows

the quaternion as a matrix.

QS

rad

QS [quaternion variable]

Displays the name of the specified quaternion variable and shows the

quaternion value as an axis and an angle.

[angle in radians] rad

Converts floating-point angle measurements from radians to degrees and

leaves the converted value on the stack.

ref-blk

[block#] ref-blk

Updates the current ref-blk by making it the sum of the specified block

number and the current block number. (See also load)

RCS WORDS: Miscellaneous RCS Words

B-42
SAVE-ON-DISK

0^ [page] [segment] [page address] [start bloGk#] [#blocks] SAVE-ON-DISK

Moves ^blocks * 1024 bytes of data from the specified RAM page address to

the disk, beginning at start block# (specified by its absolute block number). (See also GET-FROM-DISK)

#)

sd

sd

Contains the specification for the number of significant digits FORTH

displays in floating-point numbers and leaves this value on the stack.

You can set this FORTH variable to display up to 8 significant digits in

a floating-point number.

SEG-DUMP

[segment] [address] [#bytes] SEG-DUMP

Displays #bytes (specified in hex) beginning at the specified segment

address.

SEG-MOVE

[source address] [dest address] [#bytes] [source seg] [dest seg] SEG-MOVE

Moves kbytes from the source segment address to the destination segment

address.

TAB

TAB

Sends an ASCII TAB character to the terminal.

THRU

[start block#] [end block*] THRU

Loads the specified range of blocks.

RCS WORDS: Miscellaneous RCS Words

8-43
TIME-OUT-INIT

TIME-OUT-INIT

Enables the 6-millisecond time-out interrupt, which aborts access to a memory location or I/O port if the hardware does not respond within 6

milliseconds of the request. This interrupt generates the message 6 msec

time-out interrupt. To enable this interrupt, the system must execute

TIME-OUT-INIT at power-up.

TIME-P

TIME-P [routine]

Displays the name of the specified routine, executes the routine, and

displays the time of execution. TIME-P subtracts the appropriate overhead time required to call the routine from the terminal task to provide

an accurate measurement of the time required to execute the routine.

TIME-P uses the same timer (timer 1) as TIMER-READ and TIME-START.

The overhead factor is correct for 8-MHz operation. You should enter the

following lines in the D>M auto-load block for each board running at

5-MHz:

16 fnul-word-time ! 81 snul-word-time !

TIMER-READ

TIMER-READ

Reads the timer and returns on the stack the number of ticks from the

153-KHz clock. TIMER-READ uses the same timer (timer 1) as TIME-P and

TIMER-START. (See also PRINT-TIME and TIMER-START)

TIMER-START

TIMER-START

Starts the timer. TIMER-START uses the same timer (timer 1) as TIME-P

and TIMER-READ. (See also PRINT-TIME and TIMER-READ)

V-SIZE

V-SIZE

Displays the current vocabulary, the number of words defined in it, and

the maximum number of words the vocabulary can hold.

RCS WORDS: Miscellaneous RCS Words
n

\L

Re-executes the last SMACRO word executed, this time In Locate mode.

\1

(See \L)

\N

Displays the name of the last SMACRO word executed.

\n

(See \N)

\R

Re-executes the last SMACRO word executed, this time in Run mode.

\r

(See \R)

Re-executes the last SMACRO word executed, this time in Show mode,

\s

(See \S)

[string] (This word consists of a caret)

Converts the ASCII string into the corresponding control characters and

sends this control-character string to the terminal. You can use this

word to program terminal options, such as function keys. This word may

be used only in a load block, and may not be used in a FORTH word. (See

also .")

'DUMP

[address] [#bytes] -"DUMP

Displays #bytes (in hex) from the specified SMACRO segment address.

RCS WORDS; Miscellaneous RCS Words
~MEM

~MEM

Displays the number of bytes remaining in the SMACRO segment.

-MOVE

[source] [destination] [#bytes] ~MOVE

Moves #bytes (specified in hex) from the SMACRO segment source to the

SMACRO segment destination.

FORTH Words

!

[value] [FORTH address] !

Stores the specified 16-bit integer value in the specified FORTH address.

[valuel] [value2] •

Calculates the product of two 1 6-bit integer values and leaves the result

on the stack.

[valuel] [value2] +

Calculates the sum of two 16-bit integer values and leaves the result on

the stack.

[valuel] [value2] -

Calculates the difference between two 1 6-bit integer values by subtracting value2 from valuel and leaves the result on the stack.

[value] .

\Displays the specified 1 6-bit integer value.

RCS WORDS: FORTH Words

B-46
.D

^>

[value] .D

Displays the specified 16-bit decimal integer value, but does not change

the current base.

[valuel] [value2] /

Calculates the quotient of two 16-bit integer values by dividing valuel

by value2 and leaves the result on the stack.

2!

[address] [value] 2!

Stores a 32-bit integer in a FORTH variable.

26

[address] [value] 2@

K Retrieves a 32-bit integer from a FORTH variable.

2IN

[port address] 2IN

Reads the 8-bit port twice and leaves the resulting 16-bit value on the

stack. This word reads the low-order byte of this 16-bit value before

the high-order byte.

20UT

[value] [port address] 20UT

Sends the specified 1 6-bit value to the specified output port as 2 bytes.

This word sends the low-order byte of this 1 6-bit value before it sends

the high-order byte.

:[name]

Creates a FORTH word and causes the system to enter the FORTH Compile

mode.

RCS WORDS: FORTH Words

B-47
:C~EXEC

:C-EXEC [SMACRO word]

Sets the mode temporarily to Compile, compiles a call to the specified

SMACRO word, and restores the previous mode after the SMACRO word executes. This word may be used only in FORTH words, not in a load block.

:L-EXEC

:L-EXEC [SMACRO word]

Sets the mode temporarily to Locate, compiles a call to the specified

SMACRO word, and restores the previous mode after the SMACRO word executes. This word may be used only in FORTH words, not in a load block.

:S-EXEC

:S~EXEC [SMACRO word]

Sets the mode temporarily to Show, compiles a call to the specified

SMACRO word, and restores the previous mode after the SMACRO word executes. This word may be used only in FORTH words, not in a load block.

Causes the system to exit from the FORTH Compile mode,

[FORTH address] ?

Displays the 16-bit integer value contained in the specified FORTH

address.

[FORTH address] §

Retrieves a 1 6-bit integer value from the specified FORTH address and

leaves it on the stack.

RCS WORDS: FORTH Words

B-M8
B.

[value] B.

Displays the specified 1 6-bit integer value in binary, but does not

change the current base.

BACKGROUND

[stack size] [return stack size] [# user variables] BACKGROUND

Allots space for a background task by creating an entry in the FORTH dictionary with the parameter fields providing (in the following order) the

background task address, stack origin, and the user area size (expressed

as an 8-bit value). FORTH adjusts the task address upwards to fall on a 16-byte boundary to simplify segment register manipulations. (See also

BUILD)

BUILD

[task address] BUILD

Inserts the background task from the specified task address into the

FORTH round-robin. BUILD places the new background task immediately

after the current task in the round-robin, copies the user variables

declared for the background task from the operator task, and sets the

background stack pointer to its origin. (See also BACKGROUND)

CLR-BIT

[bit#] [port address] CLR-BIT

Clears the specified bit in the specified port to 0. Other bits remain

unaffected. You can use this word to clear interrupt masks with PIC.

(See also SET-BIT)

DUMP

F»

•

[FORTH address] [#bytes] DUMP

Displays #bytes beginning at the specified FORTH address.

[valuel] [value2] F»

Calculates the product of two 32-bit floating-point values and leaves the

result on the stack.

RCS WORDS: FORTH Words

B-49
F+

[valuel] [value2] F+

Calculates the sum of two 32-bit floating-point numbers and leaves the

result on the stack.

F-

[valuel] [value2] FCalculates the difference of two 32-bit floating-point values by subtracting value2 from valuel and leaves the result on the stack.

F-ABS

[value] F-ABS

Calculates the absolute 32-bit floating-point value of the specified

value and leaves the result on the stack.

F.

[value] F.

Displays the specified 32-bit floating-point value.

F/

[valuel] [value2] F/

Calculates the quotient of two 32-bit floating-point values by dividing

valuel by value2 and leaves the result on the stack.

FLOAT

[integer] FLOAT

Converts a 16-bit integer value to a 32-bit floating-point value and

leaves the converted value on the stack. (See also ROUND)

H.

[value] H.

Displays the specified 1 6-bit integer value in hex, but does not change

the current base.

RCS WORDS: FORTH Words

B-50
INPUT

[port address] INPUT

Reads the 8-bit value from the specified input port and leaves the value

on the stack.

IRR

IRR

Returns on the stack the port address for the Interrupt Request Register

in the Programmable Interrupt Controller. This FORTH constant is useful

for determining if interrupts are connected correctly.

LOCATE-OFF

LOCATE-OFF

Turns off locate for FORTH words.

LOCATE-ON

LOCATE-ON

Turns on locate for FORTH words. You cannot locate words defined with

locate off. Turning off locate saves 2 bytes of FORTH space per word.

(Locate is always on for SMACRO words)

MOVE

[source FORTH address] [destination FORTH address] [#bytes] MOVE

Moves #bytes from the source FORTH address to the destination FORTH

address.

OUTPUT

[value] [port address] OUTPUT

Sends the specified 8-bit value to the specified output port.

PI

PI

Leaves the 32-bit floating-point value of pi on the stack.

RCS WORDS: FORTH Words

B-51
PIC

PIC

Returns on the stack the port address for the Programmable Interrupt Controller. You use this port to mask and unmask interrupts.

ROUND

[float] ROUND

Converts a 32-bit floating-point value to a 1 6-bit integer value through

rounding and leaves the converted value on the stack. (See also FLOAT)

SET-BIT

[bit#] [port address] SET-BIT

Sets the specified bit in the specified port to 1 . Other bits remain

unaffected. You can use this word to set interrupt masks with PIC. (See

also CLR-BIT)

SORT

[value] SQRT

Calculates the square root of the specified 32-bit floating-point value

and leaves the result on the stack.

~!

[value] [SMACRO address] ~!

Stores the specified 16-bit integer value in the specified SMACRO

address.

[SMACRO address] ~?

Displays the 16-bit integer value contained in the specified SMACRO

address.

RCS WORDS; FORTH Words

B-52

(#

CI
#

[SMACRO address] ~@

Retrieves the 1 6-bit integer value contained in the specified SMACRO

address and leaves the value on the stack.

"C!

[value] [address] ~C!

Stores data in a SMACRO byte variable.

~C@

[address] [value] ~C@

Retrieves data from a SMACRO byte variable.

-F!

[value] [SMACRO address] ~F!

Stores the specified 32-bit floating-point value in the specified SMACRO

address.

~F?

[SMACRO address] "F?

Displays the 32-bit floating-point value contained in the specified

SMACRO address.

-F@

[SMACRO address] ~F§

Retrieves the 32-bit floating-point value contained in the specified

SMACRO address.

~FR?

[address] ~FR?

Reads a 32-bit floating-point value from the specified address, converts

it from radians to degrees, and then displays the converted value.

RCS WORDS: FORTH Words

B-53
SMACRO Words

The SMACRO words include the following types:

SMACRO declaration words

SMACRO predefined SMACRO variable words

SMACRO operator words

SMACRO vector-operator words

SMACRO quaternion-operator words

SMACRO matrix-operator words

SMACRO pose-operator words

SMACRO boolean-operator words

SMACRO file-operation variable words

SMACRO file-operation header variable words

SMACRO file-operation words

SMACRO boolean file-operation words

SMACRO statement words

Miscellaneous SMACRO words

SMACRO declaration words

1:a

[//elements] 1:a [name]

Creates a one-dimensional integer array, which belongs to the most

recently declared variable owner. The parameter //elements must be less

than 256.

1:fa

[//elements] 1:fa [name]

Creates a one-dimensional floating-point array, which belongs to the most

recently declared variable owner. The parameter //elements must be less

than 256.

2:a

[#rows] [//columns] 2:a [name]

Creates a two-dimensional integer array, which belongs to the most

recently declared variable owner. SMACRO stores the array by rows. The

product of the #rows and the //columns must be less than 256.

RCS NORDS: SMACRO Declaration Words

B-54
2:fa

[#rows] [#coluinns] 2: fa [name]

Creates a two-dimensional floating-point array, which belongs to the most

recently declared variable owner. SMACRO stores the array by rows. The

product of the #rows and the #columns must be less than 256.

<=

bv

<= [values]

Stores the specified values in the most recently declared variable. The

values are assumed to be of the correct type and number for the variable

type. This declaration word works only for string, byte, and integer

variables. (See ==> for other variable types) The parameter <= is used

to initialize variables as they are declared, not in routines.

bv [name]

Creates an 8-bit byte variable, which belongs to the most recently

declared variable owner.

bytes

bytes

Performs no function. You can use this nul word to make source code more

readable (for example, 2 bytes VAR-0).

end-routine

end-routine

Terminates the Compile mode. (See also routine)

FILE

[max ^records] FILE [file name]

Creates a file with the specified name, using the most recently declared

variable owner as a template. Include this statement in the source block

that declares the variable owner. The max ^records parameter specifies

the size of the new file.

RCS WORDS: SMACRO Declaration Words

B-55
fv

iv

fv [name]

Creates a 32-bit floating-point variable, which belongs to the most

recently declared variable owner.

iv [name]

Creates a 16-bit integer variable, which belongs to the most recently

declared variable owner.

mem

mem

Performs no function. You can use this nul word, which is an abbreviation for members, to make source code more readable (for example, 10 mem

S-VAR-0).

rec

rec

Performs no function. You can use this nul word, which is an abbreviation for records, to make source code more readable (for example, 10 rec FILE).

routine

routine [name]

Creates a routine with the specified name and enters the Compile mode.

(See also end-routine)

S-VAR-0

[//members] S-VAR-0 [name]

Creates a sequential variable owner with the specified name. The sequential variable can accept a maximum of #members.

RCS WORDS: SMACRO Declaration Words

B-56

r

r

c
f

i

segv

[segment] [address] [#bytes] segv [name]

Creates a segment variable, which belongs to the most recently declared

variable owner.

seqv

seqv [name]

Creates a sequential variable, which belongs to the most recently

declared sequential variable owner. The first sequential variable

receives a value of 0, the second variable receives a value of 1, and

each successive variable receives the next sequential integer value.

strv

[#bytes] strv [name]

Creates a string variable #bytes long with the specified name, which

belongs to the most recently declared variable owner.

VAR-0

[#bytes] VAR-0 [name]

Creates a variable owner with the specified name and allots to this variable owner #bytes of space in the SMACRO segment for variable storage.

VOCABULARY

[assembler voc#] [SMACRO voc#] [Gentries] VOCABULARY [name]

Creates a vocabulary. Enter the vocabulary numbers (voc#s) in hexadecimal. Both voc#s are four-digit numbers. The first three digits for the

assembler vocabulary must be 513. The first three digits for the SMACRO

vocabulary must be 531. The fourth digit of each number must be the

same; must be 7, 9, B, D, or F; and must be different from any other

vocabulary declared on the same board. The vocabulary name must be

unique in the system, because RCS does not check for duplicate vocabulary

names. The system may contain up to 20 vocabularies.

Predefined SMACRO variable words

-1# 1# 2# 3# 4# 5# 6# 7# 8# 9# 10# 11# 12# 13# 1^# 15# 16# 17# 18# 19# 32767#

Each of these predefined integer variables contains the indicated value

(for example, -M^ contains the value -1).

RCS WORDS: Predefined SMACRO Variable Words

B-57
0.# 1.# 2.#

Each of these predefined floating-point variables contains the indicated r

value (for example, 2.# contains the floating-point value 2.0).

cos {angle}

Predefined floating point variable used as output for certain quaternion

operators.

cycle-count

A segment variable that provides the current cycle count. The communications process updates the cycle count.

false

Predefined sequential variable with integer value 0. You use the

predefined sequential variables false, true, set, reset, ready, and not

ready for logic tests. Their integer values are 0, 1, 2, 3> ^> and 5,

respectively.

identity-pose

This predefined pose variable contains the identity pose, 1.0 0.0 0.0 0.0 '^

0.0 0.0 0.0.

not-ready

Predefined sequential variable with integer value 5. (See also false)

ready

Predefined sequential variable with integer value H. (See also false)

reset

Predefined sequential variable with integer value 3. (See also false)

rot-angle

Predefined floating-point variable used as output for certain quaternion

operators.

RCS WORDS: Predefined SMACRO Variable Words

B-58
rot-axis

•

Predefined floating-point variable used as output for certain quaternion

operators.

set

Predefined sequential variable with integer value 2. (See also false)

sin {angle}

Predefined floating-point variables used as outputs of certain quaternion

operators.

true

Predefined sequential variable with integer value 1. (See also false)

X Y Z

These predefined integer variables contain 0, 1, and 2, respectively.

You can use these predefined variables with pose operators to identify

frame axes.

SMACRO operator words

The general spelling convention for SMACRO operators is as follows: operators

surrounded by () are integer, operators surrounded by .. are floating point,

and operators ending in _B are byte. (There may be exceptions to this convention) See Table B-1 earlier in this appendix for definitions of the abbreviations used in syntax descriptions.

It It

Returns the result of the most recent integer expression. This word may

operate incorrectly if you place other code between the most recent integer expression and the pair of double quotation mark characters.

RCS WORDS: SMACRO Operator Words

B-59
#.READ

#.READ ^

Reads a word (bounded by ASCII spaces) from the current Input and tries

to find the word in the current vocabulary. If #.READ finds the word in

the current vocabulary, it assumes that the word is a floating-point variable and returns the value of the variable. Otherwise, #.READ assumes

that the word is a floating-point number and returns this value. You can

use the #.READ word in place of a floating-point variable except as the

destination of the .=>. SMACRO word.

#READ

#READ

Reads a word (bounded by ASCII spaces) from the current input and tries

to find the word in the current vocabulary. If #READ finds the word in

the current vocabulary, it assumes that the word is an integer variable

and returns the value of the variable. Otherwise, #READ assumes that the

word is an integer number and returns this value. You can use #READ in

place of an integer variable except as an array index or as the destination of the => SMACRO word.

(( ))

(( [ivar] ))

Causes SMACRO to treat the integer variable, ivar, as a pointer.

()

[var] ()

Specifies an address by adding the current value of the index register to

the value of var. There is no space between the parentheses. (See also

Index-on)

(*)

[iexp] (*) [ivar]

Returns the product of iexp and ivar (iexp • ivar).

RCS WORDS: SMACRO Operator Words

B-60

^
(-)

(/)

(*/)

[iexp] (*/) [ivarl] [ivar2]

Returns the result of iexp * ivarl /ivar2. The intermediate results of

this expression can occupy up to 32 bits to maintain accuracy.

(+)

[iexp] (+) [ivar]

Returns the sum of iexp and ivar (iexp + ivar).

[iexp] (-) [ivar]

Returns the difference of ivar subtracted from iexp (iexp - ivar).

[iexp] (/) [ivar]

Returns the quotient of iexp divided by ivar (iexp/ivar).

(ABS)

(ABS) [iexp]

Returns the absolute value of iexp.

(COM)

(COM) [iexp]

Returns the one's complement of iexp,

(MAX)

[iexpl] (MAX) [iexp2]

Returns the signed maximum integer of iexpl and iexp2.

RCS WORDS: SMACRO Operator Words

B-61
(MIN)

[iexpl] (MIN) [iexp2] T

Returns the signed minimum integer of iexpl and iexp2.

(MOD)

[iexpl] (MOD) [iexp2]

Performs a modulo operation (iexpl modulo iexp2) and returns the result

using the same sign as iexpl.

.( ).

.( ).

Specifies the processing order for floating-point operations within an expression. Scalar operations can support up to eight levels of nesting,

vector operations can support up to one level of nesting, and pose and

quaternion operations can support any number of levels of nesting.

[fexpl] .». [fexp2]

Returns the floating-point product of fexpl and fexp2.

,»2»».

[fexpl] .»2««. [fexp2]

Rounds fexp2 to an integer value and then returns a value computed

according to the following expression:

fexpl » 2 ^®^P2

+.

[fexpl] .+. [fexp2]

Returns the floating-point sum of fexpl and fexp2.

» ^ •

[fexpl] .-. [fexp2]

Returns the floating-point difference of fexpl minus fexp2.

<T

t

RCS WORDS: SMACRO Operator Words

B-62
./.

[fexpl] ./. [fexp2]

Returns the floating-point quotient of fexpl divided by fexp2.

[fexp] .=>. [fvar]

Stores fexp into fvar.

.ABS.

.ABS. [fexp]

Returns the absolute value of fexp.

.ATAN,SIN,COS.

.ATAN, SIN, COS. [fexpl] [fexp2]

Returns the arctangent, in radians of the quotient resulting from dividing fexpl by fexp2 (fexp1/fexp2). This word also returns the SIN and

COS values of the quotient in the predefined variables sin {angle} and

cos{angle}, respectively.

.ATAN.

.ATAN. [fexpl] [fexp2]

Returns the arctangent in radians of the quotient resulting from dividing

fexpl by fexp2 (fexp1/fexp2).

.FRAC.

.FRAC. [fexp]

Returns the fraction portion of fexp as a floating-point value.

.INT.

.INT. [fexp]

Returns the integer portion of fexp as a floating-point value.

RCS WORDS: SMACRO Operator Words

B-63
.MAX.

[fexpl] .MAX. [fexp2]

Returns the signed maximum floating-point value of fexpl and fexp2.

.MIN.

[fexpl] .MIN. [fexp2]

Returns the signed minimum floating-point value of fexpl and fexp2.

.MINUS.

.MINUS, [fexp]

Multiplies fexp by -1.0 and returns the result.

.MOD+-180.

.MOD+-180. [fexpr]

Forces the result of fexpr into the range ± Pi radians (j+l80 degrees).

.SIGN. W

.SIGN, [fexp]

Returns the floating-point sign of fexp as +1.0, -1.0, or 0.0 if the

value of fexp is greater than 0, less than 0, or equal to 0,

respectively.

.SIN, COS.

.SIN, COS. [fexp]

Returns the sine and cosine of fexp in radians in the predefined SMACRO

variables sin{angle} and cos{angle}. This word is a statement in itself

and cannot be used as part of another expression,

.SQ.

.SQ. [fexp]

Returns the square of fexp.

RCS WORDS: SMACRO Operator Words

B-64
.SQRT.

.SQRT. [fexp]

Returns the square root of fexp. This word generates an 8087 error if

fexp has a negative value,

2pi

2pi

Returns the indicated floating-point value.

=>

[iexp] => [ivar]

Stores iexp into ivar.

=>SEG

[var] [y/bytes] =>SEG [segvar]

Moves #bytes from var to the segment address identified in pointer variable, segvar.

a#

a# [var]

Returns the address, not the value, of var.

B»

[iexp] B* [ivar]

Returns the byte product of iexp and ivar.

B^

[iexp] B+ [ivar]

Returns the byte sum of iexp and ivar.

RCS WORDS: SMACRO Operator Words

B-65
B-

[iexp] B- [ivar]

Returns the byte difference of iexp minus ivar.

B-to-stack

[iexp] B-to-stack

Converts iexp to a byte value and then pushes it onto the 8086 stack.

B/

[iexp] B/ [ivar]

Returns the byte quotient of iexp divided by ivar.

B=>

[iexp] B=> [bvar]

Converts iexp to a byte value and stores the resulting value in bvar.

F>I

F>I [fexp]

Returns the integer value obtained by rounding the floating-point value

of fexp.

from-stack

from-stack

Pops the 8086 stack and returns the resulting integer value. (See also

to-stack)

I>F

I>F [iexp]

Converts the integer value of iexp to a floating-point value.

f

RCS WORDS: SMACRO Operator Words

B-66
in-port

[ivar] in-port

Returns the byte value read from the 8-bit I/O port specified by the

address value in ivar.

index-on

index-on [ivar]

Loads ivar into the indexing register for use with the () operator.

mask-with

[iexp] mask-with [ivar]

Returns the result of a bitwise AND using iexp and ivar (iexp AND ivar).

out-port

[iexp] out-port [ivar]

Truncates iexp to an 8-bit value and sends it to the 8-bit output port

whose address is contained in ivar.

pi

pi

Returns the indicated floating-point value.

pi/2

pi/2

Returns the indicated floating-point value.

READ"

READ"

Reads a string terminated by an ASCII double quotation mark character (")

from the current input. You must follow READ" with S=> to store the

string in a variable.

RCS WORDS: ISHACRO Operator Words

B-67
SEG=>

[segvar] [#bytes] SEG=> [var] ^

Moves #bytes to var from the segment address identified in pointer variable, segvar.

to-stack

[iexp] to-stack

Pushes iexp onto the 8086 stack. (See also from-stack)

WREAD

WREAD

Reads a string terminated by an ASCII space character. WREAD must be

followed by S=> to store the string in a variable. If the input string

is to contain spaces, use READ" instead of WREAD.

{ }

array-var {[ivarl] [ivar2]}

Provides a means of indexing arrays. In the case of one-dimensional

arrays, ivarl specifies the element number (beginning at 0) and the

second variable, ivar2, is not included. In the case of two-dimensional

arrays, ivarl specifies the row number and ivar2 specifies the column

number.

SMACRO vector-operator words

.CROSS.

[vexpl] .CROSS. [vexp2]

Returns the cross-product of vexpl and vexp2,

.DOT.

[vexpl] .DOT. [vexp2]

Returns the dot-product of vexpl and vexp2.

RCS WORDS: SMACRO Vector-Operator Words

B-68
.UNIT. ^ .UNIT, [vexp]

Returns a unit vector parallel to vexp.

.V»S.

[vexp] .V*S. [fexp]

Returns the vector obtained by multiplying each element of vexp by fexp.

.V+.

[vexpl] .V+. [vexp2]

Returns the vector obtained by adding vexpl to vexp2, element by element,

.V-.

[vexpl] .V-. [vexp2]

•

Returns the vector obtained by subtracting vexp2 from vexpl, element by

element.

.V/S.

[vexp] .V/S. [fexp]

Returns the vector obtained by dividing the elements of vexp by fexp.

.V=>.

[vexp] .V=>. [war]

Stores vexp into war,

.VINV.

.VINV. [vexp]

Returns the generalized inverse of vexp (that is, vexp/ I vexp I ^)

.

RCS WORDS: SMACRO Vector-Operator Words

B-69
.VMAG.

.VMAG. [vexp] C

Returns the magnitude of vexp.

.VMINUS.

.VMINUS. [vexp]

Returns the negative of vexp,

SMACRO quaternion-operator words

.AXIS,ANGLE>Q.

.AXIS,ANGLE>Q. [vexp] [fexp]

Treats vexp as an axis and fexp as an angle in radians, and returns the

equivalent quaternion. The vector vexp must be a unit vector. (See also

.UNIT, in the section "SMACRO vector-operator words")

.AXIS, SIN, COS>Q.

.AXIS, SIN, COS>Q. [vexp] [fexpl] [fexp2] <-

Treats vexp as an axis, fexpl as sin{angle}, fexp2 as cosfangle}, and

returns the equivalent quaternion. The vector vexp must be a unit

vector. (See also .UNIT.)

.Q=>.

[qexp] .Q=>. [qvar]

Stores qexp into variable qvar.

. Q> AXIS , ANGLE , SIN , COS

.

.Q> AXIS, ANGLE, SIN, COS. [qexp]

Converts qexp into an axis and angle representation. This word returns

its results in the predefined variables rot-axis, rot-angle in radians (0 <= rot-angle <=pi), sin{angle}, and cos{angle}. .Q> AXIS, SIN, COS. is

faster than .Q> AXIS, ANGLE, SIN, COS. but it does not compute the angle.

This word is a statement in itself and cannot be used as part of another

expression.

RCS WORD: SKACRO Quaternion-Operator Words

B-70
.Q> AXIS, SIN, COS.

_^ .Q> AXIS, SIN, COS. [qexp]

Converts qexp into an axis and angle representation. This word returns

its results in the predefined variables rot-axis, sin{angle}, and

cos {angle}. .Q> AXIS, SIN, COS. is faster than .Q> AXIS, ANGLE, SIN, COS.

because it does not compute the angle. This word is a statement in

itself and cannot be used as part of another expression.

.QINV.

.QINV. [qexp]

Returns the inverse of qexp.

.QQ».

[qexp2] .QQ«. [qexpl]

Returns the quaternion product of qexp2 and qexpl.

.QV».

^ [qexp] .QV*. [vexp]

Returns the vector obtained by applying the rotation qexp to vexp.

.V>Q.

.V>Q. [vexp]

Returns the quaternion equivalent to the rotation vector, vexp, by

treating .UNIT, vexp as an axis and .VMAG. vexp as an angle in radians.

SMACRO matrix-operator words

.M=>.

[mexp] .M=>. [mvar]

Stores mexp into mvar,

.M>Q.

.M>Q. [mexp]

^ Returns the quaternion equivalent to mexp.

RCS WORDS: SMACRO Matrix-Operator Words

B-71
.Q>M.

.Q>M. [qexp] (_ Returns the matrix equivalent to qexp.

SMACRO pose-operator trords

.P=>.

[pexp] .P=>. [pvar]

Stores pexp into pvar.

.PINV.

.PINV. [pexp]

Returns the inverse of pexp.

.PP».

[pexp2] .PP». [pexpl]

Returns the POSE product of pexp2 and pexpl. ^

.PQ*.

[pexp] .PQ*. [qexp]

Returns a pose computed by multiplying the quaternion part of pexp by

qexp. The vector part of pexp becomes the vector part of the result.

The operator .PQ*. rotates the pose frame by a rotation expressed in the

pose frame.

.PV+.

[pexp] .PV+. [vexp]

Returns a pose computed by multiplying the quaternion part of pexp by

vexp, and then adding the result to the vector part of pexp. The operator .PV+. translates the pose frame by a translation expressed in the

pose frame.

k

RCS WORDS: SKACRO Pose-Operator Words

B-72
.QP».

[qexp] .QP». [pexp]

Returns a pose computed by multiplying the qexp by the quaternion part of

pexp. The vector part of the result is the vector part of pexp. The

operator .QP*. rotates the pose frame by a quaternion expressed in the

base frame.

.ROT, SIN, COS.

[pexp] .ROT, SIN, COS. [ivar] [fexpl] [fexp2]

Treats ivar as the axis of the pose frame and uses sin (fexpl) and cos

(fexp2) to define the angle of rotation, and then returns a pose computed

by rotating the quaternion part of pexp about the axis through the specified angle. The axis is one of the x, y, or z axes of the pose frame as indicated by an ivar value of 0, 1, or 2, respectively. (Use the predefined variables X, Y, and Z) The vector part of the result is the

vector part of pexp. .ROT, SIN, COS. operates faster than .PQ*. or .ROT.

to rotate the pose frame by a quaternion expressed in the pose frame.

.ROT.

[pexp] .ROT. [ivar] [fexp]

Treats ivar as one of the axes of the pose frame and fexp as the angle of

rotation in radians, and then returns a pose computed by rotating the

quaternion part of pexp about the axis through the specified angle. The

axis is one of the x, y, or z axes of the pose frame as indicated by an ivar value of 0, 1, or 2, respectively. (Use the predefined variables X,

Y, and Z) The vector part of the result is the vector part of pexp. The

operator .ROT. operates faster than .PQ*. to rotate the pose frame by a quaternion expressed in the pose frame.

.TRN.

[pexp] .TRN. [ivar] [fexp]

Treats ivar as the axis of the pose frame and fexp as the translation

distance, and then returns a pose computed by translating the vector part

of pexp along the specified axis by the specified distance. The axis is one of the x, y, or z axes of the pose frame as indicated by an ivar

value of 0, 1, or 2, respectively. (Use the predefined variables X, Y,

and Z) The quaternion part of the result is the quaternion part of

pexp. The effect of this word is to translate the pose frame by a vector

expressed in the pose frame. The operator .TRN. operates faster than

.PV+. to translate the pose frame by a vector expressed in the pose

frame.

RCS WORDS: SNACRO Pose-Operator Words

B-73
.VP+.

[vexp] .VP+, [pexp]

Returns a pose computed by adding vexp to the vector part of pexp. The

quaternion part of the result is the quaternion part of pexp. This word

translates the pose frame by a vector expressed in the base frame.

SMACRO Boolean-operator words

(AND)

[boolean exp] (AND) [boolean exp]

Returns true only if both Boolean expressions are true,

(EQ)

[iexp] (EQ) [ivar]

Returns true only if the operands are equal.

(GE)

[iexp] (GE) [ivar]

Returns true only if iexp is greater than or equal to ivar.

(GT)

[iexp] (GT) [ivar]

Returns true only if iexp is greater than ivar.

(LE)

[iexp] (LE) [ivar]

Returns true only if iexp is less than or equal to ivar.

(LT)

[iexp] (LT) [ivar]

Returns true only if iexp is less than ivar.

f

RCS WORDS: ;^fACRO Boolean-Operator Words

B-7^
1

(NE)

[iexp] (NE) [ivar]

Returns true only if the operands are not equal.

.EQ.

[fexpl] .EQ. [fexp2]

Returns true only if the operands are equal.

.EQZ.

[fexp] .EQZ.

Returns true only if fexp is equal to 0.

.GE.

[fexpl] .GE. [fexp2]

Returns true only if fexpl is greater than or equal to fexp2.

^ .GEZ.

[fexp] .GEZ.

Returns true only if fexp is greater than or equal to 0.

• GT.

[fexpl] .GT. [fexp2]

Returns true only if fexpl is greater than fexp2.

.GTZ.

[fexp] .GTZ.

Returns true only if fexp is greater than 0.

.LE.

[fexpl] .LE. [fexp2]

Returns true only if fexpl is less than or equal to fexp2.

RCS WORDS; SMACRO Boolean-Operator Words

B-75
,LEZ.

[fexp] .LEZ. t

Returns true only if fexp is less than or equal to 0.

.LT.

[fexpl] .LT. [fexp2]

Returns true only if fexpl is less than fexp2.

.LTZ.

[fexp] .LTZ.

Returns true only if fexp is less than 0.

.NE.

[fexpl] .NE. [fexp2]

Returns true only if the operands are not equal.

.NEZ.

[fexp] .NEZ.

Returns true only if fexp is not equal to 0.

0-?

[ivarl] 0-? [ivar2]

Returns true only if the result of a bitwise AND of ivar2 with the one's

complement of ivarl is not 0.

1-?

[ivarl] 1-? [ivar2]

Returns true only if the result of a bitwise AND of ivarl with ivar2 is

not 0.

RCS WORDS: SMACRO Boolean-Operator Words

B-76
EQ_B

[iexp] EQ_B [ivar]

Truncates the operands iexp and ivar to 8 bits and returns true only if

the truncated operands are equal.

GE_B

[iexp] GE_B [ivar]

Truncates iexp and ivar to 8 bits and returns true only if the truncated

iexp is greater than or equal to the truncated ivar.

GT_B

[iexp] GT_B [ivar]

Truncates iexp and ivar to 8 bits and returns true only if the truncated

iexp is greater than the truncated ivar.

LE_B

[iexp] LE_B [ivar]

Truncates iexp and ivar to 8 bits and returns true only if the truncated

iexp is less than or equal to the truncated ivar.

LT_B

[iexp] LT_B [ivar]

Truncates iexp and ivar to 8 bits and returns true only if the truncated

iexp is less than the truncated ivar.

NEJB

[iexp] NE_B [ivar]

Truncates the operands iexp and ivar to 8 bits and returns true only if

the truncated operands are not equal.

S-EQ

[svar] S-EQ [svar]

Returns true only if the ASCII values of two string variables are equal. S-EQ assumes the lengths of the strings are equal.

RCS WORDS; SMACRO Boolean-Operator Words

B-77
[ivarl] "EQ" [ivar2]

Returns true only if the Boolean value of ivar2 is equal to the result of

a bitwise AND of ivarl with ivar2.

SMACRO file-operation variable words

File-var

Contains all the file-operation and header variables. Showing this

variable owner can be useful in debugging file operations.

next-record

Points to the next record in the file.

record*

Points to the current record in the file. All file access procedures use

this variable.

source-blk

Specifies the block (if any) that contains the source code for that

record.

SMACRO file-operation header variable words

ass/rec

ass/rec

Contains the number of records removed from the free list and assigned to

other lists.

avail-record

avail-record

Points to the beginning of the free list.

f

RCS WORDS: SMACRO File-Operation Header Variable Words

B-78
#

•

bytes/record

bytes/record

Specifies the number of bytes in each record in the file, including the

link and source fields.

f-segment

f-segment

Specifies the segment address for the file.

f-template

f-template

Specifies the address of the local template.

file-start

file-start

Specifies the address of the first physical record in the file segment.

first-record

first-record

Points to the first record in a list in the current file. This header

variable provides a simple way to manage files that consist of a single

list. The first-record variable contains the pointer to the beginning of

the list, and is updated as needed by the file operators. This variable

has other uses in multiple-list files.

max/rec

max/rec

Contains the total number of records allocated for the file.

RCS NORDS: SMACRO File-Operation Header Variable Words

B-79
SMACRO file-operation words

See Table B-2 at the beginning of this appendix for definitions of the phrases

used in the syntax descriptions.

add-list

add-list

Stores the data from the local template to a record, removes the record

from the free list, and makes the record the beginning of a new list.

This operator leaves record// and first-record set to the record stored,

increments ass/rec, sets source-blk and the source block field to the

current block, and sets next-record and the link field to 0. The word

add-list aborts if the file is full.

add-record

add-record

Stores the data from the local template to a record, removes the record

from the free list, and adds the record to the end of the current list.

This operator leaves record* set to the record stored, increments

ass/rec, sets source-blk and the source block field to the current block,

and sets the next-record and link field to 0. If there is no current

list (that is, if record* is 0), SMACRO executes add-list automatically

in place of add-record. The word add-record aborts if the file is full.

clear-list

clear-list

Returns the entire current list to the free list. This operation does

not abort if record* is 0, but in this case no action takes place because

there is no list to clear.

remove

remove

Removes the current record from the list pointed to by first-record, and

returns it to the free list, sets first-record to the beginning of the

resulting list, sets next-record to the record following the removed

record, and decrements ass/rec. The operation of remove aborts if there

is no current record, or if the current record is not on the list.

RCS WORDS: SMACRO File-Operation Words

B-80
#

retrieve

retrieve

$

Retrieves the current record from the current file and leaves the data in

the local template. The word retrieve aborts if record* is 0.

retrieve-from-field

retrieve-from-field [field] [destination]

Retrieves the data from the specified field in the current record and

stores the data in the specified destination. The word retrieve-fromfield aborts if record# is 0.

retrieve-from-fields

retrieve-from-fields [fieldl] [field2] [destination]

Retrieves the data from fields in the range fieldl through field2 in the

current record and stores the data in the specified destination. The

destination must be the beginning of a set of consecutive variables whose

total byte count matches the total of the fields being retrieved. The

word retrieve-from-fields aborts if record* is 0.

retrieve-l&r

retrieve-l&r

Retrieves the following three items: the current record to the local

template, the link field to the variable next-record, and the source

field to the variable source-blk. The word retrieve-l&r aborts if

record* is 0.

retrieve-link

retrieve-link [var]

Retrieves the record* from the link field of the current record and

stores it in var. This word does not abort if record* is 0.

retrieve-source

retrieve-source [var]

Retrieves the data from the source block field of the current record and

stores it in var. This word does not abort if record* is 0.

RCS WORDS: SKACRO File-Operation Words

B-81
store

store f

Stores the data present in the local template in the current record and

sets the source block field to the current block. The word store aborts

if record* is 0.

store-l&r

store-l&r

Stores the following three items: the local template to the current

record, the variable next-record to the link field, and the variable

source-blk to the source field. The word store-l&r aborts if recordy/

is 0.

store-link

store-link [var]

Stores the value in var to the link field in the current record. The var must contain a valid record* for the current file. This operation does

not abort if record* is 0.

store-source

store-source

Sets the source block field in the current record to the current block as specified by BLK + OFFSET. This word does not abort if record* is 0.

store-to-field

store-to-field [field] [source]

Stores the data from the specified source to the specified field in the

current record. The source and the field must contain an equal number of

bytes. The word store-to-field aborts if record* is 0.

store-to-fields

store-to-fields [fieldl] [field2] [source]

Stores the data from the source to the range of fields, fieldl through

field2, in the current record. The source must be the beginning of a set

of consecutive variables whose total byte count matches the total of the

fields stored. The word store-to-fields aborts if record* is 0.

RCS WORDS: SMACRO File-Operation Words

B-82

f

e
're-init-file

~re-init-file

Assigns all records in the current file to the free list. This operator

sets variables first-record and ass/rec to 0, and fills all record fields

(except the link field) with zeros.

"update-header

~update-header

Stores the data present in the local copies of the header variables to

the header of the current file.

atACRO Boolean file-operation words

matches

[var] matches [field]

Searches the current list, testing to see if the contents of the specified var equal the contents of the specified field in each record. This

operation returns a true value and sets record* to that record when it

finds a match between the two operands. The word matches aborts if

record* is 0.

matches-fields

[var] matches-fields [fieldl] [field2]

Searches the current list, testing to see if the contents of the specified var equal the contents of the specified range of fields in each

record. This operation .returns a true value and sets record* to that

record when it finds a match between the operands. The word matchesfields aborts if record* is 0.

matches-fields-r

[var] matches-fields-r [fieldl] [field2]

Searches the current list, testing to see if the contents of the specified var equal the contents of the specified range of fields in each

record. This operation returns a true value, sets record* to that

record, and retrieves the record to the local template when it finds a match between the operands. The word matches-fields-r aborts, if record*

is 0.

RCS WORDS: SMACRO Boolean File-Operator Words

B-83
matches-r

[var] matches-r [field]

Searches the current list, testing to see if the contents of the specified var equal the contents of the specified field in each record. This

operation returns a true value, sets record# to that record, and

retrieves the record to the local template when it finds a match between

the operands. The word matches-r aborts if record* is 0.

SKACRO statement words

abort

abort

Aborts the current process and displays the message ABORTED.

b-fill

[var] [#bytes] [char] b-fill

Starts at var and fills #bytes with the value of char (an 8-bit ASCII

character, not a variable). The parameter var cannot be a subscripted

array. (See also w-fill)

blank

[var] [#bytes] blank

Starts at var and fills #bytes with the ASCII space character. The

parameter var cannot be a subscripted array.

(

RCS WORDS: SMACRO Statement Words

B-84
case

W)

•

case [varl]

case: [var2] [codeA]

case: [var3] [codeB]

case: [var^l] [codeC]

default: [default codeD]

end-case

Compares the value of varl to the values of the case variables (var2

through varUl) and executes the code following the first variable matching varl. This statement executes the default code if none of the variables match varl. You can use up to 40 cases (the statement compiles as

a nested IF-THEN-ELSE comparison so the same maximum nesting limit

applies). The operands varl through var4l must be either integers or sequential variables.

case:

(See case)

default:

(See case)

default-state:

(See state-table)

do

(See while)

else

(See if)

end- case

(See case)

end- do

(See while)

RCS WORDS: SMACRO Statement Words

B-85
end-repeat

(See repeat) i

end-state-table

(See state-table)

endif

(See if)

enter-interrupt

enter-interrupt

Pushes all 8086 registers, except CS, SS, and S; pushes the variable

page; sets DS to the SMACRO segment; sets ES to the FORTH segment; and

sets the 24-bit page register to page 0. The enter-interrupt statement

does not clear the interrupt mask. You can use this statement to pre- serve the state of the processor registers at the beginning of an interrupt routine. (See also exit-interrupt)

erase g

[var] [#bytes] erase

Starts at var and fills #bytes with 0. The parameter var cannot be a subscripted array.

exit-interrupt

exit-interrupt

Restores the registers pushed on the stack by enter-interrupt and then

executes a return from interrupt (IRET). You can use this statement at

the end of an interrupt routine to restore the registers before continuing with normal processing. (See also enter-interrupt)

if

if [boolean exp] then [code] else [code] endif

Provides the standard if-then-else control structure up to a nesting

level of 40.

HCS WORDS: SMACRO Statement Words

B-86
move

[varl] [var2] [#bytes] move

Moves #bytes from varl to var2. The parameters varl and var2 cannot be

subscripted arrays.

repeat

repeat [code] until [boolean exp] end-repeat

Provides the standard repeat-until control structure up to a nesting

level of 40.

S=>

[varl] S=> [var2]

Moves varl to var2. This statement does not affect the rest of var2 if

varl is shorter than var2. The variables varl and var2 may be strings,

owners, or arrays.

set-bit-in

[varl] set-bit-in [var2]

Sets to 1 the var2 bits corresponding to ones in bit mask varl.

state

(See state-table)

RCS WORDS: SMACRO Statement Words

B-87
state- table

state-table

state:

state:

state:

[state-varl]

[test-varl]

[test-var8]

[test-var15]

[state-var2]

[test-var2]

[test-var9]

[test-varl6]

[state-var7]

[test-vary] [codeA]

[test-varl4] [codeB]

[test-var21] [codeC]

default-state: [default code]

end-state-table

Compares the values of all state variables (state-varl through

state-var7) to the values of the test-variables (test-varl through testvar?) in each line of the state table and executes the code on the first

line containing a match for every state variable. Following the match,

lines within the state table are ignored. SMACRO executes the default

code if none of the lines contains a match for every state variable.

You must use the same number of test variables in each line as there are

state variables. You may have up to seven state variables. A test variable can be a variable, a negated variable (using the ~ prefix character

to indicate "not-equal"), or XX. XX is a don't-care variable that

matches any state variable. Corresponding state and test variables must

be of the same type. State tables accept only types strv, iv, bv, and

seqv.

State tables cannot be nested. The total number of test variables (not

counting XX don't-care variables) must be less than 40.

then

(See if)

until

(See repeat)

w-fill

[var] [#words] [integer] w-fill

Starts at var and fills #words with the specified integer value,

parameter var cannot be a subscripted array. (See also b-fill)

The

C.

RCS WORDS: SMACRO Statement Words

B-88
while

#

while [boolean exp] do [code] end-do

Provides the standard while-do control structure up to a nesting level

of 40.

XX

(See state-table)

zero-bit-in

[ivarl] zero-bit-in [ivar2]

Sets to the ivar2 bits corresponding to ones in bit mask ivarl.

(See state-table)

~F

~F [FORTH word]

Calls the specified FORTH word.

-PRINT

-PRINT [var]

Displays the value of the specified variable. For an array variable, the

entire array is displayed. -PRINT does not work with a subscripted

array.

-PRINT"

-PRINT" [string"]

Displays the specified string.

RCS VORDS: SFfACRO Statement Words

B-89
Miscellaneous SMACRO words

0-SMACRO

0-SMACRO

Represents board in the system vocabulary. (All boards have even

numbers)

1 0-SMACRO

1 0-SMACRO

Represents board 10 in the system vocabulary. (All boards have even

numbers)

12-SMACRO

12-SMACRO

Represents board 12 in the system vocabulary. (All boards have even

numbers)

2-SMACRO

2-SMACRO

Represents board 2 in the system vocabulary. (All boards have even

numbers)

n-SMACRO

4-SMACRO

Represents board 4 in the system vocabulary. (All boards have even

numbers)

6 -SMACRO

6-SMACRO

Represents board 6 in the system vocabulary. (All boards have even

numbers)

(

RCS WORDS: Miscellaneous SMACRO Words

B-90
8-SMACRO

8-SMACRO

Represents board 8 in the system vocabulary. (All boards have even

numbers)

DEFINITIONS

DEFINITIONS

Enables the current vocabulary. You must precede DEFINITIONS with the name of a vocabulary.

LIST-0

LIST-0 [name]

Creates a list owner.

m

m [name]

Adds a variable with the specified name to the most recently created list

owner. You must declare this named variable in the same vocabulary as

the list owner. (For example, you cannot add a variable from the SDEF

vocabulary if the most recently created list owner is in the $DEF

vocabulary)

page

page

Contains a copy of the four high-order address bits. Routines that perform address calculations require this FORTH variable because the system

does not allow access to the actual address register. To keep the information in this variable current, all code that sets the address register

must also set this variable. In particular, an interrupt routine that

changes the four high-order bits must first preserve the page variable

before making the changes. The interrupt routine must then restore the

page variable and reset the address register bits before executing an IRET. (See also enter-interrupt and exit-interrupt in the section

"SMACRO statement words")

RCS WORDS: Miscellaneous ;^<ACRO Words

B-91
SDEF

SDEF C

Sets the system vocabulary.

-INTERRUPT

[interrupt#] -INTERRUPT [routine]

Sets the specified interrupty/ to call the specified routine.

COMM Words

buffer-ready-f

buffer-ready-f

Indicates when the buffer is ready. You must include this integer variable in every vocabulary that COMM accesses.

COMM

COMM

f Loads the communications utility.

COMM-PROCESS

COMM-PROCESS

The routine that performs the communications process. You must include

this routine in the board process on the COMM board.

control-cycle-#-clks

control-cycle-#-clks

Contains the user-defined number of counts for the communications timer

based on a 153-KHz counter cycle. The default value for this SMACRO

variable is 1300 (hex). For debugging, you can change this value to 7FFF

to obtain the longest possible interval between cycles.

ERASE-COMM-TABLE

ERASE-COMM-TABLE

Erases all entries from the communications table of a board, thus deleting all communication paths between control levels. ^

RCS WORDS: COMM Words

B-92
i

RESTART-COMM-TIMER

RESTART-COMM-TIMER

Restarts the communications timer (timer on the COMM board).

SHOW-TABLE

SHOW-TABLE

Displays the contents of the current communications table. The first

column contains unimportant information which you can ignore. Each line

in the table represents either a transfer path from an output buffer to

common memory or a transfer path from common memory to an input buffer on another level. Thus, two lines comprise a complete transfer path.

TO-DESTINATION

(See TRANSFER-FROM)

TRANSFER-FROM

TRANSFER-FROM [vocabulary buffer] TO-DESTINATION [vocabulary buffer]

Enters a buffer transfer into the communications table of a board, thus

adding a communication path between control levels.

WAIT-FOR-NEXT-COMM-CYCLE

WAIT-FOR-NEXT-COMM-CYCLE

Delays program execution until the communications timer begins the next

communications cycle. You can optionally include this statement in the

board process on the COMM board.

RCS WORDS: COft! Words

B-93
B.2 RSL WORDS

The following list describes the user words defined in RSL. All block refer- ences are absolute, unless otherwise indicated. The RSL words fall into the

following categories:

• RSL operating system words

• Language words

• TASK command words

• RSL system parameter words

• Control level words

RSL Operating System Words

$DEF

$DEF

Enables all levels to load their file definitions from the same source

block. Though the file definitions come from the same source block, $DEF

declares them in the correct vocabulary. You must define this word on all control levels to set their vocabularies.

?ARR

?ARR [array name]

Displays the following information for the specified array: record number, absolute source block number, number of sectors for each dimension,

movetable name for each dimension, sector pose name, and current sector

list. ?ARR sets the editor default block to the last block number

displayed.

?LOC

?LOC [location name]

Displays the following information for the specified location: record

number, absolute source block number, pose name, movetable name, and a matrix representing the resulting pose. ?LOC sets the editor default

block to the last block number displayed.

RSL WORDS: RSL Operating System Words

B-94
7M0VE-T0

7M0VE-T0

Displays the following information for all currently defined move-to

paths: record number, absolute source block number, path-", object,

start location, and destination location. 7M0VE-T0 pauses after displaying the information for each move-to path and waits for you to press any

key before displaying the information for the next move-to path. You can press _2£ to abort the operation of 7M0VE-T0 before it displays all cur- rent move-to paths. 7M0VE-T0 sets the editor default block to the last

block number displayed.

?MTB

?MTB [movetable name]

Displays the specified movetable, its record number, and its absolute

source block number. ?MTB sets the editor default block to the last

block number displayed.

?OBJ

?OBJ [object name] [grip#]

Displays the following information for the specified gripy/ on the specified object: OBJECT-NAME-FILE record number, OBJ-GRIP-FILE record number, absolute source block number for the object grip, and name of the

grip movetable. ?OBJ sets the editor default block to the last block

number displayed.

?POSE

?POSE [pose name]

Displays a matrix representation of the specified pose and its configuration flags, record number, and absolute source block number. 7P0SE sets

the editor default block to the last block number displayed.

ABT

ABT [level name]

Aborts the control process of the specified level by setting the abort-f

variable to true. The level can be TASK, PATH, PRIM, or JOINT.

RSL WORDS; RSL Operating System Words

B-95
GO

GO

Starts the execution of all control level and communications processes

and issues the RESTART command to the TASK level by loading block 8921,

GO prompts you to initialize the robot interface.

HALT

HALT

Stops the execution of all control-level processes, the communications

process, and the robot interface by loading block 8924. HALT clears all

slave-board output buffers, sets offsets and prepares the system to execute the next GO command it receives. Block 8925 performs the same functions as block 8924 except that block 8925 leaves the robot interface

active so that you can use the TT command. (See also TT)

Joint/comm

Joint/comm

Specifies the board segment of the JOINT/COMM board. You use this FORTH

constant with remote-slave words described in the section "Remote-slave

words"

.

POFF

POFF [level name]

Turns off the debug print facility for the specified control level by

setting the print-f variable to false. The level can be TASK, PATH,

PRIM, or JOINT. (See also PON)

»t

PON

PON [level name]

Turns on the debug print facility for the specified control level by

setting the print-f variable to true. The level can be TASK, PATH, PRIM,

or JOINT. (See also POFF)

( Ml

RSL WORDS: RSL Operating System Words

B-96
Prim

Prim

Specifies the board segment of the PRIM board. You use this FORTH con- stant with remote-slave words described in the section "Remote-slave

words"

.

RECORD-POSE

RECORD-POSE [pose name]

Stores the current robot pose in the named pose variable. If the pose

name is not yet defined, RECORD-POSE defines it.

Task/path

Task/path

Specifies the board segment of the TASK&PATH board. You use this FORTH

constant with remote-slave words described in the section "Remote-slave

Words".

TT

TT

Executes one cycle of the full system and displays debug output for all

control levels. You must edit block 8923 to activate or deactivate the

robot interface during the operation of TT. You can edit block 919 on each level to display the additional debug output. You must precede TT

with the HALT command if the robot interface is to be inactive. Alternatively, you must precede TT with 8925 LOAD if the robot interface is to

be active. (See also HALT)

TTT

[#cycles] TTT

Performs the TT single-step function a number of times equal to #cycles.

(See also TT)

TYPE-POSE

[block//] [line#] TYPE-POSE [pose name]

Enters source code for the specified pose into the specified block,

beginning at the specified line.

RSL WORDS; RSL Operating System Words

B-97
Language Words

(See -mtb-)

-arr-

-arr-[array name] [base location] [x-#-sectors] [x-movetable]

[y-#-sectors] [y-movetable] [z-#-sectors] [z-movetable]

[sector pose]

Defines an array with the specified name and dimensions.

Where:

• array name contains the name of the array.

• base location specifies the location that is the origin (sector 0) of

the array.

• x-#-sectors , y-//-sectors , and z-#-sector3 specify the number of sectors along the x, y, and z axes of the array frame. Currently, the

total number of sectors must be less than or equal to 20. The size of

sector-list limits the total number of statements. You can increase

the size of sector-list.

• x-movetable , y-movetable , and z-movetable contain the names of the

movetables that give the displacements between sectors along the x, y,

and z axes of the array frame. The movetables should consist only of

tool frame motions. The array retains its shape if you move the

location.

• sector pose contains the name of the pose RSL uses to store the position of the current sector during execution.

I

imtb-

-imtb- [inverse name] [source name]

Defines an inverse movetable with the specified name based on the specified source movetable.

Where:

• inverse name contains the name for the new movetable.

• source name contains the name of the original movetable.

RSL WORDS: Language Words

B-98
#

-loc-

-loc- [location name] [pose] [movetable]

Defines a location with the specified name. The specified pose and movetable combine to define the new location.

Where:

• location-name contains the location name.

• pose contains the name of the pose.

• movetable contains the name of the movetable.

-mtb-

-mtb- [name]

[frame] [X] [Y] [Z]

[r-tool] [axis] [angle]

-mtb-endDefines a movetable with the specified name. There are two parts to the

movetable syntax: the name line (-mtb-) and the sequence of transform

lines ( ) terminated by -mtb-end-. Each transform line specifies

either a vector translation or a rotation. You specify translations by

giving the x, y, and z components of the vector (expressed in either the

base or tool frame). You specify rotations by giving the angle and the

axis (x, y, or z) of the tool frame. The unit of measurement for translations is inches. For rotations the unit is degrees, within the range

+180.00 to -179.99.

Where :

• name contains the movetable name.

• frame contains either t-base or t-tool to specify the base frame or the tool frame, respectively.

• X contains the x component of the translation vector.

• jf contains the y component of the translation vector.

• Z^ contains the z component of the translation vector.

• r-tool specifies a rotation about the tool frame.

• axis contains X, Y, or Z to specify the axis about which to rotate.

• angle contains the angle to rotate in degrees.

RSL WORDS: Language Words

B-99
•mtb-end-

(See -mtb-)

-obj-

-obj- [object phrase] [grip movetable]

Defines an object grip with the specified name. The grip# specifies the

grip position on the object and the specified grip movetable defines the

grip position for the robot.

Where:

• object phrase contains the object name and grip number.

• grip-mtb contains the name of the movetable that defines the grip

position.

-path-

-path- [path type] [object phrase] [location phrase]

or,

-path- move-to [object phrase] [start location phrase] [destination

location phrase]

The path statement syntax contains two parts: the path statement and a sequence of path-point lines. The -path- line defines the type and the

parameters of the path; the -ppt- lines give the sequence of steps in the

algorithm. See -ppt- for the path-point syntax.

Where:

• path type is one of the RSL path types: approach-pickup, departpickup, approach-release, or depart-release.

• object phrase contains the object name and the grip number for this

path.

• location phrase contains the type of goal (loc or arr) and the name

that defines the goal of this path.

• start location phrase contains the location type (loc or arr) and the

start location name.

• destination location phrase contains the location type (loc or arr)

and the destination location name.

e

RSL WORDS: Language Words

B-100
-pose-

# -pose- [name] [pose numbers] [configuration flags]

Defines a pose with the specified name. The definition includes pose

numbers and configuration flags. The pose numbers are the seven floating-point numbers that specify a quaternion and a vector. Refer to the

robot transform documentation for information on the three configuration

flags.

Where:

• name contains the name of the pose.

• pose numbers contains the seven floating point numbers for the quaternion and vector that represent the pose.

• configuration flags contains the three configuration flags, usually

+1,0 or -1.0. See your robot transform documentation for details.

-ppt-

-ppt- goto [location phrase] [trajectory phrase]

Adds a goto path-point to the current path.

Where:

• location phrase contains the type (loc, arr, goal, or tool) and the name of the goal location.

• trajectory phrase contains the type of trajectory (cart or joint) and

the trajectory parameters. (For descriptions of the trajectory

parameters, see cart and joint)

-rr-

-rr- [name] [file] [size]

Defines a round-robin with the specified name and size in the specified

file.

Where:

• name contains the name of the round-robin.

• file contains the name of the round-robin file.

• size specifies the number of records in the round-robin file.

approach-pickup

(See -path-)

RSL WORDS: Language Words

B-101
approach-release

(See -path-)

arr

arr [name]

Indicates an array in a location phrase. (See -path- and -ppt)

cart

cart [translational max acceleration] [translational max velocity]

[translational neighborhood] [rotational max acceleration]

[rotational max velocity] [rotational neighborhood]

Indicates a cartesian trajectory in a path-point trajectory phrase. When

the trajectory routine reports done, the robot is within both the translational and rotational neighborhood of the goal.

Where:

• translational max acceleration contains the maximum allowed magnitude

of the translational acceleration, in inches per cycle per cycle.

• translational max velocity contains the maximum allowed magnitude of

the translational velocity, in inches per cycle.

• translational neighborhood contains the translational distance in

inches from the current goal location at which the trajectory routine

reports done.

• rotational max acceleration contains the maximum allowed magnitude of

the rotational acceleration in degrees per cycle per cycle.

• rotational max velocity contains the maximum allowed magnitude of the

rotational velocity, in degrees per cycle.

• rotational neighborhood contains the rotational distance in degrees

from the current goal location at which the trajectory routine reports

done

.

depart-pickup

(See -path-)

depart-release

(See -path-)

RSL WORDS: Language Words

B-102
goal

goal [name]

Indicates a goal movetable in a path-point loc phrase. (See -ppt-)

goto

(See -ppt-)

joint

joint [acceleration] [velocity] [delta]

Indicates a joint trajectory in a path-point traj phrase.

Where:

• acceleration contains the maximum allowed acceleration of any joint

given as the percentage (between and 100) of the hardware maximum

for each joint.

• velocity contains the maximum allowed velocity of any joint given as

the percentage (between and 100) of the hardware maximum for each

joint.

• delta contains the difference in degrees from the location joint values at which the trajectory routine reports done. When the trajectory

reports done, all joint values are within this delta.

loc

loc [name]

Indicates a location in a" location phrase. (See -path- and -ppt-)

move-to

(See -path-)

nul

nul

The name of a predefined object, location, and movetable. Use nul to

specify a nul value in the definition of paths and path-points.

RSL WORDS: Language Words

B-103
r-tool

(See -mtb-) k

t-base

(See -mtb-)

t-tool

(See -mtb-)

tool

tool [name]

Indicates a tool movetable in a path-point location phrase. (See -ppt-)

TASK Command Words

MOVE-TO

MOVE-TO [object] [grip#] [destination location type] [destination]

[array sector]

Sends a move-to path to the PATH level. MOVE-TO uses the current location as the start location. The array sector specification is optional,

you need to specify the array sector only if the destination location

type is arr (indicating an array).

MOVE-TO updates the current location to the path goal when PATH completes

the path. MOVE-TO reports an error if it cannot find a specified path.

After you issue MOVE-TO, the TASK level reports its status as executing

until the PATH level reports its status as done. Then the TASK level

also reports its status as done.

I

PAUSE

PAUSE

Sends PAUSE to the PATH level and sets the current location and object to

nul. After you issue PAUSE, the TASK level reports its status as exe- cuting until the PATH level reports its status as done. Then the TASK

level also reports its status as done.

RSL VORDS: TASK Connand Words

B-104
#

RESTART

RESTART

Sends the RESTART command to the PATH level and sets the current location

and object to nul. After you issue RESTART, the TASK level reports its

status as executing until the PATH level reports its status as done.

Then the TASK level also reports its status as done.

TRANSFER

TRANSFER [object phrase] [source location phrase] [source sector list]

[destination location phrase] [destination sector list]

Sends the following sequence of path commands to the PATH level:

1. move-to object source destination

2. approach-grasp object source

3. depart-grasp object source

H. move-to object source destination

5. approach-release object destination

6. depart-release object destination

RSL repeats the specified sequence of paths for each sector in the sector

list if the source or the destination consists of an array. If both the

source and the destination are arrays, the sector lists must have the same lengths. RSL updates the current location as it completes the exe- cution of each path.

After you issue TRANSFER, the TASK level reports its status as executing

until the PATH level indicates that all paths are complete by reporting

its status as done. Then the TASK level also reports its status as done.

RSL System Parameter Words

The following lists describe parameters that are associated with the JOINT,

PATH, and PRIM levels and with RSL.

JOINT parameters

These variables are set in the range of blocks 980 to 989 of the JOINT

level. The auto-load block of the JOINT D>M loads block 980.

a-sysmax

a-sysmax

Contains the maximum acceleration for each joint of the robot. This

6-element array describes acceleration in inches per cycle squared or radians per cycle squared.

RSL WORDS; JOINT Parameters

B-105
creep-delta

creep-delta

Contains the distance each joint is to move, relative to a joint limit.

The CREEP command uses this 6-element floating-point array to control the

movement of the joints.

creep-vel

creep-vel

Contains the velocity each joint is to use to reach the distance specified by creep-delta. The CREEP command uses this 6-element floatingpoint array to control the movement of the joints.

Ij-limit

Ij-limit

Contains the lower joint limits for each joint of the robot. This

6-element array describes lower joint limits in inches or radians. The

JOINT-LIMIT-TEST routine uses these same limits to test for valid joint

values. You must edit the JOINT-LIMIT-TEST routine if you want this routine to use other limit criteria.

next-point-scale-threshold

next-point-scale-threshold

Determines when the CARTESIAN command is to report next-point status.

The next-point-scale-threshold variable has the value 0.5 for RSL

operation.

uj-limit

uj-limit

Contains the upper joint limits for each joint of the robot. This

6-element array describes upper joint limits in inches or radians. The

JOINT-LIMIT-TEST routine uses these same limits to test for valid joint

values. You must edit the JOINT-LIMIT-TEST routine if you want this rou- tine to use other limit criteria.

RSL WORDS: JOINT Parameters

B-106
•

v-sysmax

v-sysmax

Contains the maximum velocity for each joint of the robot. This

6-element array describes the velocity in inches per cycle or in radians

per cycle.

PATH pzurameters

This variable is set in the range of blocks 980 to 989 of the PATH level. The

auto-load block of the PATH D>M loads block 980.

tp-cycles

tp-cycles

Specifies the delay (in number of cycles) between the tool-pose feedback

from the JOINT level and a robot's achievement of that pose. This variable has a value of 2 when you are using RSL with VAL SLAVE. The TOOLPOSE-'' routine uses this variable to set tool-pose-".

PRIM parameters

These variables are set in the range of blocks 980 to 989 of the PRIM level.

The auto-load block of the PRIM D>M loads block 980.

joint-traj-delay

joint- traj-delay

Specifies the delay (using a floating-point number of cycles) between

issuing a command to, and the feedback pose from, the JOINT level.

joy-max-v

joy-max-v

Specifies the maximum translational velocity (using a floating-point num- ber of inches per cycle) that you can obtain using the joystick. The

velocity switch on the joystick controller scales velocities down from

this maximum value.

>

RSL WORDS: PRIM Psirameters

B-107
joy-max-w

joy-max-w

Specifies the maximum rotational velocity (using a floating-point number

of radians per cycle) that you can obtain using the joystick. The velocity switch on the joystick controller scales velocities down from this

maximum value.

RSL parameters

INV-TOOL-MTB

INV-TOOL-MTB

Defines an inverse of the tool point with respect to the robot wrist.

You can define INV-TOOL-MTB as the inverse of TOOL-MTB by entering the

sequence -imtb- INV-TOOL-MTB TOOL-MTB .

TOOL-MTB

TOOL-MTB

Defines the tool point with respect to the robot wrist. You can redefine

this movetable to change the tool point; however, you must also redefine

INV-TOOL-MTB at the same time.

Control-Level Words

abort-f

abort-f

Aborts control-level execution when this flag is true. (See also ABT

under "RSL Operating System Words")

cycle-time

cycle-time

Records the number of 153-KHz clock ticks required for the levels to perform the current execution cycle. You can use the PRINT-TIME routine to

convert clock ticks to microseconds.

ij «

RSL WORDS: Control-Level Words

B-108
Display

# Enables you to display user-defined debug information. Display is a part

of the board process that runs after the level executes its routines.

You can turn the printing on with PON and turn the printing off with

POFF. (See also PON and POFF under "RSL Operating System Words")

error-list

error-list

Contains the list of status-arg values. You can execute this sequential

variable owner in Show mode to display the names for the status-arg

values.

inc-command-#-in

Indicates that a level has received a new command. You must increment

this counter after setting the input command for a control level.

JS

.

JS [joint array]

Displays the joint angles, joint velocities, or joint accelerations con- tained in the specified joint array. You must edit this routine to

accommodate your specific robot. For example, if you are using a PUMA

760 robot, enter JS servo-com-joint to display the joint values (in

degrees) commanded to the robot servo level. JS is defined only for the

JOINT level.

List-display

List-display

Contains user-specified variables that are useful for debugging. Executing List-display in Show mode displays the values of these variables.

max-cycle-time

max-cycle-time

Records the largest number of 153-KHz clock ticks required to complete an execution cycle since you issued RESTART. You can use the PRINT-TIME

routine to convert clock ticks to microseconds.

RSL WORDS: Control-Level Words

B-109
min-cycle-time

min-cycle-time

Records the smallest number of 153-KHz clock ticks required to complete

an execution cycle since you issued RESTART. You can use the PRINT-TIME

routine to convert clock ticks to microseconds.

overflow-cycle

overflow-cycle

Contains the number of cycles since you issued RESTART in which the control level required longer than a cycle to complete its execution.

PDEF

PDEF

Sets the vocabulary for the PATH level. PDEF is defined only on the

TASK/PATH board.

print-f

print-f

Controls debug printing. PON sets this flag true and POFF sets this flag

false. (See also PON and POFF under "RSL Operating System Words")

TDEF

TDEF

Sets the vocabulary for the TASK level. TDEF is defined only on the

TASK/PATH board.

WAIT-TASK-DONE

WAIT-TASK-DONE

Waits for the status-report variable to indicate executing (that is, not

done) and then waits for the status-report variable to indicate done.

You can use this word in a load block to issue a sequence of commands to

the TASK level. For this situation, WAIT-TASK-DONE issues each successive command only after the previous command indicates done. You can use ABT TASK to abort the operation of WAIT-TASK-DONE before all commands in

the sequence execute.

RSL WORDS; Control-Level Words

B-110

^

l(
^

Appendix C

SYSTEM MAPS

This appendix describes how RCS (with RSL version 1.6) allocates the MULTIBUS

address space, I/O space, interrupt assignments, and timers.

C.I MDLTIBUS ADDRESS SPACE

The following list describes the allocation of memory for RCS and RSL

version 1.6.

•f

Address Range

00000- 1FFFF

20000-3FFFF

40000-5FFFF

60000-7FFFF

80000-EFFFF

80000-8FFFF

90000-DFFFF

E0000-EEFFF

EF000-EFBFF

EFC00-EFC1F

EFC20-EFC7F

EFC80-EFFFF

F0000-FBFFF

FC000-FFFFF

Contents

RSL processor

PRIM processor

TASK/PATH processor

JOINT/COMM processor

Common memory

User files

System dictionary

RCS communication buffer

Unused address space

Disk control

Remote/slave board semaphores

Unused address space

Unused address space

FORTH PROMs

The unused address space shown in this list is available for user applications. You can use 2M-bit addressing to increase the address space if your

MULTIBUS backplane includes the P2 connector option. This option enables you

to relocate the user files and the system dictionary in memory, and then add

up to three more processes in the address range 80000-DFFFF. (See the dpage

and fpage words for information on allocating memory to the system dictionary

and SMACRO files.)

C.2 MDLTIBDS I/O SPACE ORGANIZATION

The following list describes the allocation of the I/O space for RCS.

I/O Address Contents

0000-004F Unused I/O space

0050-0051 Unused I/O space

0052-0053 Rimfire 45 disk and tape controller

005M-005F Unused I/O space

0060-007F Unused I/O space

0080-009F J4 iSBX connector on 86/30

00A0-00BF J3 iSBX connector on 86/30

«)

00C0-00DF Other 86/30 ports

00E0-00FF Unused I/O space

C.2 MDLTIBDS I/O SPACE ORGANIZATION

C-1
All unused I/O address space and the J3 and J4 ports are available for user

applications. (|

C.3 RCS INTERRDPT ASSIGNMENTS

The following list describes the assignments of the interrupts that affect the

operation of RCS.

Interrupt Number Function

6 millisecond time-out interrupt

1 8087 error interrupt

2 Communication bit input (not used on the

board with the communications process)

3,M On-board serial port (not required on slave boards)

5,6,7 Unused interrupts

C.4 TIMERS

Each 86/30 board has three programmable timers, numbered 0, 1, and 2. Timer

0, on the COMM board, is used by the COMM-PROCESS . Timer on other boards is

not used. Timer 1 is used by the debug routines TIME-P, START-TIMER, and

READ-TIMER. Timer 2 is used for the on-board serial port. (Note that this

timer can be used on slave boards that do not use the serial port.) i

C.4 TIMERS

C-2
Appendix D

RCS DISK BLOCK ORGANIZATION

RCS uses the FORTH block structure for all source code. The disk map below

shows how RCS allocates blocks on the Winchester disk for RSL version 1.6.

(Block numbers begin at 1000 for historical reasons.)

Absolute Block Numbers

1000-1349

1350-1499

1350-1359

1360-1363

136M

1365-1369

1370-1383

1384

1385-1397

1398

1399

1400-1401

1402

1403

1404

1405

1406-1412

1413«1H19

1420-1459

1460-1469

1470-1479

1480-1489

1490-1499

1500-1599

1600-5999

6000-6999

7000-7999

8000-8999

9000-9999

10000-10999

11000-11999

12000-12999

13000-30999

Contents

MBOOT

CUSTOM

Unused blocks

MAP

BACKUP

Other tape blocks

CUSTOM setup blocks

CUSTOM? map

DM? maps

PRESERVE-FILE map

PRESERVE map (PMAP)

Directory blocks

System addresses

Init-cm block

Slave board names Function-keys block

System vocabulary declaration

Additional function key blocks

auto-load blocks

BOOT-SYSTEM blocks

Load base system

Load application

BOOT-BASE-SYSTEM blocks

Screen editor

D>M images

Reserved space for tape transfer

RCS source code

RSL source code

TASK source code

PATH source code

PRIM source code

JOINT source code

Available to user

In addition to the RCS blocks, the disk map includes blocks 8000-12999, which

are allocated for RSL. When you use RSL, block 3 (relative to the first block

in the level) is a load block that loads the control-level software. Similarly, relative block 980 initializes the control level.

RCS uses a 10-block directory structure within these source-code blocks. The

system does not automatically maintain this directory information; you must

update the block-directory blocks when you add, delete, or move blocks. For

more information on directories, see "Understanding Directory Block Conventions" in Chapter 6, "Basic RCS Operations".

RCS DISK BLOCK ORGANIZATION

D-1
6
Appendix E

8087 OPERATION CODES FOR RCS

This appendix lists the 8087 operation codes and their RCS equivalents in

alphabetical order based on the Intel Operation Codes (as in Table S-19 in the

Intel 8086 Family User's Manual ) . RCS does not implement the complete 808?

instruction set.

Because FORTH uses only the length and the first three characters to differentiate the names of variables, NBS has changed the Intel names of some operation codes to ensure that the name of each code is unique.

As with the Intel assembler, unless the second letter is N, RCS assembles all

operation codes with an FWAIT first.

RCS provides the following words to modify operation code mnemonics:

• d sets the destination bit.

• LNG sets the temp-real format required to use the FLD, FST, and FSTP operation codes.

• P indicates that the 8087 is to pop the result (the same as the Intel P

suffix on the instruction mnemonic).

• rev indicates that the 8087 is to perform the indicated operation with the

source and destination operands reversed (the same as the Intel R suffix on the instruction mnemonic).

• INT indicates that the operation is to use 32-bit integer arithmetic.

• WINT indicates that the operation is to use 16-bit integer arithmetic.

The alphabetical list of Intel operation codes and their RCS equivalents

follows.

Operation

Calculate 2^-1

Convert to absolute value

Add real

Add real and pop

Load packed decimal

Store packed decimal and pop

Change sign

Clear exceptions

Compare real

Compare real and pop

Compare real and pop twice

Decrement stack pointer

Disable interrupts

Intel RCS Modifier Words

F2XM1 F2XM1

FABS FABS

FADD FADD

FADDP FADD

FBLD none

FBSTP none

FCHS FCHS

FCLEX none

FCOM FCOM

FCOMP FCOMP

FCOMPP FCOMPP

FDECSTP FDECSTP

FDISI none

8087 OPERATION CODES FOR RCS

E-1
Operation

Divide real

Divide real and pop

Divide real reversed

Divide real reversed and pop

Enable interrupts

Free register

Add integer

Compare integer

Compare integer and pop

Divide integer

Divide integer reversed

Load integer

Multiply integer

Increment stack pointer

Initialize 808?

Store integer

Store integer and pop

Subtract integer

Subtract integer reversed

Load real

Load +1.0

Load control word

Load environment

Load log2e

Load Iog2l0

Load log ^02

Load logg2

Load pi

Load +0.0

Multiply real

Multiply real and pop

Clear exceptions (no FWAIT)

Disable Interrupts (no FWAIT)

Enable Interrupts (no FWAIT)

Initialize 808? (no FWAIT)

No operation

Save state (no FWAIT)

Store control word (no FWAIT)

Store environment (no FWAIT)

Store status word (no FWAIT)

Calculate partial arctangent

Calculate partial remainder

Calculate partial tangent

Round to integer

Restore saved state

Save state

Scale

Calculate square root

Store real

Store control word

Store environment

Intel RCS Modifier Words

FDIV FDIV

FDIVP FDIV P

FDIVR FDIV rev FDIVRP FDIV rev P

FENI none FFREE FFREE

FIADD FADD INT or WINT

FICOM FCOM INT or WINT

FICOMP FCOMP INT or WINT

FIDIV FDIV INT or WINT

FIDIVR FDIV rev INT or rev WINT

FILD FLD INT or WINT

FIMUL FMUL INT or WINT

FINCSTP FINCSTPT

FINIT none FIST FST INT or WINT

FISTP FST P INT or P WINT

FISUB FSUB INT or WINT

FISUBR FSUB rev INT or rev WINT

FLD FLD

FLD1 1FLD

FLDCW FLDCW

FLDENV FLDENVIR

FLDL2E L2EFLD

FLDL2T L2TFLD

FLDLG2 LT2FLD

FLDLN2 LE2FLD

FLDPI PIFLD

FLDZ ZFLD

FMUL FMUL

FMULP FMUL P

FNCLEX FNCLEX

FNDISI FNDISI

FNENI FNENI

FNINIT FNINIT

FNOP none

FNSAVE none FNSTCW none FNSTENV FNSTENVIR

FNSTSW FNSTSW

FPATAN FPATAN

FPREM FPREM

FPTAN FPTAN

FRNDINT FRNDINT

FRSTOR FRSTOR

FSAVE FSAVE

FSCALE FSCALE

FSQRT FSQRT

FST FST

FSTCW FSTCW

FSTENV none €

8087 OPERATION CODES FOR RCS

E-2
B

Operation

Store real and pop

Store status word

Subtract real

Subtract real and pop

Subtract real reversed

Subtract real reversed and pop

Test stack top against +0.0

Make 8086 wait while 8087 is busy

Examine stack top

Exchange registers

Extract exponent and significand

Multiply Y and log2X

Multiply y and log2(X+1)

Intel RCS Modifier Words

FSTP FSTP

FSTSW none FSUB FSUB

FSUBP FSUB P

FSUBR FSUB rev FSUBRP FSUB rev P

FTST FTST

FWAIT FWAIT

FXAM FXAM

FXCH FXCH

EXTRACT FXTRACT

FYL2X FYL2X

FYL2XP1 FYL2XP1

8087 OPERATION CODES FOR RCS

E-3

Appendix F

JOYSTICK SCHEKATICS

This appendix contains schematic wiring diagrams describing the design of a joystick and the interface electronics housed in a separate chassis. The

joystick contains U smaller joysticks, 15 switches, a velocity-control knob,

and an indicator light. The joystick interfaces with the RSL PRIM level.

The following table lists the schematics.

TITLE PAGE

• Joystick Switch Layout F-2

• Joystick Switch Wiring Diagram F-3

• Joystick to Interface Electronics Cable Diagram F-4

• Joystick Switch Debounce Circuitry (page 1 of 2) F-5

• Joystick Switch Debounce Circuitry (page 2 of 2) F-6

• Emergency Stop and Hold Set/Clear Circuitry F-7

JOYSTICK SCHEMATICS

F-1
\n\

5 1

li \

II

!

UJ> 1 , LUQ \^ HOLD SET o

Z

WORLD

TRANSLATE ^

^ ^^^'^

o

F UJ m

C/) >- tv ~r

"3

1- 1- 11 1- - -1 1- - -1 O K oc

o

'U

LL f©i U Q > \uCa^^

z AJJ? § ,(T-)'

N V J

I]

' irr :i VlJ

N LJ >• m

<

UJ>

Q.

lO EMERG. STOP o u

J oj b£)

1-

UJlO ESTOP RESET o

c

UJ

>

K

N

HOLD CLEAR o

S K ( , ^J- 5, /^L^,

lO

i"

N

N

II 1- - -1 h - -1

NSLAl TOOL NSLAl

K K

Figure F-1. Joystick switch layout,

JOYSTICK SCHEMATICS

F-2
O

Z

O

o

o

I-

>

o

o

LL

<

o

<

o

o

z

d

i

Figure F-2. Joystick switch wiring diagram.

JOYSTICK SCHEMATICS

F-3
tn cc > (U 01;

r~ rg<*i^ui(£r^a{3)0'~ojD^inu)Ncoo)Orj'^*^^iflWNa> Or", CMnviflQNOOJO'-fym n m <n f^

o

I-

>

LL

LU

-I

m

<

o

o

H

>

-3

»- Nnvirt<^Ncoai'^'"'^'^^'^^^-(oo)OjrfMn«i/)(Df^a)g)o

I?

O Q

Figure F-3. Joi'stick to interface electronics cable diagram.

JOYSTICK SCHEMATICS
o

F

>

o

o

IL

>-n

I-5

o

(£

O

lUo

z

o

03

UJQ

\

r

8 8

! 5

i^i^4^

s

I

/\ A /N A A /N

s

A A A A A A A A 4\ /N >t^

8

1 ::

i

ff

WQ '!A<A\<«A<k\< U<U<U<U< ^i<J

?l

Figure F-4(a). Joystick switch debounce circuitry (par^e 1 of 2)

JOYSTICK SCHEMATICS

F-5

« I
o

H

(J) >

o

X

o

>

H

5

o

GC

O

HI

o

z

D

o

03

LU

G

n

1-

"A

r

1.

« V (0 ^Asi sAs ?A

ui <3-^NA'\^ in <—WVT T

QJ.C"

66

^0"

066

Figure F-4(b). Joystick switch debounce circuitry (page 2 of 2)

JOYSTICK SCHEMATICS

F-6
iiii II k n n

i

J all

>•

I " s

o

<

LL

OC

LUH

Z

O

HW>-o-9

o

I->

O-3

Figure F-5. Emergency stop and hold set/clear circuitry.

JOYSTICK SCHEMATICS

F-7

Appendix G

GLOSSARY

This glossary defines terms that are unique to or have unique meanings in RCS

or the RSL application. RSL terms are differentiated from RCS terms by placing RSL in parentheses after the term.

Absolute block number. The number used to specify the storage location of a block on the disk. See Relative block number .

AMRF. See Automated Manufacturing Research Facility .

Array. (RSL) An RSL data structure that contains a group of locations. An

array is one-, two-, or three-dimensional. Movetables define the displacement

between sectors of the array. Arrays are stored in an array file in common

memory

.

Automated Manufacturing Research Facility (AMRF). An experimental factory

developed by NBS to operate as a small, totally automated, batch machine shop.

Block. A division of the disk containing 1,024 bytes, arranged in 16 lines of

64 characters each. The entire disk is organized into blocks, each of which

has a unique block number.

C(M1. An RCS utility that provides a communication protocol for passing com- mands and status information between control levels.

Common memory. Random-access memory in a central location that all processor

boards in the system use to store the system dictionary, SMACRO files, and

command and status information.

Communications dead time. The communications interval during which the con- tents of command, status, and data buffers and flags in common memory are changed. During this time, no other process may execute.

Communications table. A table used by the RCS utility COMM to define desired

buffer transfers between processor boards.

Compile mode. One of the four RCS operating modes. RCS uses Compile mode

when you load blocks of code containing compiling words. See also Locate

mode. Run mode , and Show mode .

Configuration flags. Variables used to resolve ambiguities in the inverse

transform for a robot.

Control level. A group of functionally bounded modules that handle inputs,

decision processing, and outputs for one of the levels generated by the hierarchical task decomposition.

GLOSSARY

G-1
D>M. On the system disk, an area of 120 consecutive blocks, used to save a copy of local memory from the currently selected processor board. RCS enables

you to save up to five D>Ms for each of seven processor boards. The RCS word

[d>m#] D>M, where [d>m#] is a number from 1 through 5, enables you to move the

specified D>M region from the disk to the local memory of the current board.

The RCS word [d>m#] MEM>DISK moves code from the local memory of the current

board to the specified D>M area on the disk. A D>M is also called a disk

image , and is similar to an object file in a conventional system.

Directory block. A disk block that contains a description of the contents of

other disk blocks. RCS uses a hierarchical directory block structure, in

which directory blocks describe the contents of each 1000-, 100-, and 10-block

section of the disk.

Disk image. See D>M .

Hierarchical task decc»Q>osition. An approach to process control that defines

tasks in terms of successively more primitive modularized subtasks.

JOINT level. (RSL) The fourth, or lowest, control level in RSL's

hierarchical task decomposition. The JOINT level generates specific commands

that are transmitted to the robot to control its movement in real time. If

the robot has attached sensors, the robot also sends status information back

to the JOINT level. See also PATH level , PRIM level , and TASK level .

List owner. A SMACRO construct that enables you to group any type of variable

under a specified name (the list owner). See also sequential variable owner

and variable owner .

Locate mode. An operational mode that enables you to search for the source

block of any SMACRO word. One of the four RCS operating modes. See also Compile mode . Run mode , and Show mode .

Location. (RSL) An RSL data structure that consists of a location name and a specified pose and movetable combination. A location defines a new robot

position relative to a reference pose, using the movetable to specify the

coordinate transformations required to move to the new position from the ref- erence pose. RSL stores location definitions in a location file in common

memory

.

Master board. The single-board processor that handles user communication with

the system through the user terminal. The RCS editor is on the master board.

See also slave board .

Movetable. (RSL) An RSL data structure that consists of a movetable name and

up to eight separate rotations or translations that define the coordinate

transformations required to move from one robot position to another. RSL

stores movetable definitions in a movetable file in common memory.

Object. (RSL) An RSL data structure that defines objects in terms of an object name and a list of grip numbers and associated movetables. The movetables define the orientation of each grip relative to the object frame. RSL

stores object definitions in an object file in common memory.

GLOSSARY

G-2

«
Offset. The value of the FORTH variable OFFSET. The offset Is usually a multiple of 1000 associated with the currently selected board. By subtracting

the offset from the absolute block number, the system calculates the relative

block number. See also absolute block number and relative block number .

Path. (RSL) An algorithm that specifies the sequence of steps required to

perform a simple task, such as moving between locations or grasping an object.

Paths are stored as linked lists of path-points in a path-point file in common

memory. See also path-point .

PATH level. (RSL) The second control level in RSL's hierarchical task decomposition. The PATH level decomposes paths into a sequence of path-points and

then into trajectories. See also JOINT level , PRIM level , and TASK level . (RSL)

Path-point. (RSL) An RSL data structure that consists of a path-point com- mand and a pointer to the associated command parameters file. A path-point

consists of a single sensor-based motion. A linked list of path-points

defines an RSL path. See also path .

Pose. (RSL) An RSL data structure that defines the physical location of a robot. The pose definition consists of a pose name and its associated translation vector and rotation quaternion. RSL stores the pose definition in a pose file in common memory.

PRIM level. (RSL) The third control level in RSL's hierarchical task decomposition. The PRIM level decomposes trajectories into poses along a straight

line. See also JOINT level , PATH level , TASK level , and trajectory .

Quaternion. A four-number representation of a rotation by angle about an axis n. These numbers are expressed as: cos /2, sin /2 n , sin /2 n , sin /2 n^,

RCS. See Real-time Control System .

Real-time Control System (RCS). A software system that uses hierarchical task

decomposition, multiple processors, and cyclic execution to control real-time

applications.

Relative block number. The absolute block number minus the offset; the offset

is stored in the FORTH variable OFFSET; See also absolute block number and

offset .

Robot Sensor Language (RSL). A real-time control application written by NBS.

RSL implements a hierarchical task decomposition that uses four processors to run four hierarchical control levels.

Round-robin. (RSL) An RSL data structure that defines a circular, singly

linked list. RSL stores round-robin definitions in a round-robin file in common memory.

Routine. A SMACRO program. All SMACRO programs start with the word routine,

which assigns a name to the following SMACRO code, and end with the word

end-routine. SMACRO routines can be longer than one block.

GLOSSARY

G-3
RSL. See Robot Sensor Language .

RSL algorithm. (RSL) The RSL code a user writes to accomplish a task. RSL

compiles algorithms into a linked-list representation. Then RSL control

levels interpret the algorithm, using environmental data to command the robot

to execute a task.

RSL data. (RSL) Information about the robot environment, such as the name,

size, or location of an object. This information is stored in common memory

and is accessible to all control levels. Robot sensors can supply data to

RSL, or you can enter data directly from the keyboard. See also RSL

algorithm .

Rum mode. The normal operating mode for executing the commands that control

robotic equipment. Run mode is one of the four RCS operating modes. See also

Compile mode . Locate mode , and Show mode .

Sector. (RSL) An element of an array. Sector numbers start at 0. See also

array .

Sequential variable. A SMACRO variable type. The value of the first sequential variable is 0, and succeeding sequential variables contain successive

integers. Sequential variables belong to sequential variable owners.

Sequential variable owner. A SMACRO construct that enables you to group

sequential variables as members under a specified name (the owner). Members

must be sequential variables. See also list owner and variable owner .

Show mode. An operating mode that enables you to display SMACRO variables and

owners. Show mode is one of the four RCS operating modes. See also Compile

mode. Locate mode , and Run mode .

Slave board. A single-board processor that implements one or more of the

process control levels within the system. Direct user communication with a slave board is possible only with an ABCD switch box. Normally, communications between user and slave board occur through the master board. See also

master board .

S4ACR0. A set of word extensions to the FORTH programming language and operating system written by NBS for use in the RCS environment. The extensions

include structured programming constructs such as case, if-then-else,

repeat-until, and while-do statements. The extensions also include words and

constructs to facilitate programming real-time control applications, such as state table statements and vector, quaternion, and matrix operator words.

SMACRO file. A linked list of records that resides in common memory. SMACRO

files provide the primary method of communication between control levels.

State table. A construct that enables you to describe the possible states of

its inputs and outputs. The state table lists the set of relevant input variables, the possible combinations of values the input variables may assume, and

the required outputs for each combination of input values. The SMACRO language includes a state table statement to facilitate programming state tables.

GLOSSARY

G-k
System dictionary. A block of common memory that contains records with names

and pointers for every variable and procedure in the system.

System vocabulary. A predefined vocabulary that contains system variables.

Each processor board has a separate system vocabulary called SDEF. See also

user-defined vocabulary and vocabulary .

TASK level. (RSL) The first, or highest, control level in RSL's hierarchical

task decomposition. The TASK level decomposes all tasks into a sequence of

path types. See also JOINT level , PATH level , and PRIM level .

Trajectory. A goal point and parameters describing the path to the goal

point. RSL supports two trajectory types: Cartesian straight-line and joint

interpolated.

User-defined vocabulary. A subset of the system dictionary defined by the user. You can add up to five vocabularies per processor board. See also

system vocabulary and vocabulary .

User file. See SMACRO file .

Variable owner. A SMACRO construct that enables you to group variables as members under a specified name (the owner). Members can include the following

SMACRO variable types: integer, byte, floating point, string, segment, one- dimensional integer array, two-dimensional integer array, one-dimensional

floating-point array, and two-dimensional floating-point array. See also list

owner and sequential variable owner .

Vocabulary. An independently linked subset of RCS words in the system dictionary. See also system vocabulary and user-defined vocabulary .

GLOSSARY

G-5

Appendix H

BIBLIOGRAPHT

For additional information on robotics, robot interface specifications, the

Real-time Control System, FORTH, and specific hardware components, see the

documents listed in this bibliography.

ROBOTICS

The following books discuss robotics in general:

Asada, H., and Slotine, J.-J.E. Robot Analysis and Control . New York, NY:

Wiley-Interscience, 1986.

Brady, M. ; Hollerback, J.M.; Johnson, T.L.; Lozano-Perez, T.; and Mason, M.T.

Robot Motion: Planning and Control . Cambridge, MA: The MIT Press, 1982.

Coiffet, P., and Chirouze, M, An Introduction to Robot Technology . New York,

NY: McGraw-Hill Book Company, 1982.

Craig, J.J. Introduction to Robotics—Mechanics and Control . Reading, MA:

Addison-Wesley Publishing Company, I986.

Engelberger, J.F. Robotics in Practice—Management and Applications of

Industrial Robots . London, England: Kogan Page Limited, 1980.

Kane, T.; Likine, P.; and LeVinson, D. Spacecraft Dynamics . New York, NY:

McGraw-Hill Book Company, 198 3.

Nof, S.Y. (editor) Handbook of Industrial Robotics . New York, NY: John

Wiley & Sons, 1985.

Paul, R.P. Robot Manipulators: Mathematics, Programming, and Control . Cambridge, MA: The MIT Press, I98I.

Rehg, J. A. Introduction to Robotics—A Systems Approach . Englewood Cliffs,

NJ: Prentice-Hall Inc., 1985.

Snyder, W.E. Industrial Robots: Computer Interfacing and Control . Englewood

Cliffs, NJ: Prentice-Hall, Inc., 1985.

ROBOT INTERFACE SPECIFICATIONS

For information on robot interface specifications, see the following

publications:

Anon. "SLAVE Interface Specification for External Computer Path Control Using

VAL II", Publication Number 397T1; Unimation Incorporated; Danbury, CT:

January I986.

BIBLIOGRAPHY

H-1
Nashman, M. "A Low Level Robot Interface: The High Speed Host Interface",

NBSIR 86-3393; National Bureau of Standards; Gaithersburg, MD: June 1986.

REAL-TIME CONTROL SYSTEM (RCS)

The following documents provide additional information on the NBS Real-time

Control System:

Albus, J.S.; Barbera, A.J.; Fitzgerald, M.L.; and Nashman, M. "Sensory

Interactive Robots", Presented at the 31st General Assembly of the

International Institution for Production Engineering Research; September 1,

1981; Toronto, Canada.

Albus, J.S.; Barbera, A.J.; and Nagel, R.N. "Theory and Practice of

Hierarchical Control", Proceedings of the Twenty-Third IEEE Computer Society

International Conference; September 1981.

Albus, J.S.; Barbera, A.J.; and Fitzgerald, M.L. "Programming a Hierarchical

Robot Control System", Proceedings of the 12th International Symposium on Industrial Robots/6th International Conference on Industrial Robot Technology;

June 9-11, 1982; Paris, France.

Albus, J.S.; McLean, C.R.; Barbera, A.J.; and Fitzgerald, M.L. "An

Architecture for Real-Time Sensory-Interactive Control of Robots in a Manufacturing Facility", Proceedings of the Fourth IFAC/IFIP Symposium

Information Control Problems in Manufacturing Technology; October 26-28, 1982;

Gaithersburg, MD.

Albus, J.S.; McLean, C.R.; Barbera, A.J.; and Fitzgerald, M.L. "Hierarchical

Control for Robots in an Automated Factory", Proceedings of the 13th

International Symposium on Industrial Robots/Robots 7 Symposium; April 17-21,

1982; Chicago, IL.

Barbera, A.J.; Albus, J.S.; and Fitzgerald, M.L. "Hierarchical Control of

Robots Using Microcomputers", Proceedings of the 9th International Symposium

on Industrial Robots; March 13-15, 1979; Washington, DC.

Barbera, A.J.; Fitzgerald, M.L.; and Albus, J.S. "Concepts for a Real-Time

Sensory-Interactive Control System Architecture", Proceedings of the

Fourteenth Southeastern Symposium on System Theory; April 1982; Blacksburg,

VA.

Barbera, A.J.; Fitzgerald, M.L.; Albus, J.S.; and Haynes, L.S. "A Language

Independent Superstructure for Implementing Real-Time Control Systems",

Proceedings of the International Workshop on High-Level Computer Architecture;

May 21-25, 1984; Los Angeles, CA.

Barbera, A.J.; Fitzgerald, M.L.; Albus, J.S.; and Haynes, L.S. "RCS: The NBS

Real-Time Control System", Proceedings of the Robots 8 Conference and

Exposition, Volume 2 - Future Considerations; June 4-7, 1984; Detroit, MI.

BIBLIOGRAPHY

H-2
Fitzgerald, M.L., and Barbara, A.J. "A Low-Level Control Interface for Robot

Manipulators", Proceedings of the Workshop on Robot Standards (Sponsored by

the National Bureau of Standards and the Navy Manufacturing Technology

Program); June 6-7, 1985; Detroit, MI.

Fitzgerald, M.L.; Barbera, A.J.; and Albus, J. A. "Real-Time Control Systems

for Robots", presented at the SPI National Plastics Exposition Conference;

June 1985; Chicago, IL.

Haynes, L.S.; Barbera, A.J.; Albus, J.S.; Fitzgerald, M.L.; and McCain, H.G.

"An Application Example of the NBS Robot Control System", Robotics & ComputerIntegrated Manufacturing, 1984; Washington, DC.

McCain, H.G. "A Hierarchically Controlled, Sensory-Interactive Robot in the

Automated Manufacturing Research Facility", Proceedings of the IEEE

International Conference on Robotics and Automation; March 25-28, 1985;

St. Louis, MO.

FORTH

For more information on FORTH, see the following books that discuss FORTH in

general, and the following FORTH reference manuals.

General FORTH Documents

The following books discuss FORTH in general:

Brodie, L. Starting FORTH . Englewood Cliffs, NJ: Prentice-Hall, Inc., 1981,

Brodie, L. Thinking FORTH - A Language and Philosophy for Solving Problems . Englewood Cliffs, NJ: Prentice-Hall, Inc., 1984.

Hogan, T. Discover FORTH - Learning and Programming the FORTH Language . Berkeley, CA: Osborne/McGraw-Hill , Inc., 1982.

Katzan, H. Invitation to FORTH . Princeton, NJ: Petrocelli Books, Inc.,

1981.

Toppen, D.L. FORTH - An Applications Approach . New York, NY: McGraw-Hill,

Inc., 1985.

Winfield, A.F.T. The Complete FORTH . New York, NY: Sigma/Wiley Press, 1983-

FORTH Reference Manuals

The following manuals provide reference information on FORTH. Note that the

source of these reference manuals is also listed for your convenience.

Source : FORTH, Inc., 2309 Pacific Coast Highway, Hermosa Beach, CA

90254; (213) 372-8493.

BIBLIOGRAPHY

H-3
Manuals ; FORTH Reference Manual , Fourth Edition, April 1979.

Using FORTH , Second, Revised, Edition, March 1980.

Intel 8086 User's Supplement to the PolyFORTH Reference Manual , March 1980.

HARDWARE REFERENCE KANUALS

The following reference manuals discuss processor and I/O boards, memory

boards, the disk and tape controller board, the tape drive, the Winchester

disk drive, the MULTIBUS chassis, terminals, and printers. The source of each

manual or group of manuals is also listed for your convenience.

Processor and I/O Boards

For information on processor and I/O boards, see the following manuals:

Source : Intel Corporation, 3065 Bowers Avenue, Santa Clara, CA 95051;

(408) 987-8080. Publications available from Intel Literature

Sales, P.O. Box 58130, Santa Clara, CA 95052-8130;

(800) 548-4725.

Manuals : OEM Systems Handbook , Publication Number 210941-004, I986.

Microsystem Components Handbook , Volumes I and II, Publication

Number 230843-002, 1985.

iSBC 86/14 and iSBC 86/30 Single Board Computer Hardware

Reference Manual , Publication Number 144044-002, 1982.

iSBC 337A Multimodule Numeric Data Processor Hardware Reference

Manual , Publication Number 142887-001, 1980.

iSBC 519 Programmable I/O Expansion Board Hardware Reference

Manual, Publication Number 9800385B, 1979.

iSBC 534 Four Channel Communications Expansion Board Hardware

Reference Manual , Publication Number 9800450-02, 1979.

iSBX 311 Analog Input Multimodule Board Hardware Reference

Manual , Publication Number 142913-001, 1981.

iSBX 328 Analog Output Multimodule Board Hardware Reference

Manual , Publication Number 142914-002, 1982.

iSBX 350 Parallel Multimodule Board Hardware Reference Manual , Publication Number 9803191-02, 1980.

iSBX 351 Serial Multimodule Board Hardware Reference Manual , Publication Number 9803190-03, 1984.

BIBLIOGRAPHY

H-4
Memory Boaurds

For information on memory boards, see the following manual:

Source:

Manual:

Plessey Microsystems, P.O. Box 154, 1 Bluehill Plaza,

Pearl River, NY 10965; (914) 735-4661.

PSM 512A MULTIBUS Error-Correcting Dram—User's Guide , Document

Number PMUS/HB/ 10225, Issue 2, January 1984.

Disk and Tape Controller Board

For information on the disk and tape controller board, see the following

document:

Source: Ciprico Inc., 2955 Xenium Lane, Plymouth, MN 55441;

(612) 559-2034.

Document : "Ciprico Product Specification—Rimfire 45A, MULTIBUS Disk

Controller," Publication Number 21010084, Revision A, March 25,

1985.

Tape Drive

The following manual provides additional information on the tape drive:

Source : Cipher Data Products, Inc., 10225 Willow Creek Road, San Diego,

CA 92131; (619) 578-9100. Publications available from Cipher

Data Products, Inc., Technical Publications Department, P.O. Box

85170, San Diego, CA 92138; (800) 982-8808.

Manual : Model F880 Magnetic Tape Transport, Volume 1 —Operation

Maintenance, Technical Manual Number 799816-003, Revision Q,

April 1986.

Winchester Disk Drive

For information on the Winchester disk drive, see the following manual:

Source : Priam Corporation, 20 West Montague Expressway, San Jose, CA

95134; (408) 946-0293.

Manual : Fourteen-Inch Winchester Disc Drives-OEM Manual (Model 3350,

Model 6650, and Model 15450), Publication Number 308002, Revision

B, January 1984.

,

BIBLIOGRAPHY

H-5
HDLTIBUS Chassis

For information on the MULTIBUS Chassis, see the following manual:

Source .' ETI Micro, 6918 Sierra Court, Dublin, CA 9^568; (415) 829-6600.

Manual ; 8223 MULTIBUS Chassis User's Manual , Publication Number

832305822313301, 1983.

Terminals

The following manuals provide information on terminals:

Source : TeleVideo Systems Inc., 1170 Morse Avenue, Sunnyvale, CA 94086;

(408) 745-7760.

Manual : TeleVideo Model 950 CRT Terminal Installation and User's Guide , Document Number B300002-001, Revision B, April 1982.

Source : Digital Equipment Corporation, 129 Parker Street, Maynard, MA

01754; (800) 258-1710. Publications available from DEC

Accessories and Supplies Group, P.O. Box CS2008, Nashua, NH

03061; (800) 258-1710.

Manual : VT100 User Guide , 3rd Edition, Publication Number

EK-VT100-UG-003, 1981.

Source : Micro-Term, Inc., 512 Rudder Road, Fenton, MO 63026;

(314) 343-6515.

Manuals: Operating Manual—Model ERGO 301 , Publication Number

1-56200004-0D, March I983. [This terminal is VT100 compatible.]

ERGO 30IFK Addendum—Programmable Function Keys , Publication

Number 798500 14-0A, June 1984.

Source : Datamedla Corporation, 7401 Central Highway, Pennsauken, NY

08109; (609) 665-5400.

Manual : Elite 1521 A Video Terminal Operator's Handbook , Publication

Number 0810001-000-B, April 1978.

Printers

For information on printers, see the following manuals:

Source : Apple Computer, 20525 Marian! Avenue, Cupertino, CA 95041;

(408) 996-1010.

Manual ; Imagewriter User's Manual, Part I; Reference , Publication Number

030-0730-A, 1983.

BIBLIOGRAPHY

H-6
Source

i

Digital Equipment Corporation, 129 Parker Street, Maynard, MA

01754; (800) 258-1710. Publications available from DEC

Accessories and Supplies Group, P.O. Box CS2008, Nashua, NH

03061; (800) 258-1710.

Manual

;

LA120 DECwriter III User Guide , Publication Number

EK-LA120-UG-001, 1978.

Source

!

Integral Data Systems, Inc., Route 13 South, Milford, NH 03055;

(603) 673-9100.

Manual

:

The Paper Tiger, IDS-460 Impact Printer—Ovmer's Manual , Publication Number 9000-000-728, Second Edition, April 1981.

.

BIBLIOGRAPHY

H-7
'

•
INDEX

#-sectors variable, 10-6

//READ-COMMAND routine, 10-24

% character, 12-19

(Cartesian), 10-37

1 (Joint), 10-38

1 -dimensional arrays, 7-3

1 6-bit integer, 7-3

2-dimensional arrays, 7-3

32-bit floating point, 7-3

8-bit integer byte, 7-3

8086 assembly language. See Assembly language

8087 error messages, A-4

8087 numeric data processors, installing, 5-5

8087 operation codes for RCS, E-1

:C prompt, 7-1

8

:R joint/comm> prompt, 6-2

:R prim> prompt, 6-2

:R prompt, 5-13

:R rsl> prompt, 5-13, 6-1, 6-2

:R task&path> prompt, 6-2

Absolute block addresses, 6-5

Absolute block number, 6-5

Active Pedestal System, 12-3

ADD-TO-TAPE command, 6-29

Addresses

absolute block, 6-5

master board, 5-10

MULTIBUS, 4-2

record, 7-8

relative block, 6-5

align-grip FMR path-point, 12-16 amax variable, 10-1#

AMRF (Automated Manufacturing Research Facility), 12-1

ANSI adapter, 5-7

Apple Imagewriter, 5-2

approach-pallet path-point, 12-18

approach-pickup file, 10-9

approach-pickup path type, 9-5, 10-9

approach-release file, 10-10

approach-release path type, 9-5, 10-10

arr-name variable, 10-6

arr-pose variable, 10-7, 10-23

ARRAY-FILE, RSL file, 10-15

INDEX

1-1
ARRAY-POSE TASK variable, 10-23

Array data structure, 10-6

Arrays, 7-3, 9-4 M

Array Statement, RSL, 9-4 ^

Arithmetic operators, SMACRO, 7-9

Arrow keys, 6-17

Assembly language, 7-1, 7-19 s Assignment operators, SMACRO, 7-10 ] Atomic unit, 3-1

Auto-load block, 6-1, 6-14

Automated Manufacturing Research Facility (AMRF), 12-1

BACK-TASK, control task, 7-19

Background tasks, 4-3, 7-19

Backing up the system on tape, 6-29

Backslash (\), 1-3

BAD-TAPE command, 6-29

base-loc" variable, 10-6

base-trn, movetable line type, 10-5

BGO, RCS word, 7-19

Bit operators, SMACRO, 7-15

B L command, 6-23

Block addresses, absolute, 6-5

Block of code

editing, 6-16

empty blocks, 6-16

finding, 6-2

Block-directory, 4-2, 6-29, D-1 ^ Block number, absolute, 6-5 T

BLOCKS command, 6-23

Blocks, printing, 6-28, 6-29

Block structures, FORTH, 6-5

Board names and prompts, 6-2

Boolean file operators, SMACRO, 7-11

Branching, 2-5

Bus clock, installing, 5-5

Byte operators, SMACRO, 7-9

Byte SMACRO operator, 7-10

CALC-SECTOR-POSE routine, 10-25

Cancel Operation command, RCS editor, 6-22

Caret ("), 1-2, 1-3

CART-CONFIGURE routine, 10-56

CART-TRAJ routine, 10-45

CART> JOINT routine, 10-56

CARTESIAN command, 10-48

CARTESIAN routine, 10-53

Cartesian straight-line trajectory type, 11-8

Case statement, 2-5, 7-17

Cincinnati Milacron T3. See T3 robot

Cipher F880, hardware requirement, 5-2

Ciprico Rimfire 45, hardware requirement, 5-2

CLEAN-UP routine, 10-29, 10-36, 10-47, 10-54

Clear command, RCS editor, 6-22 M

INDEX

1-2
CLEAR command, RCS editor, 6-23

Code, locating, 6-3

Code, control levels, 9-2

Code, SMACRO, 7-2

com-loc-type variable, 10-23

com-loc-* variable, 10-23

com-obj-'' variable, 10-23

command-echo variable, 10-22, 10-31

command-echo-out variable, 10-39, 10-50

COMMAND-PROCESS

JOINT processing, 10-51

MOVE-TO task addition, 11-2

PATH processing, 10-32

PATH routine, 10-33, 10-44

TASK level stage 10-26

TASK routine, 10-27

COMMAND-RR routine, 10-47

Commands

between control levels, 3-4

editing, 6-16

resuming, 9-9

suspending, 9-9

COMM board, 5-6

COMM communications utility, 4-3, 4-5

passing command and status information, 8-1

programming, 8-3

Common memory

board, 5-6

board jumper modifications, 5-6

allocation of, 9-8, C-1

components, 3-4

data, 3-5

Communications

buffers, 3-5, 8-2

between control levels, 3-4, 12-16

bit, 8-3

COMMUNICATIONS/DIAGNOSTICS processor, 12-6

cycle, 3-2, 3-5

dead time, 8-3

interprocessor, 5-6

on the same board, 8-4

process, 8-2, 8-3

table, 8-3

utility. See COMM communications utility

with sensors, 7-15

Compile mode, 4-4, 6-12, 7-1

8

Compiling

path-points, 10-17

paths, routines for, 10-18

RSL source code, 9-8

trajectories, 10-16

word, 10-15

conf-flag variable, 10-4

INDEX

1-3
Configuring

the common memory board, 5-6

the disk and tape controller board, 5-6 (^

the disk drive, 5-7

interprocessor communications, 5-6

the printer, 5-9

the processor boards, 5-4

the terminal, 5-8

Containing file, 10-12. See also Round-robin

Control-key sequence, 1-2

Control levels

block numbers and, 6-5

commands, 3-1

cyclic processing, 3-2

decision processing, 3-2

defined, 2-1

hierarchy of RSL, 12-14

hierarchy of the T3 RCS, 12-5

RCS, 7-12

round-robins and, 10-12

RSL, 4-5

structures, 3-1

subtasks, 3-1

vocabulary names and, 6-3

Conversion operators, SMACRO, 7-9

Copy Line command, RCS editor, 6-20

CPRINT command, 6-28

CREEP button, 10-42

~ f

CREEP command, 10-49

cur-loc-type variable, 10-23

cur-loc-'' variable, 10-23

cur-obj-^ variable, 10-23

current-conf-flag variable, 10-41

current-pose variable, 10-41

current-vel variable, 10-41

CUSTOM command, 5-13

Customizing function keys, 6-3

cycle-#-status-out

JOINT status variable, 10-50

PATH status variable, 10-31

PRIM status variable, 10-39

TASK status variable, 10-22

Cyclic processing, 3-2

d, RCS word, E-1

Data-independent programs, 3-4

Data in common memory, 3-5

Data, RSL, 9-1

Data type compiling words, 10-14

Data type search routines, 10-15

Datamedia Elite 1521A, 4-3, 5-2, 5-8

Datamedia terminals, software installation, 5-12

Dead time, 8-3

Debugging routines, creating, 13-13 w

INDEX

1-4
Debugging techniques, 13-1 » 13-1^

Decision processing, 2-5

DEC VT100, 4-3, 5-2

DECwriter III printers, software installation, 5-2, 5-13

Delete Line command, RCS editor, 6-20

depart-pickup path type, 9-5, 10-9

depart-release path type, 9-5, 10-10

Direct Memory Access (DMA) board, 12-4

Directory blocks

conventions, 6-4

example of using, 6-5 source code, 4-5

Directory structure, D-1

Disk and tape controller board

configuring, 5-6

jumper modifications, 5-7

switch settings, 5-7

Disk block organization, 4-2, D-1

Disk drive switch settings, 5-7

Disk drives, configuring, 5-7

Disk files, 4-5

Disk, formatting, 5-10

Disk image, 6-1

DMA (Direct Memory Access) board, 12-4

Documentation conventions, 1-2

edge, FMR path-point, 12-15

Editing

a block of code, 6-16

command categories, 6-18

a routine, 6-10

RSL source code, 9-7

EDITING utilities, 4-3

Editors, RCS, 6-16

Environmental data routines, 10-15, 10-16

equate, FMR path-point, 12-15

Erase Character command, RCS editor, 6-19

Errors

fatal, A-1

JOINT, 10-51

messages, A-1

PATH, 10-21

PRIM, 10-42

RCS, A-1

Rimfire disk, A-4

RSL, 9-8

syntax, 7-1

TASK, 10-23

ETI Model 8223, hardware configuration, 5-2

feedback-conf-flag variable, 10-41

feedback-pose variable, 10-41, 10-54

Field Materiel-Handling Robot (FMR), 12-11

File declaration, SMACRO, 7-8

INDEX

1-5
File operators, SMACRO, 7-11

Floating point

arrays, 7-3 ^

expressions, 7-11

numbers ina matrix, 7-^

operators, identifying, 7-9

SMACRO operator, 7-10

FMR, 12-11

FMR hardware configuration, 12-11

FMR path-points, 12-15

FMR software configuration, 12-14

FMR transfer example, 12-18

FORTH

block structure, 4-2, 6-5, D-1

programming language, 4-2, 7-1

PROM circuits, installing, 5-5

Forward Block command, RCS editor, 6-20

FROM-TAPE command, 6-29

Functionally bounded modules, 3-1 > 3-2

Function keys

customizing, 6-3

on the TeleVideo 950, 5-9

Garbage collection, 9-8

gmax variable, 10-11

goal-pose-'^-in variable, 10-38

goal-pose-" variable, 10-37 I

GOAL-POSE routine, 10-34M | goal-type variable, 10-23, 10-30 ^

goal-" variable, 10-23, 10-30

goal point, 9-3, 9-4

Goto Block command, RCS editor, 6-21

goto file, 10-10

goto-loc-type variable, 10-10

goto-loc-" variable, 10-10

GOTO-REMOVE routine, 10-18

goto-traj-" variable, 10-10

goto-traj-type variable, 10-10

goto path-point, 9-5, 12-15

goto routine, 10-17, 10-35

grip# variable, 10-7, 10-20

grip-mtb-" variable, 10-7

Grip location, 3-7

numbers, 9-4

size, 3-7 f

INDEX

1-6
Hardware

Cipher F880, 5-2

Ciprico Rimfire 45, 5-2

components of RCS, 4-1

FMR configuration 12-11

T3 RCS configuration, 12-3

installation procedures, 5-4

Priam, 5-2, 5-7

requirements, 5-1, 5-2

switch box, as a debugging tool, 13-15

Header variables, 7-8

Heat sinks, installing, 5-5

Hexadecimal numbers, 1-3

Hierarchical control levels. See Control levels

HOLD-CLEAR button, 9-9, 10-40

Hold-set button, 9-9, 10-40

hold-set variable, 10-42

Holster position, 12-8

HOME command, RCS editor, 6-22

HOME key, 6-17

Horizontal machining workstation, 12-1

I/O operators, SMACRO, 7-15

I/O space allocation, C-1

Identifying file records. See Record numbers

IF-THEN-ELSE structures, 2-5, 3-2

inc-command-#-echo-out variable

JOINT status variable, 10-50

PATH status variable, 10-31

PRIM status variable, 10-39

TASK status variable, 10-22

inc-command-#-in variable

JOINT status variable, 10-50

PATH status variable, 10-30

PRIM status variable, 10-38

TASK status variable, 10-21

Infix notation, 7-8

input-command variable

JOINT status variable, 10-50

PATH status variable, 10-30

PRIM status variable, 10-38

TASK status variable, 10-21

Input-process-output structure, 2-3

Input Keep command, RCS editor, 6-19

input variables, 2-6, 7-2

ilnsert On/Off command, RCS editor, 6-19

Installing

8087 numeric data processors, 5-5

bus clock, 5-5

FORTH PROM circuits, 5-5

heat sinks, 5-5

processor-board jumpers, 5-4

RCS software, 5-10

INT, RCS word, E-1

INDEX

1-7
Integers

16-bit, 7-3

8-bit byte, 7-3

arrays, 7-3

operations, results, 7-9

operators, identifying, 7-9

SMACRO operator, 7-10

Integral Data Systems Paper Tiger, 5-2, 5-13

Intel hardware, 2-3, 4-1, 5-2, 5-3

Intel operation codes and RCS equivalents, E-1

Interface requirements, robot, 5-3

Interrupt

enabling, 7-20

assembly language and, 7-19

Interrupt assignments, C-2

Interrupt routines, 4-4, 7-20

j-acc variable, 10-11

j-delta variable, 10-12, 10-38

j-vel variable, 10-11

JOINT

commands, 10-48

decision processing, 10-52

errors, 10-51

level, modes of motion for, 10-47

joint-com-conf-flag variable, 10-41

joint-com-pose variable, 10-40

JOINT-CONFIGURE routine, 10-56

JOINT-LIMIT-TEST routine, 10-55

JOINT-PAUSE routine, 10-53

JOINT-RESTART routine, 10-53

Joint-space motion, 10-47

JOINT-STATUS routine, 10-43

JOINT-TRAJ command, 10-49

JOINT-TRAJ routine, 10-45, 10-53

JOY-STATUS routine, 10-43

JOINT>CART routine, 10-56

JOINT

control level, 9-3, 10-3

input coimnand buffer, 10-50

level routines, 10-47

processing, 10-51 to 10-54

robot-dependent routines, 10-54

routines, 10-47

status information, 10-50

Joystick, F-1

Joystick buttons, 10-40

JOYSTICK routine, 10-46

Joystick schematics, F-1

keys, as shown in manual, 1-2

INDEX

1-8
las t-feedback-conf-flag variable, 10-42

last-feedback-pose variable, 10-41

last-pose variable, 10-41

last-vel variable, 10-41

Line operations, RCS editor, 6-20

Linked-list record structure, 4-4

list&tape> prompt, 5-12

List owners, SMACRO, 7-7

LLIST command, 6-23

LNG, RCS word, E-1

Loading

base system, 5-13

code in RCS, 6-9 to 6-11

routines under development, 6-10

RSL, 5-14 source code, 5-11

tape utility, 5-11

loc-mtb-" variable, 10-6

loc-name variable, 10-6

LOC-PHRASE routine, 10-35

loc-pose-" variable, 10-6

Locate mode, 4-4

Location

data, 3-7

data structure, 10-5

defined, 9-7

file, 10-5 to 10-6

phrase, 9-5

statement, 9-4

LOCATION-FILE, RSL file, 10-15

Macros, 4-3

Mark to Keep command, RCS editor, 6-19

Master board address, 5-10

Matrix declarations, 7-4

Matrix operators, SMACRO, 7-16

Memory allocation, C-1

Memory files, 8-1

Micro-Term ERGO 301, 5-2, 5-8

Modes

compile, 4-4, 6-12, 7-18

locate, 4-4

run, 4-4, 6-12, 7-18

SHOW, 4-4, 6-12, 7-18

Modularity, 2-2

move-to file, 10-8, 10-9

move-to path type, 10-8, 11-2, 9-5

move-to-dest-type varible, 10-9

move-to-dest-" variable, 10-9

move-to-obj-'' variable, 10-9

MOVE-TO-PARAM routine, 10-28, 11-2

move-to-path-^ variable, 10-9

MOVE-TO-SEARCH routine, 10-28

move-to-start-type variable, 10-9

INDEX

1-9
move-to-start-" variable, 10-9

MOVE-TO routine, 11-2, 10-19, 10-28

MOVE-TO task, 11-1 to 11-2 %

Movetable

data structure, 10-4

defined, 9-4

file, 10-4 to 10-5

line types, 10-5

number of lines in a, 10-5

statements, 9-4

MOVETABLE-FILE routine, 10-15

mtb-name variable, 10-5

MULTIBUS

address, 4-2

address space, C-1

defined, 4-1

I/O space organization, C-1

Multiprocessor operation, 4-3

NEW-COMMAND?, routine, 10-32, 10-42, 10-52

NEW-PPT? routine, 10-34

Next Want command, RCS editor, 6-22

N L command, RCS editor, 6-23

OBJ-GRIP-FILE routine, 10-8

obj-grip-L-'' variable, 10-7

obj-" variable, 10-23

OBJ-NAME-FILE routine, 10-8, 10-15 ^

obj-name variable, 10-7

Object

data, 3-7

data structure, 10-7

file, 10-7

phrase variable, 10-21

statement, 9-4

variable, 10-20

old-ja variable, 10-56

old-joint-angle variable, 10-56

Open Line command, RCS editor, 6-20

Operating system, 4-3

Operation code mnemonics, modifying, E-1

Operation codes, E-1

INDEX

1-10
Operators, SMACRO

arithmetic, 7-9

assignment, 7-10

bit, 7-15

Boolean file, 7-11

byte, 7-9

conversion, 7-9

file, 7-11

I/O, 7-15

matrix, 7-16

quaternion, 7-16

relational, 7-10

stack, 7-15

Organizing a complex system, 2-4

Orientation of a pose. See Quaternion

Ovmers, 7-U

P, RCS word, E-1

P2 connector option, C-1

Paper Tiger Printers. See Integral Data Systems Paper Tiger

PATH, 4-5

commands, 10-29 to 10-30

control level, 9-3, 10-2, 10-29

decision processing, 10-33

errors, 10-31

input command buffer, 10-30

processing, 10-32, 10-36

status information, 10-31

Path algorithm, 9-2

Path data structure, 10-8

Path file, 10-8

Path statements, 9-4

Path types, 9-2, 9-5, 10-9

PATH-CLEAR routine, 10-18

PATH-PATH routine, 10-33

PATH-PAUSE routine, 10-33

Path-point

adding, 11-3

command, 9-3, 10-8

command phase, 9-5

compiling, 10-17

data structure, 10-10

range, 11-3

statement, 9-5

PATH-RESTART routine, 10-33

path-srv-* variable, 11-7 to 11-8

PATH-STATUS routine, 10-27

path-" variable, 10-23, 10-30

Paths, adding, 11-2

Paths, compiling, 10-18

INDEX

1-11
PAUSE command

at the JOINT level, 10-48

at the PATH level, 10-29

at the PRIM level, 10-37

at the TASK level, 10-20

Pedestal System, Active, 12-3

Percent {%) character, 7-2, 12-19

PIC (Programmable Interrupt Controller), 5-6

pickup-pallet path-point, 12-18

Plessey Model PSM 512A, 5-2, 5-3, 5-6

Pointers, 3-5

polyFORTH 1, 7-1

Pose

data, 3-6

data structure, 10-4

declarations, 7-4

defined, 7-4

expressions, 7-16

file, 10-4

operations, 7-9

operators, 7-16

position. See Vector

statement, 9-3

POSE-FILE, 10-15

pose-name variable, 10-4

POSE-ROUND routine, 10-36

POST-PROCESS routine

JOINT level, 10-51

PATH level, 10-32

PRIM level, 10-36, 10-42

TASK level, 10-26, 10-29

pose-'^-in variable, 10-50

pose-'^-out variable, 10-51

pose-" variable, 10-48, 10-49

Postprocessing, 2-7, 3-1

ppt-command, 10-19

ppt-command-list variable,, 11-4

ppt-command variable, 10-8

ppt-para variable, 10-8

Pre-locate message, 6-4

PRE-PROCESS routine, 10-26

adding SONAR-READ to, 11-5

JOINT level, 10-51

PATH level, 10-32

PRIM level, 10-42

Preprocessing, 2-5, 3-1

PRESERVE routine, 5-13, 6-16

PRESERVE-FILE routine, 5-13, 6-16

Previous Block command, RCS editor, 6-20

Priam hardware, 5-2, 5-7 c

INDEX

1-12
PRIM

board, 11-8

commands, 10-37

control level, 9-3, 10-3, 10-36

decision processing, 10-44

defined, k-5

errors, 10-42

input command buffer, 10-38

processing, 10-42, 10-46

status information, 10-38

trajectory information, 10-39

variables, 10-40

PRIM-PAUSE routine, 10-44

PRIM-RESTART routine, 10-44

PRIM-STATUS routine, 10-32

Print command, RCS editor, 6-28

Printer configuring, 5-9

Printing

block directories and programs, 6-29

a range of blocks, 6-28

utilities, 5-9, 6-28

Processing stages, 3-1

Processor boards, 5-4, 5-5

Programmable Interrupt Controller (PIC), 5-6

Programming

COMM, 8-3

control levels, 3-5

conventions, 7-2

function keys, 5-8

Programs, data-independent, 3-4

Programs, printing, 6-29

Prompts, 5-13, 6-1, 6-2, 7-18

QR command, RCS editor, 6-24

Quaternions

declarations, 7-4

operators, SMACRO, 7-16

pose statement and, 9-3

nesting, 7-9

SMACRO operator, 7-10

Quick Change, 12-3

range path-point, 12-15

rbt-pose-^ variable, 10-39

INDEX

1-13
RCS

application examples, 12-1

attributes, 2-2 (

common memory. See Common memory.

communications, 8-1

components, 4-1

debugging techniques, 13-15

defined, 1-1

dialogue example, 6-24

disk block organization, D-1

editors, 6-16

error messages, A-1

features, 2-1

function as a robot-related component, 12-3

hierarchical control architecture, 1-1

installation procedures, 5-1

interrupt assignments, C-2

module examples, 2-3

programs, 3-4

SMACRO, 7-1

software installation, 5-10

words, list of, B-1

REACH-CHECK routine, 10-55, 10-56

READ-COMMAND routine, 10-26

READ-CART-TRAJ routine, 10-16

READ-JOINT-TRAJ routine, 10-16

READ-LOC-PHRASE routine, 10-16, 10-25

READ-OBJ-PHRASE routine, 10-18, 10-24 to 10-25 / READ-SECTOR-LIST routine, 10-25

READ-SERVO-STATUS routine, 10-55

READ-TRAJ-PHRASE routine, 10-16

Read/write conflicts, 8-1, 8-3, 8-4

Record addresses, 7-8

RECORD-POSE routine, 9-7

Record numbers, 7-8

Relational operators, SMACRO, 7-10

Relative block addresses, 6-5

REMOVE-TRAJ-PHRASE routine, 10-17

RESTART command

JOINT level, 10-48

PATH level, 10-29

PRIM level, 10-37

TASK level 10-19

RESTORE-FILE routine, 6-16

Retire command, RCS editor, 6-21

rev, RCS word, E-1

Rimfire 45, 5-6, 5-7

Rimfire disk error messages, A-4

Robot-dependent routines, 10-47

Robot-independent routines, 10-47

Robot interface requirements, 5-3

Robot Sensor Language. See RSL.

Robot tasks, executing, 6-11

rot-nbrhd variable, 10-11 C^

INDEX

1-14
Rotation velocity, 11-6

Round-robin

data structure, 10-12

file, 10-14

statement, 9-6

ROUND-ROBIN-FILE routine, 10-15

Routines, 3-2

compiling path-points, 10-17

compiling paths, 10-18

compiling trajectories, 10-16

debugging, 13-3

environmental data, 10-15, 10-16

executing, 6-11

interrupt, 4-4, 7-20 names in SMACRO, 7-2

robot-dependent, 10-47

robot-independent, 10-47

under development, 6-10

rr-name variable, 10-14

rr-size variable, 10-14

rr-'' variable, 10-14

RSL (Robot Sensor Language), 4-5

board, 11-4, 11-6

code example, 9-6

commands, 9-8

compiler, 10-14

control levels, 9-1, 10-1

data structures, 10-3

debugging techniques, 13-15

extensions, 11-1

loading, 5-14

names in, 10-3

overview, 9-3

programming structures, 9-1 source code

compiling, 9-8

editing, 9-7

entering, 9-7

words, list of, B-94

Run mode, 4-4, 6-12, 7-l8

SAME-BLOCK? routine, 10-15

Saving

disk images, 6-13

internal variables, 2-7

and rebooting the system, 6-12

system dictionary, 6-16 user files, 6-16

Scalar operations, 7-9

SCALE routine, 10-54 scan path-point, 12-16

Schematics, joystick, F-1

Screen editor, RCS, 6-16, 6-17

search-result variable, 10-23

INDEX

1-15
Search routine, 10-15

Sector

defined 9-4

DIP switch, 5-7

numbering, 10-7

variable, 10-20

sector-list variable, 10-7

segment variable, 7-3

Semaphore variable, 8-3

Sensor hardware for the FMR, 12-12

Sequential variable owners, 7-6

Servo-controlled gripper system, 12-3

SERVO-STATUS routine, 10-52

Servo trajectory phrase syntax, 11-6

Servo trajectory type, adding to RSL, 11-6

SET-SERVO-COMMAND routine, 10-55

SHIFT-KLC sequences, 5-9, 13-1

SHOW mode, 4-4, 6-12, 7-18

Single-board computers, 4-1

Single-stepping

through a routine, 13-3

through RSL control levels, 13-4

Slave board, 4-3

SMACRO

arithmetic operation examples, 7-9

code, 7-2

compiler, 6-9

file declaration, 10-4

files, 4-4, 7-8, 7-12

infix notation, 7-8

language , 4-4

operations, order of, 7-9

operators. See Operators, SMACRO

programming conventions, 7-2

routines, 7-1

8

for standard programming operations, 7-8

statements, 7-17

syntax, 7-1

variable

declaration, 7-3

names, 7-3

owner, 10-4

types, 4-4

Software

components of RCS, 4-2

FMR configuration, 12-14

installation procedure, 5-10

modularization, 2-2

module structures, 2-2, 2-4

requirements, 5-4

switch, 6-3

T3 RCS configuration, 12-5

#,

INDEX

1-16
Source code

blocks, 4-5

loading, 5-11

locating, 6-4

organization, 6-5

structure, 4-2 source location phrase variable, 10-21 source sector list variable, 10-21

Square brackets, meaning of, 1-3

Stack operators, SMACRO, 7-15

state-label variable, 10-23

State table, 3-2 to 3-3

State variables, 3-2

Statements, RSL

array, 9-4

location, 9-4

movetable, 9-4

object, 9-4

path, 9-4

path-point, 9-5

round-robin, 9-6

Statements, SMACRO

constants in, 7-10

status-arg-out variable, 9-9

JOINT status variable, 10-51

PRIM status variable, 10-39

PATH status variable, 10-31

TASK status variable, 10-22

status-report variable, 9-9

JOINT status variable, 10-50

PATH status variable, 10-31

PRIM status variable, 10-39

TASK status variable, 10-22

Status information, 3-4, 10-31

STORE-TRAJ-PHRASE routine, 10-17

STRAIGHT-LINE routine, 10-46

String comparison operator, 7-11

String delimiter, 1-3

Switch box, 6-3

Switch settings, DIP, 5-7

System dictionary, 3-4

restoring, 6-16

saving, 6-16

vocabularies, 4-5

System maps, C-1

System utilities, 4-3

t-# variable, 10-23

t->IN variable, 10-22

t-word variable, 10-23

INDEX

1-17
T3 robot, 12-1

control level commands, 12-7

hardware configuration, 12-3 (^

RCS control-level hierarchy, 12-5

software configuration, 12-5

UNLOAD tray example, 12-9

TABLE pose, 9-6

Tape

backing up, 6-29

error messages, A-4

reading, 6-29

rewinding, 5-11

utilities, 6-29

TASK, 4-5

commands, 10-19

control level, 9-2, 10-2, 10-3, 10-19

decision processing, 10-27

errors, 10-23

input, 10-3

input command buffer, 10-21

processing, 10-26 to 10-29

status information, 10-22

utilities, 10-24

variables, 10-22

TASK&PATH board, 11-7

TASK-PAUSE routine, 10-28

TASK-RESTART routine, 10-27

Tasks

TASK=>PATH routine, 10-26 ^V

aborting, 6-12

adding, 11-2

adding MOVE-TO, 11-2

executing, 6-11

TeleVideo terminals

Model 950, 4-3, 5-2, 5-9

software installation, 5-12

printer commands, 6-29

Terminal configuring, 5-8

Terminals supported by RCS, 4-3

Thru-tv command, RCS editor, 6-29

Timers, C-2

TOOL-POSE-" routine, 10-33

tool-rotx movetable line type, 10-5

tool-roty movetable line type, 10-5

tool-rotz movetable line type, 10-5

tool-trn movetable line type, 10-5

traj-para-"

JOINT variable, 10-49

PRIM variable, 10-37

TRAJ-PHRASE routine, 10-35

TRAJ-ROUND routine, 10-36

traj-type-in variable, 10-38

traj-type variable, 10-37 '

INDEX

1-18
traj-*-in

JOINT variable, 10-50

PRIM variable, 10-38

TRAJ command, 10-37

Trajectory

compiling, 10-16

data, 3-8

data structure, 10-11

defined, 9-3

phrase, 9-5

type, 9-5

type, adding, 11-6

TRAJ routine, 10-^*5

TRANSFER-FROM statement, 8-3

Transfer command, 6-21, 10-20 to 10-21

Transform line ( ), 9-^

Translation velocity, 11-6

Transparent mode on terminals, 5-9

trn-nbrhd variable, 10-11

Tutorial, RCS, 6-24

Underlined text, meaning of, 1-3

Undo Block command, RCS editor, 6-22

Unimate robots, 5-2, 12-11

UNLOAD command, 12-9

User files, 6-16

Utility data routines, 10-15

Values of test variables, 3-3

Variable declarations in SMACRO, 7-3

Variable names in SMACRO, 7-2

Variable owners, 4-M, 7-^, 7-6

Variable types in SMACRO, 7-3

Variables, header, 7-8

Variables, input, 2-6, 7-2

Vector, 9-3

declarations, 7-4

operations, nesting, 7-9

operators, 7-4, 7-16

Velocity data, 10-40

Velocity profile errors, 10-40

Vision Sensor System, 12-3 vmax variable, 10-11

Vocabularies. See System dictionary

Vocabulary, changing, 6-3

Vocabulary identifier, 7-2, 13-15

Vocabulary names, 6-3

WAIT-PATH-DONE routine, 10-25

Want String command, RCS editor, 6-22

Watchdog Safety System, 12-3

WINT, RCS word, E-1

Wiring diagrams, F-1 wmax variable, 10-11

INDEX

1-19
WREAD-COMMAND routine, 10-24

WUNLOAD command, 6-30

x-#-sectors variable, 10-6

x-mtb-'* variable, 10-6

y-#-sectors variable, 10-6

y-mtb-" variable, 10-6

z-#-sectors variable, 10-6

z-mtb-^ variable, 10-6

<ENTER>, on the VT100 r 5-9

A command , RCS editor , 6-19

C command , RCS editor , 6-20

D command , RCS editor , 6-20

E command , RCS editor , 6-19

F command

,

, RCS editor,, 6-20

G command , RCS editor , 6-21

K command

,

RCS editor. 6-19

N command , RCS editor., 6-22

command

,

RCS editor. 6-20

P command , RCS editor , 6-20

R command j RCS editor. 6-21

T command J RCS editor. 6-21

U command

,

RCS editor, 6-22

W command) RCS editor. 6-22

X command j RCS editor, 6-22

z command j RCS editor. 6-19

•

INDEX

1-20
NBS.n4A IREV. 2-8C) U.S. DEPT. OF COMM. BIBLIOGRAPHIC DATA

SHEET (See instructions)

1. PUBLICATION OR

REPORT NO,

NIST/TN-1250

2. Performing Organ. Report No, 3. Publication Date

September 19!

4. TITLE AND SUBTITLE

The NBS Real-Time Control System User's Reference Manual.

5. AUTHOR(S)

Stephen A. Leake and Roger D. Kilmer

6. PERFORMING ORGANIZATION (If joint or other than NBS. see instructions) NATIONAL INSTnrUTE OF STANDARDS AND TECHNOLOGY

(formerly NATIONAL BUREAU OF STANDARDS)

U.S. DEPARTMENT OF COMMERCE

GAFTHERSBURG, MD 20899

7. Contract/Grant No.

8. Type of Report & Period Covered

Final

9. SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS (Street. City. State. ZIP)

SAME AS ITEM #6 ABOVE.

10. SUPPLEMENTARY NOTES

I I Document describes a computer program; SF-185, FlPS Software Summary, is attached.

11. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here) The NBS-developed Real-Time Control System~RCS~ is a hierarchically-structured

I controller designed to use sensory feedback for real-time control of automated

systems. This manual describes the basic structure of RCS and the programming

features available to develop application software. In addition to a detailed

description of the structure of RCS, examples illustrating the use of RCS for the

control of robotic systems are presented.

12. KEY WORDS (Six to twelve entries; alphabetical order: capitalize only proper nances; and seporcite key words by semicolons)

Control architecture; FORTH; hierarcfiical ; RCS; real-time control;

robot control; robot programming; SMACRO: sensory feedback.

13. AVAILABILITY ^^ Unlimited

Q For Official Distribution. Do Not Release to NTIS

• 1X3 Order From Superintendent of Documents, U.S. Government Printing Office, Washington, D.C.

20402.

IX)j Order From National Technical Information Service (NTIS), Springfield, VA. 22161

14. NO. OF

PRINTED PAGES

381

15. Price

'U.S.COVERNntENT PRINTING OFF ICE ! 1988-201 -597 i 92573 USCOMM-DC 6043-P80
$



^^tgSm
.:*¥'"'•**-"

METRIC SY£

METRIC UN '^ \i) u

*- LENGT^

millimeter ''') :-!.:.S centimeter (cm) 0.3 decimeter [<^m) 3.94 incries meter (ITS; 39.37 inches decameter (Dm) 32.81 feet hectometer (hm> 109.36 yards

kilometer (km) 0.62 mile? myriameter

AREA

square centime!

:

square meter {nr) i are (a) ii9.eo S , hectare (ha) 2.47 c\' _ _ sq. kilometer (km^) 0.3361 sq. miles

WEIGHT

milligram (mg) U.U 10 grams

centigram (eg) 0.154 grains

decigram (dg) 1.543 grains gram (g) 0.035 ounces decagram (Dg) 0.353 ounces

hectogram (hg) 3.527 ounces

kilogram (kg) 2.2046 pounds

quintal 220.46 pounds

metric ton 1.1 tons

^OORUMSPEASE

ELTE

2532

¥OLUM£

cubic centimeter (cm^) cubic decimeter (dm^) 0.035.3 cubic reel cubic meter (m^) 1.31 cubic yards cubic decameter (Dm') 13.10 cubic yards

CAPACITY, c

milliliter '^ntiliter

.^iC incnef

cie.c-li'e; (D!) . lie feet

tar (hi) .^.53 cubic fee(

CAPACITY, DRY

3 pints

! \'.i-^.\ iM u.boa quarts

decaliier (Dl) 1.14 necks

hectoliter (fi) vhels

CAPACITY, LIQUID

millilitef' centiliter deciliter

liter decaliter

0.27 fluidrams

0.338 fluldounces

0.21 pints 1.057 quarts

2.64 gallons