.LM 10 .RM 66 .skip 2 .literal date: October 21, 1983 # to: Houston Instruments HIPLOT DMPL plotter users desiring CalComp compatability. # from: Dennis V. Jensen Ames Laboratory ISU/USDOE 310 Metallurgy Ames, Iowa 50011 515/294-4823 # subject: Release of revised HIPLOT software package. RE: DECUS 11-431 .END LITERAL .SKIP 1 .p 0,1 .ap .title ##########CCPLOT Modification to DECUS 11-431 1.0 The CalComp-style subroutine package. The CalComp-style subroutines were adapted from DECUS library distribution 11-431 which was originally developed for dumb HIPLOT units. The subroutines have been modified to take advantage of the intelligent features of the DMPL plot language. Support is also now included to output through a standard Fortran logical unit. Additional primitives have been added to gain access to other features now available on HIPLOT plotters. Any application program which currently works with DECUS 11-431 will work with the modified package and a DMPL HIPLOT. The original release did not include machine readable documentation. This release note covers only the revisions to the original release and does not include a complete user's guide on the package. It is presumed that this package will only be used by those users familiar with CalComp-compatable packages. For new users it is recommended that the HGRAPH plotting package be used. HGRAPH should also be on this tape. Hardcopy of the 11-431 document can be acquired from the DECUS Library. 1.1 The PLOT subroutine previously issued single step commands through PLTX for each incremental step of plotter movement. Now PLOT has been modified to issue multiple step commands directly through PLTOUT. PLOT uses ICONV to generate the integer strings needed. The savings in terms of output plot file size is quite large; for the case I tested, the file size was reduced by a factor of 60! (Intelligent plotters do make a difference.) 1.2 The PLTX subroutine is now used only to issue initiallization commands (switch to relative plot mode), pen up commands, and pen down commands. Effectively PLTX is no longer needed as the PLTREL, PENUP, and PENDWN primitive subroutines do these functions. For compatability, PLTX has been retained but converted to call PENUP and PENDWN. The PLTX(0) call will switch the plotter to relative plot mode but is not totally adaquate to initialize the software (see next section). 1.3 To initialize the logical unit which will receive the plot file, the INIPLT subroutine must be used; this is the same as used with HGRAPH. Only one INIPLT call is required for any plot even though both plot packages may be used. For any application which is currently programmed to use DECUS 11-431, a call to INIPLT will establish the unit to output to. The calling sequence is the same as used for HGRAPH: CALL INIPLT( , , ). The unit number establishes support for using standard operating system drivers. See PLTOUT for using logical unit zero to output through an inline driver. Currently the X-size and Y-size parameters are not communicated to the DECUS subroutines but only to the HGRAPH subroutines; this could be implemented in the future. The sizes are currently fixed at 11 by 8.5 inches for the DECUS package. 2.0 Overview of HIPLOT plotting packages. A major difference between the HGRAPH package and the CalComp-style package is the mode of plotter operation: HGRAPH operates with the plotter in absolute plot mode and the CalComp-style routines operate in relative plot mode. Two primitive subroutines have been added to switch plotter modes: CALL PLTREL to switch to relative mode and CALL PLTABS to switch to absolute mode. The primitives which do not generate pen motion can be used by either package without regard to the current mode of operation. These include PENUP, PENDOWN, NEWPEN, and LINTYP. Also, MARKER will generate a symbol at the current pen position with the pen returned to this position at the end of the symbol, therefore, it can be used with either package. INIPLT and ENDPLT are used by both packages to initialize and end plotting respectively. 3.0 New CCPLOT primitives. CALL NEWPEN(integer*2) This subroutine will select a pen for a multipen optioned HIPLOT or will return the currently used pen to its stall. CALL NEWPEN(0) will return the currently used pen and park the holder at home. If NEWPEN is called with an integer parameter of from 1 to 8, then the pen in the corresponding stall position will be fetched, first returning the current pen in use to its stall. The INIPLT call will always select pen 1. HIPLOT units without multipen capability will ignore the command. CALL PLTABS This subroutine will put the HIPLOT in absolute plotting mode. This is the mode used by HGRAPH. The INIPLT call will always select absolute plot mode as part of the initialization sequence. CALL PLTREL This subroutine will put the HIPLOT in relative plotting mode. This is equivalent to a CALL PLTX(0). This is the mode used by the CalComp- style primitives. A switch to relative plot mode is necessary prior to plotting with the CalComp-style package. CALL PLTOUT(byte-string,length) This subroutine is used internally by all plotting subroutines to buffer and output plotter commands. A string of characters of varying length is passed as the first parameter. This string is a byte array, logical*1 array or any other byte-contiguous data structure with the plot commands stored from left to right in the string. The second parameter is the integer*2 length of the string to output. The string is added to the internal buffer as long as it will fit entirely. If not, the current buffer will be output first. If the string passed to PLTOUT is larger than the internal buffer, the string will be written directly as a single record. The strings passed to PLTOUT are never broken across record boundaries as this may result in erronous interpretation of the commands by the plotter. This fact must be taken into account when preparing commands output directly through PLTOUT. If the length the string is indicated as zero, then the current buffer contents will be output. This must be done prior to any interspersed direct Fortran write statements which may be sending to the plotter logical unit. All plotter output is currently sent through PLTOUT by the high level packages, so this is handled internally. The ENDPLT call will do the PLTOUT(,0) call to flush the current contents. The provision for sending the plotter commands via an inline driver is included in the PLTOUT source code but disabled for the general user. The facility is designed to use logical unit zero to indicate output to the inline driver which must accect the characters one at a time via an OUTPEN(char) subroutine. (See the PLTOUT source code and remove the comment delimiters which currently disable this facility.) No inline drivers are included in the standard package. 4.0 Primitives which have changed. CALL PENDWN This subroutine will put the pen down if it currently is not down. The current state of the pen in retained in a common area to intercommunicate the up/down state of the pen. This requires that PENDWN and PENUP be used exclusively to control this function. For HIPLOT units which do not have revision G PROMS and which do not have serial numbers beginning with B, a delay is required to allow the pen to settle when moved up or down. This delay is accomplished by special versions of the PENUP and PENDWN modules which transmit blanks to generate the delay. This is of course dependent on the transmission speed of the interface to the plotter. Therefore, modification of the PENUP and PENDWN routines may be necessary to generate the appropriate delay. As a guideline for determining the delay, 24 spaces are required for a 4800 baud interface to a 200 increment per inch HIPLOT. CALL PENUP This subroutine will put the pen up if it currently is not up. (See PENDWN immediately above for more information.) 5.0 Indirect command files to aid CCPLOT compilation and library generation. Two indirect command files have been included to help with the compilation and library generation. HICOMP.COM will compile all the CalComp-style subroutine modules. The CCLIB.COM file will build an object library called CCPLOT.OBJ which will contain all modules. Each of these indirect command files should be edited prior to running to adjust the logical device definitions for your system. If all of the modules are not used for plotting, the CCLIB.COM file can be tailored to include only those which are used. Currently the object library is in the vicinity of 105 blocks to store all modules. 6.0 Merger with HGRAPH? The duplication of names in the two packages and the differences in plotting philosophy make it difficult to merge CCPLOT with HGRAPH. With the change in a few names of subroutines, namely PLOT, AXIS, and LINE, the two can coexist. A version had been used in the past which made it possible to do this, but current development of HGRAPH has diverged from compatibility. There is no real motivating factor to continue plotting with CalComp-style calls for new applications. But for old programs which currently run fine in this form, I hope you find this package useful. .BREAK