perm filename VAL.V[1,VDS] blob sn#243733 filedate 1976-10-25 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00010 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\|\\M1BDR30\M2SIGN57\M3NGR25\M4NGR20\F2\CVICARM
C00008 00003	MONITOR COMMANDS - PROGRAM EDITING
C00012 00004	MONITOR COMMANDS - INPUT/OUTPUT
C00015 00005	MOTION INSTRUCTIONS
C00022 00006			SUMMARY OF INSTRUCTION SET
C00024 00007			    LOADING INSTRUCTIONS
C00026 00008	MISC NOTES:
C00027 00009	123456789012345678901234567890123456789012345678901234567890123456789
C00031 00010	DATA STRUCTURE FOR COMMAND INSTRUCTIONS
C00032 ENDMK
C⊗;
\|\\M1BDR30;\M2SIGN57;\M3NGR25;\M4NGR20;\F2\CVICARM
\F3\C154 EAST DANA STREET
\CMOUNTAIN VIEW, CA. 94041

\F1\C				VAL

\C          INSTRUCTION SET FOR VICARM MANIPULATOR CONTROL PROGRAM 
\C			Version of September 1,1976

\J	For the following instructions, commas are to be used to separate
variables.  If an argument is optional, the default value will be used
if no value is given.  The names of transforms and programs can consist
of up to six characters. \.

\CMONITOR COMMANDS - DEFINING POSITIONS

\J The following commands are used for defining transforms and determining
the current position of the arm.  Transforms are specified in cartesian
coordinates and Euler angles.\.

\L     Command     	       	\R	Operation                     

\L TRANS <trans>\L\+=100;\→l\←=300;\L\j Used to specify and modify the value of transform
			can be modified by typing a new value after the
			query CHANGES?.   Values that are not to be changed
			can be omitted.   Changes are continuously asked for
			until no change in the transform is made.
			The X,Y,Z specify the position of a point centrally
			located between the finger tips in table coordinates.  
			O,A,T specify the orientation of the hand.  With all three
			angles (in degrees) zero, the hand points in the negative Y
			direction with the fingers in a horizontal plane.  The 
			orientation vector which points from one finger tip to the
			other  is aligned along the X axis.  O specifies a rotation
			of the orientation vector about a vertical direction.  Thus
			at O=90deg, the hand, still horizontal, would point along the
			positive X direction.  A is a rotation about the orientation
			vector.  With A=90deg. the hand always points straight down.
			T is a final rotation about the axis of the wrist and
			corresponds to a rotation of the final )#6) joint.\.
	
\L HERE <trans>\j	Defines transform <trans> to be current arm position.
			As with TRANS, post modification of the Euler angles (O,A,T)
			and cartesian position (X,Y,Z) is permitted.\.

\LTF <trans>,X,Y,Z,O,A,T\R	Initializes the transform <trans> to the specified
			value.  All arguments left unspecified will be set
			to zero.  This instruction is used mainly for 
			reading in transforms that have be punched on paper
			tape.

\LWHERE\R		Prints out the current location of the arm in Euler
			and joint angles along with the current hand opening.



\CMONITOR COMMANDS - PROGRAM CONTROL

\L     Command     	       		Operation

EXEC <PROG>,<NLOOP>,<STEP> Executes the motion program <PROG>, <NLOOP>
			number of times.  A loop is terminated when
			either a STOP instruction or the last defined step
			of the program is encountered.  If <nloop> is
			omitted, the program will be executed one time.
			If <prog> is omitted, execution of the last
			user program EXEC'ed will be re-initiated.
			If <STEP> is specified, the motion program begins
			execution at motion program step <STEP> for the
			first pass, otherwise, the program starts execution
			at step #1.  All successive passes begin at the 
			start of the program.

P			Proceeds motion program at the step following the
			step where execution was halted due to a PAUSE
			instruction or runtime error.
MONITOR COMMANDS - PROGRAM EDITING


   The following commands are used for creating and modifying  user motion
instruction programs.  

    Command     	       		Operation

EDIT <prog>,<nstep>	Permits user to create or modify program <prog> 
			starting at step <nstep>.  If no step number is
			specified editing proceeds from the step were the 
			last editing session was terminated.  If no program
			is specified, the last program edited is re-opened.

DEFPRO <prog>		Used primarily for reading user motion programs
			that have been dumped to paper tape via the PUNCHP
			instruction.  Successive program steps are read in
			until an empty line or illegal motion is encountered.

   Once having entered the EDIT program, the following edit functions may
be invoked.

    Command     	       		Operation

<any motion instruction>  Replaces the motion instruction stored at the 
			current step with the instruction typed in.  The 
			next step is then displayed for editing.

<cr>			Typing an empty line ( carriage return ) leaves the
			current step unaltered and displays the next 
			instruction for editing.

D <nstep>         	Deletes an arbitrary number of instructions starting
			with the current instruction step.  If nstep is not
			specified, only the current step is deleted.  

E <prog>,<nstep>	Switches EDITing from the current program to the
			new user motion program <prog> starting with
			step <nstep>.  As always, <nstep> can be omitted
			and editing will begin with the first motion
			instruction.

I			Moves instructions starting at the current step
			down one and inserts in its place any motion
			instruction that is typed in.  The process is 
			repeated until an empty line is typed.

L			Leaves the current step unaltered and displays the
			previous step for editing.

P <nstep>		Prints the next <nstep> number of program steps
			and sets the current line number equal to the
			last line printed.

S <nstep>		Leaves the current step unaltered and displays the
			instruction which is at step <nstep> in the user
			program.

T			Returns to monitor program.
MONITOR COMMANDS - INPUT/OUTPUT

   The following commands are used to get hard copies of programs and 
transforms.

    Command     	       		Operation

LISTT <t1>,....,<t8>	Types out the values of up to eight differenct
			transforms.  If no transforms are specified, the
			values of all existing transforms will be printed.

PUNCHT <t1>,...,<t8>	Practically the same as the LISTT instruction 
			except that no header is typed and the transform
			names and values are printed in "TF" format.  Also
			a series of nulls are printed before and after
			the transforms to provide some leader paper tape.

LISTP <prog>,<s1>,<s2>	Types out the user motion program <prog> from step
			<s1> to step <s2>.  If the step numbers are omitted
			the entire program will be printed.

PUNCHP <prog>,<s1>,<s2>	Same as LISTP except that leading and trailing
			blank paper tape is punched.

PROGS			Prints out the names of all defined user programs.


MONITOR COMMANDS - MISC.

    Command     	       		Operation

CLEAR			Re-initializes ARM program so that all transforms
			and user programs are deleted.  This is a totally
			destructive operation.  This function first asks 
			"Are you sure (Y,N)?" to verify that the operation
			is to be performed.

DONE			Monitor program stops, computer exits to ODT.


MOTION INSTRUCTIONS

   In the following motion instructions all distances are in inches, time
is in clock ticks (100 ticks per second), and strings can be up to one line
long.

    Command     	       		Operation

DRAW dX,dY,dZ		Moves the arm along a straight line a distance of dX in
			in the X direction, dY in the Y direction and dZ in
			the Z direction.  Any distances omitted are assumed
			to be zero.  The arm configuration and orientation
			are maintained during this motion.

GO   <trans>		Moves the arm to the position and orientation specified
			by transform <trans>.  There is no path computed for
			this motion,  the hardware position servo operates in
			slew mode.  Any changes in configuration requested by
			the user are executed during the motion.

MOVE <trans>		Moves the arm to the position and orientation specified
			by transform <trans>.  Intermediate set points between
			the initial and final arm position are computed by 
			interpolating the initial and final joint angles.
			Any changes in configuration requested by the user are
			performed during the motion.

DEPART <distance>	Moves the arm hand a distance of <dist> along the
			current axis of rotation of the last joint.  Negative
			distances move the hand forward, positive distances
			move the hand back.

APPRO <trans>,<dist>	Moves the hand to the position and orientation 
			specified by <trans> offset by a distance <dist> along
			the axis of rotation of the last joint.  Positive
			distances move the hand away from the specified
			transform position, negative distances move the
			hand beyond the transform position.

READY			Moves the arm to the READY position above the work
			space.  This forces the arm into a standard
			configuration.
	
REST			Moves the arm to the REST position.  This leaves the
			arm in a safe position in case power is turned off.
			If no special speed has been set via the SPEED command,
			the arm will move to rest at half the normal speed.

OPEN <dist>		Changes the hand opening to <dist> inches.

GRASP <dist>		Closes the hand and generates an error message
			if the final hand opening is less than dist.

DRIVE <jt>,<angle>,<time>  Operates the single joint specified by the 
			parameter <jt> (1-7).  The current joint angle
			is changed by an amount <angle>.  The change in
			joint angle must be specified in degrees.  The
			duration <time> must be specified in clock ticks.

PAUSE <message>		Terminates execution of motion program and types
			a message.  Execution can be continued from this
			point by typing P.

STOP			Same as PAUSE except that motion cannot be continued.

COMMNT <string>		Comment line, a no-operation at run-time.

TYPE <message>		Types the string <message> on the teletype.

RIGHTY or LEFTY		Requests a change in arm configuration to a left
			or right shouldered arm.

ABOVE or BELOW		Requests a change in arm configuration so that the
			approach angle of the hand is from below or above
			objects.

FLIP or NOFLIP		Changes the range of operation of joint 5 to 
			plus (NOFLIP) or minus (FLIP) angles.

SPEED <percentage>	Requests that the next arm motion be performed at
			a speed other than normal( = 100).  The percentage
			can range from 1 ( extremely slow ) to 32000 
			( hardware slewing mode ).

COARSE			The low tolerance feature is enabled in the
			hardware servo so that larger errors in
			the final position of the arm joints will be 
			permitted at the end of the next motion.

INTOFF			Turns off the hardware position error integration
			feature during the next motion.

INTON			Forces the hardware to integrate the position error
			throughout the next motion.

PULSE			Enables the hardware hand pulse mode during the
			next arm motion for approximately 100msec.  This
			mode is useful for freeing the hand after it
			has jammed open or closed.
		SUMMARY OF INSTRUCTION SET

Top Level Instructions:

	TRANS <transform>
	HERE <transform>
	TF <transform>,X,Y,Z,O,A,T
	WHERE

	EXEC <program name>,<pass count>,<starting step>
	P

	LISTT <trans #1>, .... , <trans #8>
	PUNCHT <trans #1>, .... , <trans #8>
	LISTP <program name>,<first step>,<last step>
	PUNCHP <program name>,<first step>,<last step>
	PROGS

	CLEAR
	DONE

	DEFPRO <program name>
	EDIT <program name>,<step number>

Edit Instructions

	<any motion instruction>
	c/r
	L
	S <number of steps>
	D <number of steps>
	I
	E <program name>,<step number>
	T

Motion Instructions

	DRAW	dX,dY,dZ
	GO <transform>
	MOVE <transform>
	DEPART <distance>
	APPRO <transform>,<distance>
	READY
	REST
	DRIVE <joint>,<angle>,<time>

	OPEN <distance>
	GRASP <distance>

	COMMNT <any string>
	TYPE <any string>
	PAUSE <any string>
	STOP

	RIGHTY
	LEFTY
	ABOVE
	BELOW
	FLIP
	NOFLIP

	SPEED <percentage>
	COARSE
	INTOFF
	INTON
	PULSE
		    LOADING INSTRUCTIONS

LOCATION 	CONTENTS	
  100		   102		CLOCK TRAP
  102		     2		RTI

   R6		  1000		STACK POINTER

57744		 16701		MOV	57776,R1
57746		    26
57750		 12702		MOV	#352,R2
57752		   352
57754		  5211		INC	(R1)
57756		  5711		TST	(R1)
57760		100376		BPL	.-2
57762		116162		MOVB	4(R1),57400(R2)
57764		     4
57766		 57400
57770		  5267		INC	57752
57772		177756
57774		   765		BR	57750
57776		167770		HSR STATUS WORD


THE ABSOLUTE LOADER CAN BE READ IN FROM THE HIGH SPEED READER BY
STARTING EXECUTION OF THE BOOTSTRAP LOADER AT LOCATION 57744.  TYPE:
		57744G
AFTER THE LOADER HAS BEEN READ IN, THE ARM PROGRAM CAN BE LOADED BY TYPING:
		57500G   OR  P
ONCE LOADED, THE ARM PROGRAM CAN ALWAYS BE RESTARTED BY TYPING:
		1000G

MISC NOTES:

Program Startup:
	The Arm program can always be started by typing 1000G.

Error Trap Vectors:

	The hardware trap vectors ( memory locations '4 thru '36 )
are all initialized as follows:

		trap vector: trap vector+2
		    +2	   : HALT

	Therefore if one of these errors occurs unexpectedly, the
computer will enter ODT and the address printed on the console will
actually be the address of the trap vector+4.
123456789012345678901234567890123456789012345678901234567890123456789
;DATA STRUCTURE FOR SYMBOL TABLE BLOCK

;THE FOLLOWING IS THE ORGANIZATION FOR A BLOCK CONTAINING THE SYMBOL
;FOR A TOP LEVEL COMMAND, MOTION INSTRUCTION, EDIT INSTRUCTION,
;PROGRAM, OR SUBROUTINE.
;
TYPBIT==2
NUMARG==3
SYMNME==4
FUNPTR==12
FUNARG==14
;		_________________________________________
;		|					|
;  HASH PTR  → 	|  PTR TO NEXT BLOCK IN BUCKET OR 0	|
;		|---------------------------------------|
;      		|  # OF ARGS*2    |   TYPE BITS    	|
;		|---------------------------------------|
;		|   					|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   SIX ASC CHARACTERS FOR THE NAME	|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   					|
;		|---------------------------------------|
;		|    PTR TO SUBR TO PERFORM FUNCTION    |
;		|---------------------------------------|
;		|     8 FOUR BIT CODES SPECIFYING	|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   	TYPES OF ARGUMENTS		|
;		|_______________________________________|
;
;THE TYPE BITS SPECIFY THE TYPE OF FUNCTION ASSOCIATED WITH THE 
;SYMBOL DATA BLOCK AND ARE DEFINED AS FOLLOWS:

COMMND==1	;TOP LEVEL MONITOR COMMAND
MOTION==2	;MOTION INSTRUCTION
EDITIN==4	;EDIT INSTRUCTION

;THE FOUR BIT CODES SPECIFYING THE ARGUMENTS ARE INTERPRETED AS
;FOLLOWS:  IF THE LSB IS ON THE ARGUMENT IS OPTIONAL  OTHERWISE
;AN ERROR WILL BE INDICATED IF NO ARGUMENT IS FOUND.  THE 3 MSB
;USED AS AN INDEX INTO THE FOLLOWING TABLE.

TRNARG==0
DISARG==2
ANGARG==4
PRGARG==6
FUNARG==10

ARGTYP:	GETTRN	;TRANSFORM
	GETDIS	;DISTANCE
	GETANG	;ANGLE
	GETPRG	;USER DEFINED PROGRAM
	GETFUN	;MOTION INSTRUCTION

;TRANSFORM SYMBOL DATA BLOCKS ARE VERY SIMILAR TO INSTRUCTION 
;EXCEPT THAT THERE TYPE BIT IS:

TRANS ==10	;TRANSFORM SYMBOL

;AND THE CONTENTS OF THE DATA BLOCK IS AS FOLLOWS:
;		_________________________________________
;		|					|
;  HASH PTR  → 	|  PTR TO NEXT BLOCK IN BUCKET OR 0	|
;		|---------------------------------------|
;      		|        0        |   TYPE BITS    	|
;		|---------------------------------------|
;		|   					|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   SIX ASC CHARACTERS FOR THE NAME	|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   					|
;		|---------------------------------------|
;		|      PTR TRANSFORM DATA BLOCK         |
;		|_______________________________________|
DATA STRUCTURE FOR COMMAND INSTRUCTIONS

;		_________________________________________
;		|					|
;  STEP PTR  → 	|  PTR TO NEXT STEP IN PROGRAM OR 0	|
;		|---------------------------------------|
;      		|  PTR TO SYMBOL BLOCK FOR RUN FUNC.	|
;		|---------------------------------------|
;		|   	   ARG    1			|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   	       :    			|
;		| - - - - - - - - - - - - - - - - - - - |
;		|   	   ARG    N			|
;		|_______________________________________|