T H E U N I V E R S I T Y 0 F M I C H I G A N Memorandum 21 PORTATERM SOFTWARE V.M. Powers CONCOMP: Research in Conversational Use of Computers ORA Project 07449 F.H. Westervelt, Director supported by: DEPARTMENT OF DEFENSE ADVANCED RESEARCH PROJECTS AGENCY WASHINGTON, D.C. CONTRACT NO. DA-49-083 OSA-3050 ARPA ORDER NO. 716 administered through: OFFICE OF RESEARCH ADMINISTRATION ANN ARBOR May 1969

ABSTRACT The Portaterm system is a collection of hardware and programs which provides remote graphical computer input and output through portable terminals. The programs discussed here read, store, and write sketches through low-bandwidth channels. Potential interactive applications include online simulation control, character recognition, and picture generation. -111

TABLE OF CONTENTS ABSTRACT i ii 1, INTRODUCTION.,............. 1 2. SYSTEM COMPONENTS: HARDWARE... 2 3. ELECTROWRITER SUPPORT SYSTEM: SOFTWARE.... 5 3.1 General.................. 5 3.2 Primitive Display File Structure.. 5 3o3 Input Routines... *.. 9 3.4 Output Routines........ 10 3.5 Action and Interaction: Modes of Operation 11 4. VARIATIONS ON A SCHEME.......... 14 5. SUMMARY AND APPLICATIONS... 17 REFERENCES......... 20

LIST OF FIGURES FIGURE 1. Samples.................. 13 FIGURE 1.1 Input Samples............... 13 FIGURE 12 Output samples.............. 13 -vii

LIST OF TABLES TABLE 1. Symbolic List of the Contents of a Representative PDF............ 8 -ix

1. INTRODUCTION The Portaterm system is a computer graphics system with portable terminals. This report describes the Portaterm in action, the structure of the software, and the behavior of the system. The Portaterm project was started in July 1967 under the direction of Prof. E.L. Lawler of the Department of Electrical Engineering at the University of Michigan, to develop a portable computer graphics terminal. It was believed that there are potential areas of application for a computer terminal capable of handling line drawings as input or output, yet light and compact enough to be portable. A relatively inexpensive system was devised, one with modest graphics capability compared with some of the sophisticated gear now in popular use, yet one which is capable of transmitting and/or receiving sketches between a digital computer and a remote location over the small bandwidth of voicegrade, dial-up telephone lines, using standard commercial equipment for the transmission interface. -1

2. SYSTEM COMPONENTS: HARDWARE The Portaterm system as developed consists of drawing terminals connected to a small computer through conversion devices. Detailed descriptions of the equipment appear in another report.2 For the sake of discussion, however, a brief description of the major components is included here. The terminal devices used were Victor Electrowriters.* The transmitter develops a signal which has two frequency components varying proportionally to the rotations produced in two joints of a pantograph linkage which follows the motion of a ballpoint pen on a 3 1/2" x 5" paper surface. These two frequency components roughly correspond to the horizontal and vertical position of the pen, though not in a rectilinear coordinate system. A third frequency component is present when the pen tip is pressed down against the paper, and absent when it is up. The receiver uses this three-component frequencymodulated signal to position an ink pen on a paper writing surface, by means of a mechanical linkage similar to that of the transmitter. Each section, transmitter and receiver, is a small device which can be carried in one hand. These terminals can be connected to the computer site via data sets and regular voice-grade telephone lines. However, *Electrowriter ~ the Victor Comptometer Corporation, Chicago, Illinois. -2

-3because early tests indicated no deleterious effects of the telephone lines, all tests of the final, complete system were conducted in a "local" configuration: the terminals were located near the computer, and were directly connected to the conversion device. The frequency converter developed by the Radio Astronomy Observatory Laboratory is located at the computer site and converts, on input and output, between the frequency modulated signal of the Electrowriters and sets of slowly fluctuating (d.c.) voltage levels. These sets of signals are, for both input and output, a horizontal voltage, a vertical voltage, and a pen voltage. The pen signal actually carries only binary information (up or down), but was presented to the computer as d.c. voltage similar to the others. A Digital Equipment Corporation PDP-9 is used to read and write the devices. The PDP-9 is a small, 18-bit, general purpose computer. The machine used for these tests has two memory banks of 8K words each, and peripherals which include teletype, high-speed paper-tape equipment, clock and analogto-digital and digital-to-analog converters (ADC and DAC, respectively), as well as the 339 programmable vector display, light pen, and pushbuttons which are not used in the present realization of the Portaterm system. The computers' ADC reads as computer input the d.c. signals from the frequency converter corresponding to pen position and state

-4(up or down) at the transmitter, and the DAC writes computer output on the receiver by presenting absolute voltages to the converter. Depending on the programmed action of the computer, then, the system can be (and has been) operated in one of several different modes. Drawings can be read from the Electrowriter transmitter and a representation can be saved in the computer. Drawings can be written on the Electrowriter receiver from a representation internal to the computer. Drawings can be read, buffered, and written asynchronously, delayed by any arbitrary length of time. Drawings can be directly copied from receiver to transmitter through the computer with no internal storage. Finally, when the frequency converter is turned off, the transmitter drives the receiver directly, with no frequency conversion in between the two.

3, ELECTROWRITER SUPPORT SYSTEM: SOFTWARE 3 1 GENERAL The PDP-9 computer programs which accomplish the reading, storing, and writing of Electrowriter data run within the Systems Engineering Laboratory Executive System.1 This system, which occupies less than one of the two core banks, provides I/O routines for operation of the peripheral devices and routines for maintaining internal buffers, and schedules application programs, or users, as tasks. The Electrowriter Support Program (ESP) is a collection of such tasks which can be scheduled and run by the operator. The operator invokes the support program by typing a command to schedule and run an appropriate task. From then on until ESP is interrupted, the program proceeds, using the scheduling, conversion, and buffering routines available within the operating system. When there are a number of tasks active, as when ESP is both reading and writing, control is passed between tasks by means of the system's task queue, with task switching done at appropriate points such as clocked delays or I/O calls. 3.2 PRIMITIVE DISPLAY FILE Of prime importance to the operation of ESP is the structure of the data storage. Samples representing points -5

-6along the path of the pen are stored in a cyclic buffer, in a first-in, first-out manner, so that separate tasks can read into and write out of this buffer independently. All computer graphic input and output devices use a collection of data describing particles (points, lines) of the picture, and usually including some control information. The display file for the 338 display, for example, is a program in itself, containing both commands and data. On the other hand, the Portaterm system uses a much simpler data base. Whereas the 339 display is capable of presenting large, complicated drawings to a high degree of accuracy and precision, the Electrowriters have a small writing surface, and are much better suited to handling simple sketches. Instead of the richly structured display file structure of the 339, ESP uses a simple list to describe Electrowriter data, which is purely graphic; it cannot, without some other information, be related in any of the complex structures allowed by a 339 display file. Electrowriter drawings are stored within ESP in a form we shall call a primitive display file (pdf). A pdf is a string of computer words, each describing a point in a line of a drawing. The 18-bit word is divided into three fields. From the left, or high-order end of the word, these contain: a continuation code, or CC, of two bits; a horizontal, or X, coordinate; and a vertical, or Y, coordinate,

-7each eight bits long. The following four binary continuation codes are used: CC = 02 initial point CC = 10 continuation CC = 11 end of stroke CC = 00 end of file In an early version of ESP, the X and Y fields of pdf words were simply the absolute position coordinates of the pen. The present version, however, achieves finer resolution with the same storage requirement by combining absolute and incremental representations. The ADC allows samples from 8 to 12 bits in precision. The initial pdf word (CC = 01) describing a pen stroke contains the high-order 8 bits of the X and Y coordinates of the first point of the stroke. The following, continuation points, are described as increments. At present, each X and Y field in a continuation word (CC = 10) contains the third through tenth bits (counting from the high-order end, with the most significant bit first) of a coordinate representation. The X and Y fields of endof-stroke (CC = 11) and end-of-file (CC = 00) words are zero. As an example, Table 1 symbolically lists the contents of a pdf representing a pair of strokes, from (XO,Y0) to (XkYk) and from (X k+lYk+l) to (X,Y ). The increments listed in this table are of course stored in the format described above~

-8TABLE 1. Symbolic List of the Contents of a Representative PDF. CC X field Y field 01 X0 Y0 10 AX1 AY1 10 AXkl AYk10 AXk AYk 11 0 0 (end of first stroke) 01 Xk+l k+l 10 AX AY k+2 k+2 10 AXn AYn1 10 AX AYn 11 0 0 (end of second stroke) 00 0 0 (end of pdf) AX = X. X i i i- 1 AY. = Y. Y i = 1,2,...,n i 1 1-1

-9A pdf in this format is, then, a simple data structure which allows economical use of computer memory space, while retaining a relatively high degree of precision. 3.3 INPUT ROUTINES The computer input task is composed of two sections. The first, the Electrowriter sampling read routine, or ELSA, samples the pen status, tests the samples, and occasionally calls the second as a subroutine. The second, the pdf write routine PDFPUT, composes a pdf from a sequence of selected points. While the pen of the Electrowriter transmitter is up, ELSA merely samples and waits. When the pen goes down, ELSA saves the values, truncated to eight bits each, of the X and Y coordinates, and writes them through PDFPUT into a pdf. From then on until the pen is lifted, ELSA repetitively samples the coordinates and maintains a record of the last point saved. Whenever a point is sampled which differs from this last point by more than a fixed threshold amount, a new word containing coordinate increments is written on the pdf and the last point is updated. This distance is computed using the following metric, whose computation is fast and simple: d(X'1Y1)',(X2'Y2) = 1X1-X21 + Y1-Y2 As soon as a sample reveals that the pen is up, ELSA terminates the stroke by calling PDFPUT in such a way as

-10to force condition code 11. Next, an internal core location is checked. If the switch is on (nonzero —it would have been set by the operator or some other program ) the pdf is terminated by the writing of a word with CC = 00. Finally, ELSA resumes its initial procedure of waiting for the pen to go down again. The service subroutine PDFPUT merely collects the proper condition code, X field and Y field, and lists them, properly formatted, in the pdf. Incidentally, if the pdf storage area becomes filled, the stroke is not ended, but the routines return to a state where they write a word with "initial point" format in the next available space. 3.4 OUTPUT ROUTINES Most of the work of the computer output task is done by a single Electrowriter Write Routine, ELWR. A subroutine, PDFGET, is used to retrieve a word from the pdf and decompose it into CC, X and Y fields. Depending on the result of this operation of this subroutine, ELWR does one of several things. If the pdf is empty, ELWR either terminates or merely retries, depending on the condition of an internal switch which can be set by the operator or another program. If the end-of-file indication (CC = 00) is detected, ELWR terminates. Otherwise, ELWR "writes" by setting some values on the output lines through the DAC, and enforces a delay, by means of the

-11computer's clock, before returning to another attempt to read out from the pdf. The output from ELWR is different depending on whether the condition code indicates the beginning, continuation, or end of a stroke. At the beginning of a stroke (CC = 01), the X and Y fields are used to form an initial point. Time delays are forced after setting the initial coordinates, and again after setting the "pen down" signal, to ensure that the pen is stationary when the pen goes down and that the pen is down before the first segment of the stroke is drawn. At intermediate points in a stroke (CC = 10), ELWR adds the incremental X and Y coordinates to the absolute coordinate written last, writes the new set with the pen down, and delays long enough to ensure that pen motion has stopped before the next pdf word is fetched. 3.5 ACTION AND INTERACTION: MODES OF OPERATION The present collection of programs called ESP, Electrowriter Support Programs, uses the terminals in any of several ways. For certain applications, it may be appropriate to use only a few of these programs, a modification of these programs, or a completely different set. Nonetheless, ESP has served well to explore and illustrate some of the characteristics of the Portaterm system, and the principles discussed in this report should prove interesting to anyone who is about to use a similar system.

-12Figure 1 shows the Portaterm input and output for two different modes of operation. In one mode, a small program merely samples the input and writes the values on the output repetitively, with no intermediate storage or delay. The "A's" of Figure 1 were copied in this mode. In the other mode, a small program schedules the input task ELSA for execution, and then, upon a command which may come at any later time, schedules the output task ELWR. The "B's" and "C's" were written in this mode, as evidenced by jerkiness of the output samples, due to the point filtering by ELSA. The "C's" represent the performance of a variant of the system, in that the filter distance criterion for the distance threshold used was twice that used for the "B's" 1 1 (!8 of full scale instead of 256) In this latter mode, reading and writing tasks proceed asynchronously. ELSA, in less than half a millisecond, samples a point, saves it in the pdf, and returns control to the system. ELWR needs less than one-fifth millisecond to retrieve a pdf point and convert to a set of voltages. It then returns to the system, delaying the next point output by at least 1/8 second in addition to system overhead time due to task-switching. Even when both tasks are running in parallel, ELSA samples more than often enough to ensure full accuracy at handwriting speeds, and ELWR continues plotting along with little more than enough delay to allow for "settling time" of the pen.

I 11 AS Figure 1.1 Input Samples Figure 1.2 Output Samples Figure 1. Samples

4. VARIATIONS ON A SCHEME A number of aspects of the present realization of the system provide opportunities for compromise among system parameters, while other aspects represent problems which might be considered in any similar, future work. If the methods of the ESP programs are incorporated in a larger system, it is necessary to choose the increment size (as determined in ELSA) with care. A large step-size permits a small pdf storage area, but leads to a broken, coarse approximation to the input, as can be seen in the contrast of the "C's" with the "B's" in Figure 1. The length of the minimum delay enforced by ELWR between points also perhaps should change with step size. Only slightly evident in Figure 1 (most noticeable in the non-coincidence of the upstroke and downstroke of the lower-case "c" output) is the accumulated positional error due to an error in the program: stroke increments were computed by merely truncating the higher-precision, ADC values. Rounding off the least significant bit would have minimized the accumulated error during a stroke. Another technique which would minimize this drift still further would be the use of an occasional absolute coordinate pair. This could be accomplished by inserting an "initial point" pdf word (CC = 01) every 10,20, or 30 steps. As it is, even with the truncation error, it has been found that the accumulated -14

-15drift, with the small step-size shown in the "B's" of Figure 1, is usually not severe for stroke lengths of fewer than several hundred points. The importance of such drift, and the desirability of trying to minimize it as discussed above, of course vary with the application. One technique which has not been investigated is the use of interpolated output steps. That is, instead of converting the pdf data words one for one to output pen positions, the write routine might write a series of intermediate points to more closely simulate a smooth transition between points represented in the pdf. This technique might make the output appear smoother by reducing the roughness of the sawtoothed appearance of the "B" and "C" strokes of Figure 1, which is largely due to mechanical overshoot in pen motion and to spreading of the ink due to leaving the pen down during the settling-time delay. Here again, the appearance of the output strokes might be improved by lifting the pen at the end of each increment. Some other changes which could improve the performance of the system are improvements in the frequency converter. The converter has a slight tendency toward instability, so that unless the circuits are carefully adjusted the receiver's pen sometimes has a slight vibration, particularly in the vertical direction near one corner of the writing surface. The scale and offset adjustment of the frequency-to-dc conversion is rather sensitive, and recalibration of the present

-16hardware has sometimes been necessary from day to day or after a warmup period. The dc output voltage range of the converters is less than that of the ADC and DAC; a better match of voltage ranges would allow better precision with fewer bits of storage. Finally, the frequency-to-dc conversion process, which is to a considerable extent a lowpass filtering process, has a response which is necessarily somewhat "soft"; it has an effect somewhat similar to adding inertia to the system response. This effect may be a contributor to the roughness of the output traces mentioned above. The report by McCreery, et al.2 discusses probable causes of these problems, with a view to their mitigation in any possible future work.

5. SUMMARY AND APPLICATIONS We have described the Portaterm system as a portable computer graphics terminal system. The software developed enables the computer to read and write drawings in different modes of operation. Because of the narrow-bandwidth nature of the operation of the system —the slow writing on a small surface with limited precision, using narrowbandwidth telephone circuits as a transmission path —because of this, the system is well suited to transmission of sketches, rather than the intricate, exact drawings of which the more sophisticated terminals are capable. By way of example, several applications of the Portaterm system in different projects have been realized and some are merely conjectured. These applications have been supported by the Portaterm project effort, and are mentioned here merely as examples. Perhaps the simplest application uses the transmitter as a two-dimensional analog input signal generator. The Electrowriter transmitter has been used by others, through the frequency converter, as input to a program which simulates the flight of a vehicle by showing its motion on the 339 display. The pen was used as a "joystick" to control acceleration or velocity in two of the coordinates of motion. Other applications require work beyond that reported here, One near-future project elsewhere on campus will -17

-18attempt to use a receiver at a remote site to sketch a graph describing the computer analysis of an experiment. For this application, a transformation must be implemented which will translate between the rectilinear coordinates of the graph and the curvilinear coordinates of the Electrowriter signals. Such a transformation is feasible, and has been implemented by Mr. Shin-ichi Hanaki of the Nippon Electric Co., Ltd., of Japan. He reports, in a private communication, that he has used the Telemail device (the Electrowriter as produced under license in Japan) in a character recognition system. Use in such a system is certainly an appropriate potential application of the Portaterm system. An eminently appropriate application of the Portaterm system to interactive computer graphics is in the area of transmitting picture components. On input, a designer might want to sketch a model of a component of a system, to be used perhaps many times in a large diagram (which might be, at the time, under construction of the 339 display, for example). For example, a network designer may want to add a symbol such as a variable capacitor for a particular project. The facility of the use of the Electrowriter pen is much superior to the use of the light pen for drawing arbitrary shapes, and is certainly easier than writing the details of the instructions necessary to command the drawing from such media as alphanumeric keyboard or paper tape. A

-19Portaterm sketch could, by means of its description in a pdf, easily be made a part of a more comprehensive 339 display file. On output, too, Portaterm sketches could find great usefulness in an interactive environment. Programming for the digital plotting devices currently in use is usually tedious and often frustrating, partly because the hardcopy output drawing is not available for inspection except after a considerable delay. To develop a drawing and eliminate mistakes often takes several (expensive) trials. With the Portaterm output available, a user could potentially receive quick, preview sketches of his drawing, and repeatedly modify it until he is satisfied, then commit the data to the digital plotter system. Finally, there are those potential application areas where a user merely needs the data which could be sketched on the receiver. He may want for example, to see the general shape of a frequency response curve, the relative position of a few objects in some coordinates, or the approximate shape of a polygon. The Portaterm system could provide such information quickly and effectively. Of course, each of these applications demands some further work with respect to the areas of coordinate transformations, transformation among different forms of data storage, and system control. But it appears that the Portaterm system, or some variant of it, has the potential for fruitful application in many ways.

REFERENCES 1. Jackson, James H., An Executive System for a DEC 339 Computer Display Terminal, Technical Report 15, Concomp Project, University of Michigan, Ann Arbor, December 1969. 2. McCreery, D.R., Estry, H.W., Osterwisch, F.G., The Electrowriter as a Computer I/O Device, Memorandum 22, Concomp Project, University of Michigan, Ann Arbor, February 1969. -20

UNCLASSIFIED -21Securtit Classi'fication DOCUMENT CONTROL DATA- R & D (Security classification of title, body of abstract and indexing annotation must be entered when the overall report is clasalfled 1. CRIC, INA TING AC TI VITY (Corporate author) 2a. REPORT SECURITY CLASSIFICATION THE UNIVERSITY OF MICHIGAN Unclassified 2b. GROUP CONCOMP PROJECT 2b. GROUP 3 REPORT TITLE PORTATERM SOFTWARE 4. [T)FCPIPTIVE NOTES (Type of report and inclusive dates) Memorandum 21 5. Au THOR(S) (First name, middle initial, last name) V.M. Powers 6 RFPO T DA TE 7a. TOTAL NO. OF PAGES 17b. NO. OF REFS May 1969 20 2 8S. CONTRACT OR GRANT NO. 9a. ORIGINATOR'S REPORT NUMBER(S) DA-49-083 OSA-3050 h. P ROJ EC T NO. Memorandum 21 c. 9b. OTHER REPORT NO(S) (Any other numbers that may be eeallted this report) d. 1. Dl S r RI PUT ON STA T EMEN T QLlalified requesters may obtain copies of this report from DDC I1 SUPPLLMENTARY NOTES 12. SPONSORING MILITAR Y AC TI VITY Advanced Research Projects Agency 13. A PS'RACT The Portaterm system is a collection of hardware and programs which provides remote graphical computer input and output through portable terminals. The programs discussed here read, store, and write sketches through low-bandwidth channels. Potential interactive applications include online simulation control, character recognition, and picture generation. DD FOR O'1473 Unclassified Security Classificatlion

UNIVERSITY OF MICHIGAN Unclassified 39015 036955 6261 Security Classification 14 LINK A LINK * LINK C KEY WORD| ROLE W. ROLE I W I ROLE W T portable graphics terminal interactive graphics system computer terminal graphics terminal software Unclassified Security Classification