HP-GL/2 is a kernel of five groups that every HP-GL/2 device supports, and six
extensions that some devices add. Syntax is as in HP’s reference: square brackets
mark optional parameters, and coordinates are in current units (plotter units, or user
units after SC). How instructions are written and separated is on the
syntax page.
Kernel: configuration and status
| Syntax | Name | Meaning and values |
|---|---|---|
CO["text"] | Comment | A comment, ignored. |
DF | Default Values | Sets most programmable features to their defaults. |
IN[n] | Initialize | Sets all programmable features to their defaults (factory-set conditions). |
IP[p1x,p1y[,p2x,p2y]] | Input P1 and P2 | Places the scaling points, in plotter units. |
IR[p1x,p1y[,p2x,p2y]] | Input Relative P1 and P2 | Places them as percentages of the hard-clip limits (of the picture frame in PCL). |
IW[xll,yll,xur,yur] | Input Window | Sets the soft-clip window. |
PG[n]; | Advance Full Page | Ends the page or plot. |
RO[angle] | Rotate Coordinate System | 0, 90, 180 or 270 degrees. |
RP[n]; | Replot | Prints the last plot again n times. |
SC[xmin,xmax,ymin,ymax[,type[,left,bottom]]], or SCxmin,xfactor,ymin,yfactor,2 | Scale | Maps P1 and P2 to user units. Type 0 anisotropic (default), 1 isotropic (with left and bottom placement, 0–100%, default 50%), 2 point factor. |
Kernel: vector
| Syntax | Name | Meaning |
|---|---|---|
AAxcenter,ycenter,sweep_angle[,chord_angle] | Arc Absolute | An arc round an absolute centre. |
ARxincr,yincr,sweep_angle[,chord_angle] | Arc Relative | The same with a relative centre. |
ATxinter,yinter,xend,yend[,chord_angle] | Absolute Arc Three Point | An arc through an intermediate point to an end point. |
RTxincrinter,yincrinter,xincrend,yincrend[,chord_angle] | Relative Arc Three Point | The same, relative. |
CIradius[,chord_angle] | Circle | A circle round the current point; the pen goes down for it automatically. |
PA[x,y[,...]] | Plot Absolute | Absolute moves; sets absolute mode. |
PR[x,y[,...]] | Plot Relative | Relative moves; sets relative mode. |
PD[x,y[,...]] | Pen Down | Lowers the pen and draws to the points. |
PU[x,y[,...]] | Pen Up | Lifts the pen and moves. |
PE[flag][value/x,y]...; | Polyline Encoded | Compact coordinates: see PE. |
The chord angle (0–360°, usually 5° by default) is the angle of the straight segments
curves are drawn with; after CT1 it is a deviation distance instead.
Kernel: polygon
| Syntax | Name | Meaning and values |
|---|---|---|
PM[polygon_definition] | Polygon Mode | 0 enter polygon mode (clear the buffer, default), 1 close the current subpolygon, 2 close and exit. |
EP | Edge Polygon | Outlines the polygon in the buffer. |
FP[fill_method] | Fill Polygon | 0 even/odd (default), 1 non-zero winding. |
EAx,y, ERx,y | Edge Rectangle Absolute, Relative | Outlines a rectangle from the current point to a corner. |
RAx,y, RRx,y | Fill Rectangle Absolute, Relative | Fills a rectangle. |
EWradius,start_angle,sweep_angle[,chord_angle] | Edge Wedge | Outlines a pie slice. |
WGradius,start_angle,sweep_angle[,chord_angle] | Fill Wedge | Fills a pie slice. |
Kernel: line and fill attributes
| Syntax | Name | Meaning and values |
|---|---|---|
AC[x,y] | Anchor Corner | Where fill patterns start. |
FT[fill_type[,option1[,option2]]] | Fill Type | 1 solid bidirectional (default), 2 solid unidirectional, 3 hatched (spacing, angle), 4 cross-hatched (spacing, angle), 10 shading (level %), 11 user-defined from RF (index, pen flag), 21 predefined PCL or HP RTL pattern (type), 22 PCL or HP RTL user-defined pattern (ID). |
LA[kind,value[,kind,value[,kind,value]]] | Line Attributes | Kind 1 line ends: 1 butt (default), 2 square, 3 triangular, 4 round. Kind 2 joins: 1 mitred (default), 2 mitred/bevelled, 3 triangular, 4 round, 5 bevelled, 6 none. Kind 3 mitre limit, 1–32767 (default 5). |
LTline_type[,pattern_length[,mode]] | Line Type | Types −8 to 8 (positive fixed, negative adaptive); mode 0 relative (default, % of the P1–P2 diagonal) or 1 absolute (millimetres). |
PW[width[,pen]] | Pen Width | Line width, in the unit set by WU. |
WU[type] | Pen Width Unit Selection | 0 metric, millimetres (default); 1 relative, % of the P1–P2 diagonal. |
RF[index[,width,height,pen_number[,pen_number...]]] | Raster Fill Definition | Defines a user fill pattern, pixel by pixel. |
SM[character[character2]] | Symbol Mode | Draws the character at every plotted point. |
SP[pen_number] | Select Pen | Selects a pen; 0 (the default) is no pen, and nothing is drawn until a pen is selected. |
UL[index[,gap1,...gapn]] | User-Defined Line Type | Defines a dash pattern for a line type. |
Kernel: character
| Syntax | Name | Meaning and values |
|---|---|---|
LBtext...text + terminator | Label | Draws text, ended by the label terminator. |
DT[label_terminator[,mode]]; | Define Label Terminator | The character straight after DT becomes the terminator (default ETX, code 3; not NUL, LF or ESC). DT; restores ETX, non-printing. |
LO[position] | Label Origin | 1–9, 11–19 or 21: 1–3 and 11–13 left-justified, 4–6 and 14–16 centred, 7–9 and 17–19 right-justified; 11–19 offset the label from the pen position; 21 places it where PCL would. |
CP[spaces,lines] | Character Plot | Moves by character cells. |
DI[run,rise], DR[run,rise] | Absolute, Relative Direction | Label direction; relative to P1–P2 for DR. |
DV[path[,line]] | Define Variable Text Path | Path 0 right (default), 1 down, 2 left, 3 up; line 0 normal line feed (−90° to the path, default) or 1 (line feeds the other way). |
ES[width[,height]] | Extra Space | Extra space between characters and lines. |
SI[width,height], SR[width,height] | Absolute, Relative Character Size | In centimetres, or as % of P1–P2. |
SL[tangent_of_angle] | Character Slant | Slant. |
SD[kind,value...], AD[kind,value...] | Standard, Alternate Font Definition | Kinds 1–7: 1 character set (default 277, Roman-8), 2 spacing (0 fixed, 1 proportional), 3 pitch, 4 height, 5 posture, 6 stroke weight, 7 typeface. |
SS, SA | Select Standard, Alternate Font | Switch between the two fonts. |
CF[fill_mode[,edge_pen]] | Character Fill Mode | 0 solid fill (default), 1 edge only, 2 fill with the current fill type, 3 fill and edge. |
TD[mode] | Transparent Data | 0 normal: control codes act (default); 1 transparent: they print. |
Technical Graphics extension
| Syntax | Name | Meaning and values |
|---|---|---|
BP[kind,value...] | Begin Plot | Starts a plot (as PG plus IN). Kinds: 1 picture name (quoted string), 2 number of copies, 3 file disposition (0 keep for replot, 1 discard), 4 render last plot if unfinished (0 no, 1 yes), 5 autorotation (0 enable). |
CT[mode] | Chord Tolerance Mode | 0 chord angle in degrees (default), 1 deviation distance. |
DLcharacter_number[,up],X,Y... | Download Character | Defines a character from strokes. |
EC[n] | Enable Cutter | Turns the automatic cutter on (no parameter) or off. |
FR | Frame Advance | Advances the media to the next frame. |
MC[mode[,opcode]] | Merge Control | 0 off (opcode 252), 1 on (opcode 168 default): a raster operation 0–255 when graphics overlap. Also in Advanced Drawing. |
MG[message] | Message | Text on the front panel. |
MT[type] | Media Type | 0 paper, 1 transparency film, 2 vellum, 3 polyester film, 4 translucent paper, 5 special paper, 6 glossy paper. Picture header only. |
NR[timeout] | Not Ready | Takes the device off line. |
OE;, OH;, OI;, OP;, OS; | Output Error, Hard-Clip Limits, Identification, P1 and P2, Status | Report to the computer; must end with a semicolon. |
PS[length[,width]] | Plot Size | Sets the hard-clip limits. Picture header only. |
QL[quality_level] | Quality Level | 0–100. Picture header only. |
ST[switches] | Sort | −1, 0, or a sum of 1, 2 and 4: which kinds of sorting the device may do. |
VS[pen_velocity[,pen_number]] | Velocity Select | Pen speed. |
Palette extension
| Syntax | Name | Meaning and values |
|---|---|---|
NP[n] | Number of Pens | The palette size. |
PC[pen,primary1,primary2,primary3] | Pen Color Assignment | Sets a pen’s colour. |
CR[black_p1,white_p1,black_p2,white_p2,black_p3,white_p3] | Set Color Range for Relative Color Data | Each −32768 to 32767; defaults 0 (black) and 255 (white). |
SV[screen_type[,option1[,option2]]] | Screened Vectors | 0 no screening (default), 1 shading (0–100%), 2 HP-GL/2 user-defined raster fill (RF), 21 PCL or HP RTL cross-hatch 1–6, 22 PCL or HP RTL user-defined pattern. |
TR[n] | Transparency Mode | 0 off: white areas are opaque; 1 on (default): white areas are transparent. |
Dual-Context extension
| Syntax | Name | Meaning |
|---|---|---|
Esc%#A | Enter PCL (or HP RTL) Mode | 0 the PCL cursor goes back to its previous position, 1 to the HP-GL/2 pen position. |
Esc%#B | Enter HP-GL/2 Mode | From PCL: 0 the pen starts at its previous HP-GL/2 position, 1 at the PCL cursor. |
Esc E | Reset | Restores device defaults. |
FI font_ID, FN font_ID | Primary, Secondary Font Selection by ID | Use a PCL font by its ID. |
SB[n] | Scalable or Bitmap Fonts | 0 scalable fonts only (default), 1 bitmap fonts allowed. Also in Advanced Text. |
Digitising, Advanced Drawing and Advanced Text extensions
| Syntax | Name | Meaning and values |
|---|---|---|
DC, DP, OD; | Digitize Clear, Digitize Point, Output Digitized Point and Pen Status | Digitising: leave and enter digitise mode, and report the point. |
BZx1,y1,x2,y2,x3,y3..., BR... | Bezier Absolute, Relative | Cubic Bézier curves: two control points and an end point each. Advanced Drawing. |
PP[mode] | Pixel Placement | 0 grid intersection (default), 1 grid centred. Advanced Drawing. |
LM mode[,row_number] | Label Mode | 0 8-bit, one byte per character (default); 1 16-bit, two bytes per character. Advanced Text. |
Errors: numbers, “lost” mode and each instruction’s conditions
OE returns the error number of the first error since the last OE, BP or IN and then clears it; a posted error stays until cleared. Several errors in one instruction are set left to right (LA 1,9,2; is error 3, from the 9, not error 2).
| Number | Meaning |
|---|---|
| 0 | No error |
| 1 | Unrecognised instruction (or not recognised in the current state, such as PS after marks were made) |
| 2 | Wrong number of parameters |
| 3 | Out-of-range or invalid parameter |
| 4, 5 | Not used |
| 6 | Position overflow (see “lost” mode) |
| 7 | Buffer overflow, or out of memory |
An instruction is ignored for an unrecognised instruction, for missing required parameters and for a parameter that exceeds its limits. Extra parameters are ignored and the instruction runs, with error 2. If a parameter of AD, LA, PA, PD, PR, PU or SD exceeds the limits of its data format, that parameter and all after it are ignored; if a kind or value of AD, BP, LA or SD is within the data format but outside the range the instruction defines, that pair is ignored and the valid pairs before and after run. Integer parameters are rounded before they are range-checked. The polygon buffer holds at least 512 vertices; when it is full and more data comes, only what fits is edged and filled and error 7 is posted.
“Lost” mode (error 6). A parameter below the format’s range can still unscale to a position beyond the device’s internal number range (the guide mentions 7200 or 9600 units per inch internally and gives no limit). The device then raises the pen and ignores AA AR AT CI CP EA ER EW LB PE PM PR RA RR RT WG until an absolute move comes back inside the range. These stay allowed: AC AD CF CO DF DI DR DT DV ES FT IN IP IR IW LA LO LT PA PD PG PU PW RF RO RP SA SB SC SD SI SL SM SP SR SS TD UL WU and the PM1 and PM2 forms of PM. IN, PG, RP and PA with in-range parameters clear it, and so do PD and PU in absolute mode (a PD then draws a line from the last valid position to its first point; a PA does not lower the pen). In polygon mode, PM2 clears lost mode, closes the polygon with the current pen state and restores the pen position and state; PM1 does not clear it but does close the sub-polygon if its start is valid; points stored after lost mode ends are pen-up points until a PD. When an arc or wedge goes lost, the segments before the offending one are drawn; a rectangle (EA ER RA RR) that would go lost is ignored with error 3. The explorer takes the guide’s integer parameter range (plus or minus 223 plotter units) as the limit, since no printer’s own is given, and applies all of the above.
The “Possible Error Conditions” table of each instruction that has one (37 of them), typed from the guide:
| Instruction | Condition | Error | The device |
|---|---|---|---|
AC | Position overflow | 3 | ignores the instruction |
BR, BZ | Invalid number of control points | 2 | discards the Bezier segment |
CR | One to five parameters | 2 | ignores the instruction |
| Seven or more parameters | 2 | ignores the extra parameters | |
| The black reference value of a primary equals its white reference value | 3 | ignores the instruction | |
CT | The mode is not 0 or 1 | 3 | ignores the instruction |
DC, DP, OD | One or more parameters are specified | 2 | ignores the parameters |
DI, DR | Both parameters 0, or a number out of range | 3 | ignores the instruction |
DL | Y coordinate missing | 2 | ignores the instruction |
| Up-flag follows an X coordinate | 2 | ignores the instruction | |
| Parameter out of range | 3 | ignores the instruction | |
| X,Y data out of range | 3 | ignores the instruction | |
| Buffer overflow | 7 | ignores the instruction | |
EA, ER, RA, RR | Parameters would make the device enter “lost” mode | 3 | ignores the instruction |
EW | Polygon buffer overflow | 7 | edges the contents of the buffer |
IP | One or three parameters | 2 | ignores the instruction |
IR | One or three parameters | 2 | ignores the instruction |
| More than four parameters | 2 | uses the first four | |
LA | A kind or value inside the data format but outside the instruction’s range | 0 (as printed; the OE text says error 3) | ignores that pair, runs the others |
LM | Row number below 0 or above 255 | 3 | sets the row to 0 and runs the instruction |
LT | Pattern length 0 | 3 | ignores the instruction |
| Mode is not 0 or 1 | 3 | ignores the instruction | |
MT, QL | Used outside the picture header state | 1 | ignores the instruction |
NP | n below 2 | 3 | ignores the instruction |
PA, PD | Odd number of parameters | 2 | ignores the unmatched parameter |
PC | 2 or 3 parameters | 2 | ignores the instruction |
| More than 4 parameters | 2 | ignores the extra parameters | |
| Out-of-range parameter | 3 | ignores the instruction | |
PM | Invalid instruction used in polygon mode | 1 | ignores that instruction |
| Parameter out of range | 3 | ignores the instruction | |
| Buffer overflow | 7 | ignores the overflowing points | |
PP | A mode other than 0 or 1 | 3 | ignores the instruction |
PR, PU | An odd number of coordinates | 2 | ignores the last unmatched coordinate |
PS | Length or width 0 or less | 3 | ignores the instruction |
| Used outside the picture header state | 1 | ignores the instruction | |
RF | Index out of range | 3 | ignores the instruction |
SC | More than 7 parameters | 2 | executes the first 7 |
| Types 0 or 1: more than 6 or fewer than 4 parameters | 2 | ignores the instruction | |
| Type 2: other than 5 parameters | 2 | ignores the instruction | |
| XMIN = XMAX, YMIN = YMAX, or a number out of range | 3 | ignores the instruction | |
| XFACTOR = 0 or YFACTOR = 0 | 3 | ignores the instruction | |
UL | Sum of the gaps is zero | 3 | ignores the instruction |
| A gap is negative | 3 | ignores the instruction | |
| Index out of range | 3 | ignores the instruction | |
VS | More than 2 parameters | 2 | ignores the extra parameter |
| Pen number 0 | 3 | ignores the instruction | |
| Pen number above the plotter’s maximum | 3 | ignores the instruction | |
WU | Type is not 0 or 1 | 3 | ignores the instruction |
The explorer carries out the conditions it can decide from the file (the counts of every instruction, the ranges the interpreter checks, DL data, lost mode, and the first-error rule of OE), shows the instruction’s whole table in its explanation, and does not model a printer’s polygon or DL buffer sizes, which differ by device (the guide says the polygon buffer holds at least 512 vertices, and that a device can download 94 characters of at least 20 points each), so it never raises error 7.
Downloaded characters (DL)
DL defines characters of the downloadable set, character set 531 (symbol set ID 16S): choose it with SD or AD (kind 1, symbol set 531) and SS or SA, or the shift-out and shift-in codes in a label. The character is designed on a 32-by-32-unit grid in a 48-by-64-unit cell, the origin at the lower left, and may extend to ±127 units on each axis. The grid is the one the fixed-vector character sets use, and about the size of an upper-case A; the point size of the set corresponds to 48 grid units, which is also how far the character origin advances after a character (unless ES adds space); a line is 64 units. The first pair of DL n,X,Y,… is always a pen-up move (the character’s start); later pairs are pen-down moves unless a −128 up-flag comes before a pair. A character number is 33 to 126 (the table allows 0 to 255); DL n; clears one character and DL; all of them, and an undefined character in a label gives a space. Characters are fixed-spaced and upright; size, slant, direction and label origin apply. In the guide’s example DL 65,10,0,10,30,28,30,28,24; draws a gamma-like shape: up the left side to (10,30), across to (28,30) and down to (28,24). The explorer draws these characters as lines at that scale, with the cell and the advance the guide gives.
Older HP-GL
The original HP-GL of HP’s pen plotters, before HP-GL/2, varied from model to model. This section follows two plotter manuals, the HP 7475A Interfacing and Programming Manual (chapter 1, “Plotter Instruction Set”, and the chapter of each instruction) and the HP 7580B, 7585B and 7586B Drafting Plotters Interfacing and Programming Manual (the table of contents and the chapter of each instruction), both read as archive.org text. The 7475A instruction set is AA AR CA CI CP CS DC DF DI DP DR DT EA ER EW FT IM IN IP IW LB LT OA OC OD OE OF OH OI OO OP OS OW PA PD PR PS PT PU RA RO RR SA SC SI SL SM SP SR SS TL UC VS WG XT YT; the 7580B family adds AF AH AP AS BL CC CM DS FS GP IV OL OT PB SG UF and has the 7475A’s output instructions. The instructions that these plotters share with HP-GL/2 mean the same, apart from the cases below; the rest are these.
| Instruction | Syntax | Meaning (7475A manual) |
|---|---|---|
CA, CS | CA n; CS n; | Designate the alternate or standard character set, one of 0 to 4, 6 to 9 and 30 to 39 (19 sets). No parameter means set 0, and IN or DF make set 0 the standard set. An invalid number is the plotter’s error 5 (unknown character set) and the instruction is ignored. HP-GL/2 uses AD and SD. The viewer applies them to labels from the DraftPro chart (HP DraftPro Programmer’s Reference, Appendix B): sets 6 (JIS ASCII), 7 (Roman extensions, the Roman-8 codes 161 to 254), 9 and 30 to 39 (the ISO national variants) and the readable codes of 2, 3, 4 and 99; other cells of the chart are unreadable in the scan and draw as ASCII. |
IM | IM e[,s[,p]]; | The E-mask (a sum of bits, one per error number) says which errors set the error bit of the status byte; the S-mask and P-mask choose HP-IB service-request and parallel-poll conditions and mean nothing on an RS-232-C plotter. |
OA, OC | OA; OC; | Output the actual or the commanded position and the pen status. |
OF | OF; | Outputs the number of plotter units per millimetre in each axis. |
OO | OO; | Outputs eight comma-separated integers, 1 for each option the plotter has. |
OW | OW; | Outputs, in plotter units, the lower-left and upper-right corners of the window in which plotting can occur. |
PS | PS n; | Paper size, not the plot size of HP-GL/2: 0 to 3 select B or A3 paper, 4 to 127 select A or A4, and it cannot change between English and metric sizes. A change of size performs DF. Out of range is error 3. |
PT | PT thickness; | The physical pen width in millimetres, 0.1 to 5.0 (default 0.3, restored by IN and DF), which sets the line spacing of solid fills; it applies to the selected pen only. |
XT, YT | XT; YT; | Draw a vertical (XT) or horizontal (YT) tick at the current position, pen up or down; numeric parameters set error 2 and are ignored. |
TL | TL tp[,tn]; | Tick length as a percentage of P2y − P1y (XT) or P2x − P1x (YT): tp up or right, tn down or left. Default and no-parameter value 0.5 each; one parameter makes tn 0; a negative value draws the other way; IN and DF restore the default. |
UC | UC [pen,]x,y,...; | A character drawn from moves on a grid of 6 by 16 units per character space (an ordinary label letter is 4 by 8 units), starting pen up at the current position. A pen-control value above +99 lowers the pen and one below −99 raises it; increments are −98.9999 to +98.9999; unmatched increments are discarded (error 2); afterwards the pen moves one character space right and takes the state of the last PU or PD. |
FS | FS [force[,pen]]; | 7580B family. Pen force 1 to 8, which is 10 to 66 grams in steps of 8 (1 = 10 g, 2 = 18 g, 3 = 26 g, 4 = 34 g, 5 = 42 g, 6 = 50 g, 7 = 58 g, 8 = 66 g); a larger value is taken as 8; pen number 1 to 8 (all pens if omitted); no parameters restore the carousel’s default (18 g fibre tip, 50 g roller ball, 10 g drafting). Zero or negative is ignored. Inkscape’s export writes FS24, which such a plotter reads as 8. |
AS | AS [accel[,pen]]; | Pen acceleration in g, 1 to 4 (default 4, larger taken as 4), for all pens or the pen given. |
AP | AP [n]; | Switches on or off three automatic pen operations by the three low bits of n (lift an idle pen, put an idle pen away, pick up a selected pen only when it is needed); AP; and AP7; switch all on. The decimal values are 1 (lift an idle pen), 2 (put an idle pen away) and 4 (pick up a selected pen only when it is needed), to be added; the idle time is 65 seconds with a fibre-tip or roller-ball carousel and 10 seconds with a drafting-pen carousel or none (7580B manual), 15 seconds on the HP DraftPro. The DraftPro Programmer’s Reference adds 8 (merge all pen-up moves) and 16 (sort and plot vectors by pen number), so AP31; switches on all five; its default is 7, or 31 with the rear-panel pen sort switch on. None of these changes the picture drawn. |
GP, SG | GP [group[,pen[,count[,length]]]]; SG group; | Define a group of pens of one colour (group 1 to 8, first pen 1 to 8, number of pens, switching length in metres 1 to 50000, default 100) and select it, so the plotter changes pen after the length; GP; makes each group its own pen; without groups SG is SP. |
UF | UF [gap1,gap2...]; | User-defined fill: gaps between parallel lines, scaled so that their sum is the spacing of FT, used by FT types 5 and 6. |
BL, PB, OL | BL text<term> PB; OL; | BL stores up to 150 characters (terminator included) in the label buffer without drawing; PB draws the buffer with the size, direction, origin and slant in force at that time, any number of times; OL outputs its length, characters and line feeds. DF, IN or a BL or LB with only the terminator clears it. |
CC | CC [angle]; | The largest angle one chord of an arc-font character may span; a larger angle draws rougher characters faster. |
CM, DS, IV | CM mode[,fallback]; DS slot,set; IV slot[,left]; | Character selection modes: CM chooses HP 7-bit (0, default), HP 8-bit (1), ISO 2022.2 7-bit (2) or 8-bit (3) with a fallback mode 0 or 1; DS designates a character set (−1, 0 to 59, 99) into a slot (0 or 1 in the HP modes, 0 to 3 in the ISO modes; one parameter is error 2; DS; restores defaults); IV invokes a slot into the left half of the in-use code table (second parameter 0 or none) or the right half (any other value); in the ISO 7-bit mode every invocation goes left, and in the HP modes the second parameter is ignored; IV; puts G0 into GL and, in ISO 8-bit mode, G1 into GR. A CM that changes the mode sets the defaults (G0 and G1 hold set 0, G2 and G3 set 7). Errors of DS: one or more than two parameters 2, slot out of range 3, set out of range 5, the instruction ignored (7580B manual, page 7-59 read from the scan). The labels page says what each mode does to the bytes of a label. |
OT | OT; | Outputs the carousel type (−1 to 3) and the map of occupied stalls. |
GM | GM [polygon[,dl-char[,replot[,vector[,pen-sort]]]]]; | DraftPro only: shares the plotter’s 7448 bytes of memory between the polygon buffer (0 to 7434, default 1024) and the pen sort buffer (12 to 7446, default 5400); the middle three parameters are ignored; no effect on the picture (HP DraftPro Programmer’s Reference). |
AF, AH | AF; AH; | Advance roll paper a full or half page (for 11, 24 and 36 inch paper a half page is 8.5, 18 and 24 inches) and put the origin at the centre of the new page. |
The viewer explains each of these and draws XT, YT, TL, UC, BL and PB; PT only sets the spacing of the lines a plotter uses to fill solid areas, which the viewer fills solid, so it does not change the picture; the
character sets of CA, CS, CM, DS and IV choose the glyph of each label byte (see the labels page). Not found: the programming manuals of the 7550A and the DraftMaster (searched on archive.org, bitsavers and hpmuseum.org), so any instruction only they define is not here; the 7580A/7585A operator’s manual, the DraftPro Programmer’s Reference and the 7470A manual were read.
Inkscape’s export writes VS and FS after IN;PU;SP1;, both covered above.
Sources
- HP, The HP-GL/2 and HP RTL Reference Guide (third edition, 1997) – the kernel and extension summaries and each instruction’s reference page
- HP, HP 7475A Interfacing and Programming Manual (full text on archive.org) – the original HP-GL instructions above
- HP, 7580B, 7585B and 7586B Drafting Plotters Interfacing and Programming Manual (full text on archive.org) – FS, AS, AP, GP, SG, UF, BL, PB, OL, CC, CM, DS, IV, OT, AF, AH
- HP, HP 7470A Graphics Plotter Operator’s Manual (full text on archive.org) – plotter unit 0.025 mm, default P1 at 250,279 and P2 at 10250,7479, plotting limits 10300 by 7650 (US) or 10900 by 7650 (A4); its HP-GL part names only the movement, scaling and character instructions that the 7475A manual defines in full (the 7470A’s own programming manual was not found)
- HP, HP 7580A/7585A Drafting Plotter Operator’s Manual (full text on archive.org) – operator’s manual with an emulation switch for 7580/7585 mode; it names IN and VS in passing and gives no instruction syntax
- HP, HP DraftPro Programmer’s Reference, part 07570-90001 (September 1986, archive.org) – AP bit values 8 and 16, instruction-by-instruction syntax of the DraftPro, character set chapter and the character charts in its Appendix B