.RIGHT MARGIN 75 .LEFT MARGIN 5 .skip.center;^&PICTURE\& .skip 3 .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page i .skip 3 .no autojustify .no justify .SET PARAGRAPH 0,1,0 .STYLE HEADERS 7 .AUTOPARAGRAPH A PROGRAM TO MAKE BLOCK DIAGRAMS AND OTHER SIMILAR CHARTS .skip 2 .lt Abstract -------- .el Using REGIS, the graphics language of the Digital VT240 computer terminal, and the HP commands for the Hewlett Packard plotter (7221C), it is possible to develop block diagrams on the VAX computer. This memorandom describes a computer program to utilize this computer graphics package. .page .SKIP -15 .NO NUMBER .page .require "PICTURE.RNT" .NUMBER PAGE 1 .no number .PAGE .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 1 .skip 1 .hl 1 ^&INTRODUCTION\& This memorandum describes the computer program PICTURE which makes block diagrams and other charts on the VAX computer. Available for use on the charts are: Boxes, Triangles, Circles/Arcs, Points, Lines/Vectors, Arrowheads, and Text. The program PICTURE can only be run on the Digital VT240 computer terminal, however, since the program uses REGIS, the graphics language of that terminal. Three files are created when you run the program. One file stores all the REGIS commands, the second file stores all the plotter commands and the third file stores the number and position of each type of object in the diagram. These three files enable you to draw block diagrams both on the screen and the plotter. The program is listed in Apendix A. .hl 1 ^&INSTRUCTIONS\& Once you have a general idea of the type of diagram you would like to make, you type 'Run PICTURE'. (From here on out you should be using capital letters.) There are five questions that must be answered before the diagram can be drawn on the screen. 1. 'DO YOU WANT TO ADD TO AN OLD DIAGRAM?(YES OR NO)' This program has the capability to either start a new diagram from scratch, or to add to an existing diagram. 2. 'WHAT IS THE NAME OF THE FILE?(NAME MUST END WITH .DAT)(PUT ANSWER IN QUOTES)' This file stores all the REGIS commands needed to draw the diagram on the VT240 terminal screen. The name of this file can be anything but it must always end with '.DAT'. When the command 'TY ***.DAt' is given, the drawing will be displayed on the screen of the VT240 computer terminal. 3. 'WHAT IS THE NAME OF THE PLOTTING FILE?(NAME MUST END WITH .FOR) (PUT THE ANSWER IN QUOTES)' This file stores all the plotter commands and must always end with '.FOR'. To draw the diagram on the plotter you first give the command to FOR and then LINK this file. (Using LINK ***,HPLIB/LIB) You must then run it on the terminal which is hooked up to the HP 7221C plotter. Generally, for convenience only, it is a good idea to give the same name to both the plotting and the REGIS command files. .page .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 2 .skip 1 4. 'WHAT IS THE NAME OF THE OBJECT ARRAY FILE? (NAME MUST END WITH .DAT) (PUT THE ANSWER IN QUOTES)' This file stores the number and position of each type of object in the diagram. This file must end in '.DAT' as the plotting file must and therefore cannot have the same name. For ease of remembrence, it is suggested that you add an 'O' to the end of the plotting file name to differentiate between the two. 5. 'IS THE PAPER SIZE A OR B? IF IT IS A, WILL IT BE HELD VERTICALLY OR HORIZONTALLY? (ANSWER: VA, HA, OR B)' The program has the capability to use small (A-size) paper, or large (B-size) paper. When you use B-size paper you can draw in the equivalent of 4 screens by using the scroll command. If you are going to use A-size paper, you must indicate which way you are going to hold it (vertically- with an equivalent of 2 screens (left top and bottom) or horizontally- with 1 and 1/2 screens down and, 1 and 1/4 screens over). After the last question is answered, a list of instructions will appear. After you have read all of the instructions you are ready to start. .hl 2 ^&TO MOVE CURSOR AND DRAW/ERASE OBJECTS\& When you have finished reading the instructions, two intersecting lines will appear on the screen. These lines (or crosshair) are the REGIS cursor. To move the cursor use the arrow keys. (The intersection of the two lines is the position that will be stored.) When the cursor is in the correct position, you press the letter of the object which you wish to draw. .hl 3 ^&BOX\& .lt To draw a box: 1. Place the cursor at the top left hand corner of the box and then press 'B'. 2. Now move the cursor to the bottom right hand corner and press 'G' for a box with a solid outline, or 'Y' for a box with a dashed outline. To erase a box: 1. Place the cursor at the top left hand corner of the box and press 'X'. 2. Now move the cursor to the bottom right hand corner and press 'B'. .el .page .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 3 .skip 1 .hl 3 ^&TRIANGLE\& .lt To draw a triangle: 1. Place the cursor at one of the vertices of the triangle and press 'T'. 2. Now move the cursor to the second vertex and press 'G'. 3. Now move the cursor to the third vertex and press 'G' for a triangle with a solid outline, or 'Y' for a triangle with a dashed outline. To erase a triangle: 1. Place the cursor at one of the vertices of the triangle and press 'X'. 2. Now move the cursor to the second vertex and press 'T'. 3. Now move the cursor to the third vertex and press 'G'. .el .hl 3 ^&CIRCLE/ARC\& .lt To draw a circle/arc: 1. Place the cursor at the center of the circle/arc and press 'O'. 2. Move the cursor to the beginning of the circle/arc (the circle/arc will be drawn counter-clockwise from the position of the beginning point.) and press 'G','H','J', or 'K'. G -When the starting angle<=180 and the total angle<=180 or when drawing a circle H -When the starting angle<=180 and the total angle>180 J -When the starting angle>180 and the total angle>180 K -When the starting angle>180 and the total angle<=180 (The starting angle is the angle of the beginning of the circle/arc measured relative to the horizontal axis coming from the center of the arc. The total angle is the angle of the circle/arc measured relative to the starting position and the center.) .el .page .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 4 .skip 1 .lt 3. The cursor must now be moved to the ending position of the circle/arc and press 'G' for a solid line around the circle/arc, or 'Y' for a dashed line. Figure 1 shows examples of how to make circles and arcs. To erase a circle: 1. Position the cursor at the center of the circle/arc and press 'X'. 2. Now move the cursor to a point on the circle/arc and hit 'O'. .el .hl 3 ^&Point\& .lt To draw a point: 1. Place the cursor at the position of the point and press 'P'. To erase a point: 1. Place the cursor at the position of the point and press 'X'. 2. Now press 'P' (keeping the cursor where it is). .el .hl 3 ^&LINE\& .lt To draw a line: 1. Place the cursor at one end of the line and press 'A'. 2. Now move the cursor to the other end of the line and press 'G','Y', 'A','P','R','U','L',or 'D' G -To draw a solid line Y -To draw a dashed line A -To start another line P -To draw a point on the end of the line R,U,L,D -To draw an arrowhead at the end of the line To erase a line: 1. Place the cursor at one end of the line and press 'X'. 2. Now move the cursor to the other end of the line and press 'A'. .el .page .hl 1 ^&FIGURE 1\& .page .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 6 .skip 1 .hl 3 ^&ARROWHEAD\& .lt To draw an arrowhead: 1. Position the cursor where the arrowhead is to be placed and press: D -To draw an arrowhead facing down R -To draw an arrowhead facing to the right U -To draw an arrowhead facing up L -To draw an arrowhead facing to the left To erase an arrowhead: 1. Position the cursor where the arrowhead is and press 'X'. 2. Then press: D -To erase an arrowhead facing down R -To erase an arrowhead facing to the right U -To erase an arrowhead facing up L -To erase an arrowhead facing to the left .el .hl 3 ^&TEXT\& .lt To write text: 1. Position the cursor either 1,2, or 3 shifted up-arrows above the position of the small,medium or large print, respectively, and press 'W'. 2. Then press either 1,2, or 3 for the small, medium or large print. 3. The REGIS text cursor (a diamond with a cross in it) will now appear and you can begin typing in the text. (No more than 50 characters on a line.) 4. To get out of the text mode you must press a single quote mark and then press . (Since a single quote mark gets you out of the text mode, you cannot use quotes in the text part of the diagram.) .el .page .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 7 .skip 1 .lt To erase text: 1. Position the cursor above the text and press 'X'. small print - 1 shifted up-arrow above medium print - 2 shifted up-arrows and 2 single up-arrows above large print - 3 shifted up-arrows and 4 single up-arrows above (A shifted arrow moves the cursor 10 pixels in the direction of the arrow. Pressing the arrow key alone only moves the cursor 1 pixel.) 2. Then press 'W' (without moving the cursor). General text information: .el If, for some reason, you enter and then exit the text mode without writing anything, make sure you erase the text anyway so that it doesn't affect the program at a later time. When in the text mode, you can use the single space delete key to make corrections on the line you are on. (The text will not appear erased from the screen, but it will be gone the next time the screen is redrawn.) Once you hit return, you cannot fix any of the previous lines using the delete key. When the text is erased, everything that was entered during that single entry and single exit of the text writing portion of the program will be erased. It is therefor advisable to enter the text a little at a time. Since the text is erased from the screen by writing over it in the screens background color, any other objects which were drawn in that area may appear all or partially erased. However, those objects will still be there when the screen is redrawn. .hl 2 ^&SCROLL/REDRAW SCREEN\& The screen can be scrolled up, down, left and right. Each screen is equivalent to 1/4 of a B-size piece of paper. Each screen is 800 by 480 pixels, giving a total graphics area of 1600 by 960. If A-size paper is specified (which is going to be placed horizontally on the plotter) then, the total graphics area is reduced to 1000 by 720. If A-size paper is specified (which is going to be placed vertically on the plotter) then, the total graphics area is reduced to 800 by 960. Each time the scroll command is invoked, the screen is scrolled 1/2 a screen in the direction specified. (except when using A-size paper placed horizontally.) .page .right;Picture Manual .flags substitute .right;$$day $$month $$year .right;Page 8 .skip 1 To scroll the screen or redraw it, press 'S' and then specify the direction or redraw. .hl 2 ^&END\& When the drawing is complete or if at anytime you wish to end the program you press 'E'. When this is done, all the information about the diagram is stored in the three files which were created at the beginning of the program. Figures 2 and 3 show the end results. .hl 1 ^&GENERAL INFORMATION\& To read the instructions which were printed at the beginning of the program, press 'I'. Make sure you go slow and do not type anything unless you see the crosshair or the text curser. If you do go too fast and type things in before you should, you will cause an input error and may end up losing what you have done so far. To avoid losing additions to a diagram, it is advisable to periodically end the program and then start again. This will save new additions to the diagram in case the system shuts down, or, an error occurs (causing an abnormal exit from the program). If the text curser appears when it should not be there, or when text appears when it should not, press the 'set-up' control button. Then press 'recall' (using the arrow keys to get there) and then press 'enter'. Press 'set-up again, then press the 'lock' key and then return. You will either still be in the program, or you will see the dollar sign signifying that you are out of the program. If you are out of the program, the latest version of the object array data file will be empty and cause an error if you try to run the program again without first deleting this version. .page .hl 1 ^&FIGURE 2\& .page .hl 1 ^&FIGURE 3\& .page .hl 1 ^&APPENDIX A\& .page