Description of the oo7470A REXX program

Abstract:
oo7470A simulates an HP7470A Opt. 003 (HP-IL) pen plotter connected by Virtual IL. It is programmed with ooREXX and uses a plotter font from Olivier De Smet.

Note: afore useing this program read the license in chapter 8.


TOC:

  1. A brief description
  2. Prerequisites
  3. Connect to Virtual IL
  4. Plot data
  5. Output formats, print plots
  6. Controls of this program
  7. Manuals of the role model
  8. The fine print

A brief description

Three decades ago pen plotters in many variation had been a popular device to picture computed figures. The common principle is a pen moved over a sheet of paper drawing lines when lowered. The most innovative part of HP's pen plotter was the HP Graphic Language (HP-GL) used to command the plotter. Actually HP-GL is a human readable vector format.

Merely for nostalgic reasons I programmed a simulation of an HP7470A using ooREXX to get a nice display in Windows. It allows for three simultaneous output, on the screen, as HP-GL and as Portable Network Graphics (PNG) file.

Prerequisites

To run oo7470A you need (In brackets what I used for the developement):

To operate this virtual plotter, you need either

Connect to Virtual IL

oo7470A must connect to a Virtual IL (interface loop) to get plot commands from other devices within the same loop. As with HP-IL every post (device) in the loop has a preceding and a following one. Connection to adjacent posts is made permanent by specifying port numbers in the oo7470A.ini file. Use a text editor of your choice to set the 'inport' number of the preceding post. In the settings or the preceding post the same number must be set but there as out-port number.

Similar to the other side: the port number set in oo7470A.ini as 'export' must be used as in-port in the following post. The 'partner_dip' is the doted IP address of the computer running the following post. If it is the same one where you run ooHP7470A typically 127.0.0.1 is ok. See 'Internal host loopback address' in http://tools.ietf.org/html/rfc1122

Ensure your firewall allows traffic on all a. m. ports.

Start first the emulation or simulation of those posts which do not source IL frames at power on (sniffers and devices). As last post start the controller to ensure the loop is closed before the first frame travels the loop.

For other possible settings see the hints in oo7470A.ini.

Plot data

Visualisation of computet figures is a vast subject, for a quick glance just have a look in Excel's Diagram Assistent. When planning a graphic consider that an HP7470A may only draw straight lines and dots of pens' width. Circles and curves must be sliced in dashes small enough to give a smooth impression. In addition you have to translate your concept to HP-GL what is almost all the plotter understands besides power-off.

Even the translation to HP-GL may be done with a plotter ROM you should know about the IN instruction. It spells 'Initialize' and puts the plotter's graphics back to the power-on condition. In this oo7470A simulation IN also changes the sheet, that is, the previous plot is filed and a new one is started with a different file name. If you realy do need an overlay of two plots use your favourite image processing program. Or leave out the IN for subsequent plots.

For examples see the manuals mentioned in chapter 7.

Output formats, print plots

There are three output from oo7470:
(i) a 'canvas' in an application window (which is non-permanent),
(ii) HP-GL format, filetype HGL, and
(iii) PNG format, filetype is PNG.

You may specify in the INI file if you only want HGL or PNG or both. You may not deselect the display.

The HGL file will contain the HP-GL instructions as received over the loop. Selecting pen 1 or pen 2 is saved in the HGL file. In contrast the exchange of pens in a plotting programm pause is not saved in the HGL file, only display and PNG file show new colours and/or pen widths. Note, that the HP7470 is quite tolerant about delimiters between GL instructions and so is this simulation too.

The canvas for the PNG files is the physical plotting area at its theoretical resolution plus some pixels more to allow pen width up to 1.6 mm. For an A4 sheet this is 10969x7714 pixel what is probably more than you get from your electronic camera. As PNG has a quite good compression ratio for this kind of graphics - at least there was no better in Rexx/gd. It is up to you changing resolution and/or format with an image processing program.

Printing is not executed by oo7470A, it triggers only an external program to do so. In the INI file you may set up this 'user exit' suitable for your preference.

Controls of this program

Keys: F1  - will show this help file if you linked suffix HTM with a browser
      F2  - displays the About information
      F12 - shows the front panel
      m   - shows a menu to pick orders. /, F10, Alt, and Menu act as m.
      ESC - ends the program asking to save plot if there is any.
      F8  - clamp a new sheet (in future, not yet programmed)
Menu: Capitals indicate which key will launch the option
      File           - opens a sub-menu with following items:
         New         - clamp a new sheet after saving the current if it is not blank
         Save        - save current plot
         save As...  - lets you choose a name to save the current plot
         Print       - prints the current plot (needs some set up in INI file, see there)
         Exit        - asks to save the current plot (if any), then ends the program
      View           - opens a sub-menu with following items:
         Front Panel... - future extension to give access to the plotter's controls
         Scale...    - to choose the display scale ans with it the window size
      Options        - opens a sub-menu with following items:
         US          - chosse sheet size ANSI A (11" x 8.5")
         A4          - chosse sheet size DIN A4 (297 mm x 210 mm)
         Pens...     - set linewidth and colour of the pens
         TCP/IP...   - choose in and out ports and out address of Virtual HPIL
      Quit           - saves plot w/o asking (if any) and ends program
      Help           - opens a sub-menu with following items:
         About...    -  displays information aboout this program
         In datail... - displays explicit information.
System Menu: offers the options TCP/IP... and About... at the end
which should do the same as described above.

Note: File/New, File/Save, and File/Save As.. work foremost upon PNG file, secondarily on HGL. Also keep in mind that the HGL file is written to disk during execution like a log file. This results in some unexpected but consistent behaviour, in particular for File/Save As...

Manuals of the role model

The oo7470A simulator is programmed as close as possible the the two publications:
(i) HP7470A Graphics Plotter Interfacing and Programming Manual, HP, 1984, No 07470-90001, and
(ii) The HP-IL Interface Specification, HP, 1982, No 82166-90017
You will find both books on the MoHP CDs or in the Internet if you are lucky.

I recomend to read the first book if you like to program some graphics. The second one is for those who like to build devices interfacing the HP-IL, virtual and others. There are a few other manuals for the HP7470A, but not of too much help for 'programming' diagrams.

The fine print

(i) Do not use this program.
(ii) Any damage you cause with this program, intentional or by chance, is a violation of clause (i). Thus all consequences are completely at your own risk.
(iii) If you manage to improve this program you have to inform me as stipulated in following THE Q PUBLIC LICENSE (QPL).
(iv) In addtion applies the QPL below:

THE Q PUBLIC LICENSE version 1.0

Copyright (C) 1999 Trolltech AS, Norway.

Everyone is permitted to copy anddistribute this license document. The intent of this license is to establish freedom to share and change the software regulated by this license under the open source model.

This license applies to any software containing a notice placed by the copyright holder saying that it may be distributed under the terms of the Q Public License version 1.0. Such software is herein referred to as the Software. This license covers modification and distribution of the Software, use of third-party application programs based on the Software, and development of free software which uses the Software.

Granted Rights

  1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license.
  2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed.
  3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications:
    a. Modifications must not alter or remove any copyright notices in the Software.
    b. When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer.
  4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions:
    a. You must include this license document in the distribution.
    b. You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this.
    c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license.
  5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others.
  6. You may develop application programs, reusable components and other software items that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements:
    a. You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer.
    b. You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose.
    c. If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one.

Limitations of Liability

In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise.

No Warranty

The Software and this license document are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Choice of Law

This license is governed by the Laws of England.
* * * * * END OF FILE * * * * *