GMU:Algorithmic Art/HP 7475A: Difference between revisions

From Medien Wiki
(Created page with "'''Working with the HP 7475A''' The plotter is placed in room 204, in the shelf behind the projection screen. Take it out, place it on a desk and connect the serial adapter to...")
 
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Working with the HP 7475A'''
=='''Working with the HP 7475A'''==
The plotter is placed in room 204, in the shelf behind the projection screen. Take it out, place it on a desk and connect the serial adapter to your computer. Please do not forget to return it to the shelf when you are done!
You have to bring your own pens and paper. So far it seems that some trial and error is involved when working with the HP7475A.


==='''Utility programs'''===
* [[Media:HP7475A_live_input.pde|HP7475A_live_input]] (you have to download the controlP5 library)
* [[Media:HP7475A_feed_hpgl_file_01.pde|HP7475A_feed_hpgl_file_01]] (no buffer overflow in most cases)
* [[Media:HP7475A_feed_hpgl_file_02.pde|HP7475A_feed_hpgl_file_02]] (no buffer overflow at all (so far), but method seems a bit inefficient)


'''Working Times'''
==='''General'''===
If you want to work with the plotter, first check if there is no class currently held in the room.
The plotter is placed in room 204, in the shelf behind the projection screen. Take it out, place it on a desk and connect the serial adapter to your computer. Please do not forget to return it to the shelf when you are done! You have to bring your own pens and paper. Expect that some trial and error is involved when working with the HP7475A, until you achieve perfect results.
Current Class Schedule in M7 Room 204


If you want to be sure that no one else is working with the plotter, make sure to send a message to the whole class, with the date and time that you intend to use the plotter (Email, Telegram, WhatsApp!?)


==='''Working Times'''===
If you want to work with the plotter, first check if the room is currently unoccupied. If you want to be sure that no one else is working with the plotter, send a message to the whole class, with the date and time that you intend to use the plotter (Email, Telegram, WhatsApp!?)<br> <br>
[https://www.uni-weimar.de/qisserver/rds?state=wplan&act=Raum&pool=Raum&show=plan&P.subc=plan&raum.rgid=2847 Class Schedule in M7 Room 204]


'''Paper Setup'''
 
==='''Paper Setup'''===
The HP7475A either takes A4 or A3 paper. The thickness of the paper is very flexible.
The HP7475A either takes A4 or A3 paper. The thickness of the paper is very flexible.
Before plotting on a A3 paper, you need to press SIZE + ENTER on the plotter to change the format.
==='''Pen Setup'''===
To use your own pens with the plotter, you can simply extend your pen’s diameter, by wrapping some paper around it. This way it will fit the pen mount of the plotter. A better way would be to 3D print adaptors, that exactly fit the original HP pen measurements. Unless you have a pen that mimmicks the original HP pen shape, avoid the HPGL commands SP; SP1; SP2; SP3; SP4; SP5; SP6; as they attempt to change the pen.<br><br>
[https://softsolder.com/2015/04/21/hp-7475a-plotter-oem-pen-body-model/ Original HP pen measurements and openSCAD code]




'''Pen Setup'''
==='''Serial Connection'''===
To use your own pens with the plotter, you can simply extend your pen’s diameter, by wrapping some paper around it. This way it will fit the pen mount of the plotter.
You need to find out the name of the serial port, as which the USB/Serial adaptor is registered in your computer. After connecting the USB/Serial adaptor to your computer, open a new Processing sketch and run the following program.  


A better way would be to 3D print adaptors, that exactly fit the original HP pen measurements:
import processing.serial.*;
Original HP pen measurements and openSCAD code
println(Serial.list());


Unless you have a pen that mimmicks the original HP pen shape, avoid the HPGL commands SP; SP1; SP2; SP3; SP4; SP5; SP6; as they attempt to change the pen.
It will display a list of all available serial devices, in the console. In Windows, the ports are named COM1, COM2,... You can try all of them until you find the right one, or check the Windows Device Manager to find out. If you have a Mac, you need to look for a name like "/dev/tty.usbserial..." Copy that name from the console and use it one of the programs that are supposed to talk to the HP7475A.




'''Serial Connection'''
You need to find out the COM port, as which the USB/Serial adaptor was registered in your computer. In Windows, you can find out in the Device Manager, in Mac OS, I don’t know yet).


'''HPGL'''
==='''HPGL'''===
The plotter only understands HPGL (Hewlett Packard Graphics Language). You can try the “HP7475A_live_input” sketch, to test some HPGL commands. You can find documentation about that language here:
The plotter only understands HPGL (Hewlett Packard Graphics Language). You can try the [[Media:HP7475A_live_input.pde|HP7475A_live_input]] sketch, to test some HPGL commands. You can find documentation about that language here: <br> <br>
Simple but incomplete reference
[https://www.isoplotec.co.jp/HPGL/eHPGL.htm Simple but incomplete reference]<br>
Full original reference (PDF)
[https://archive.org/details/HP7475AInterfacingandProgrammingManual Full original reference (PDF)]<br>
Full original reference (txt)
[https://archive.org/stream/HP7475AInterfacingandProgrammingManual/HP7475AInterfacingandProgrammingManual_djvu.txt Full original reference (txt)]<br>


Fortunately, there is a HPGL library for Processing, which can convert your sketches to HPGL files.  
Fortunately, there is a HPGL library for Processing, which can convert your sketches to HPGL files.  


Another approach is to export a .svg file with Processing and to convert it to .hpgl with InkScape. (The files produced by inkscape are not compatible with my “HP7475A_feed_hpgl_file_01” sketch yet). InkScape also has the option to directly send graphics to the plotter, but I had no good experience with that. It also needs original HP Pens (or 3d printed adaptors), as it sends SP; commands, which let the plotter attempt to change the pen, before beginning to draw.
Another approach is to export a .svg file with Processing and to convert it to .hpgl with InkScape. (The files produced by inkscape are not really compatible with my “HP7475A_feed_hpgl_file_01” sketch yet). InkScape also has the option to directly send graphics to the plotter, but I had no good experience with that. It also needs original HP Pens (or 3d printed adaptors), as it sends SP; commands, which let the plotter attempt to change the pen, before beginning to draw.




'''How to install the HPGL library in Processing:'''
==='''How to install the HPGL library in Processing:'''===
Sketch → Import Library… → Add Library… → search for: HPGLGraphics
Sketch → Import Library… → Add Library… → search for: HPGLGraphics → Install → restart Processing
→ Install → restart Processing


You can now open the examples of the library (File → Examples → Contributed Libraries → HPGLGraphics → …). Try the examples and adapt the code for your own sketches.   
You can now open the examples of the library (File → Examples → Contributed Libraries → HPGLGraphics → …). Try the examples and adapt the code for your own sketches.   




'''How to use the library for HPGL export in a Processing sketch?'''
==='''How to use the HPGLGraphics library to export a .hpgl file?'''===
import hpglgraphics.*;
HPGLGraphics hpgl;
 
void setup(){
  size(1104, 772); // 1616 x 1104 for A3(!?)
  Hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL);
  hpgl.setPaperSize("A4"); //either A4 or A3
  hpgl.setPath("yourFileName.hpgl"); //file will appear in sketch folder
  noLoop();
}
 
void draw(){
  beginRecord(hpgl);
  // your code here (the graphics you wnat to export as hpgl file)
  endRecord();
}


import hpglgraphics.*;
HPGLGraphics hpgl;
void setup(){
  size(1104, 772); // 1616 x 1104 for A3(!?)
  Hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL);
  hpgl.setPaperSize("A4"); //either A4 or A3
  hpgl.setPath("yourFileName.hpgl"); //file will appear in sketch folder
  noLoop();
}
void draw(){
  beginRecord(hpgl);
  // your code here (the graphics you want to export as hpgl file)
  // make sure that nothing is drawn outside of the canvas. The plotter seems to have problems with that.
  endRecord();
}
void mousePressed(){
  redraw();
}


'''How to send a HPGL file to the plotter?'''
==='''How to send a HPGL file to the plotter?'''===
Use the “HP7475A_feed_hpgl_file_01” or “HP7475A_feed_hpgl_file_02” sketches, which are almost the same (only the buffer handling works differently). Both do not work perfect yet for each case, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments
Use the [[Media:HP7475A_feed_hpgl_file_01.pde|HP7475A_feed_hpgl_file_01]] or [[Media:HP7475A_feed_hpgl_file_02.pde|HP7475A_feed_hpgl_file_02]] programs, which are almost the same (only the buffer handling works differently). Both do not work perfectly yet for all cases, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments.

Latest revision as of 23:19, 28 January 2019

Working with the HP 7475A

Utility programs

General

The plotter is placed in room 204, in the shelf behind the projection screen. Take it out, place it on a desk and connect the serial adapter to your computer. Please do not forget to return it to the shelf when you are done! You have to bring your own pens and paper. Expect that some trial and error is involved when working with the HP7475A, until you achieve perfect results.


Working Times

If you want to work with the plotter, first check if the room is currently unoccupied. If you want to be sure that no one else is working with the plotter, send a message to the whole class, with the date and time that you intend to use the plotter (Email, Telegram, WhatsApp!?)

Class Schedule in M7 Room 204


Paper Setup

The HP7475A either takes A4 or A3 paper. The thickness of the paper is very flexible. Before plotting on a A3 paper, you need to press SIZE + ENTER on the plotter to change the format.

Pen Setup

To use your own pens with the plotter, you can simply extend your pen’s diameter, by wrapping some paper around it. This way it will fit the pen mount of the plotter. A better way would be to 3D print adaptors, that exactly fit the original HP pen measurements. Unless you have a pen that mimmicks the original HP pen shape, avoid the HPGL commands SP; SP1; SP2; SP3; SP4; SP5; SP6; as they attempt to change the pen.

Original HP pen measurements and openSCAD code


Serial Connection

You need to find out the name of the serial port, as which the USB/Serial adaptor is registered in your computer. After connecting the USB/Serial adaptor to your computer, open a new Processing sketch and run the following program.

import processing.serial.*;
println(Serial.list());

It will display a list of all available serial devices, in the console. In Windows, the ports are named COM1, COM2,... You can try all of them until you find the right one, or check the Windows Device Manager to find out. If you have a Mac, you need to look for a name like "/dev/tty.usbserial..." Copy that name from the console and use it one of the programs that are supposed to talk to the HP7475A.


HPGL

The plotter only understands HPGL (Hewlett Packard Graphics Language). You can try the HP7475A_live_input sketch, to test some HPGL commands. You can find documentation about that language here:

Simple but incomplete reference
Full original reference (PDF)
Full original reference (txt)

Fortunately, there is a HPGL library for Processing, which can convert your sketches to HPGL files.

Another approach is to export a .svg file with Processing and to convert it to .hpgl with InkScape. (The files produced by inkscape are not really compatible with my “HP7475A_feed_hpgl_file_01” sketch yet). InkScape also has the option to directly send graphics to the plotter, but I had no good experience with that. It also needs original HP Pens (or 3d printed adaptors), as it sends SP; commands, which let the plotter attempt to change the pen, before beginning to draw.


How to install the HPGL library in Processing:

Sketch → Import Library… → Add Library… → search for: HPGLGraphics → Install → restart Processing

You can now open the examples of the library (File → Examples → Contributed Libraries → HPGLGraphics → …). Try the examples and adapt the code for your own sketches.


How to use the HPGLGraphics library to export a .hpgl file?

import hpglgraphics.*;
HPGLGraphics hpgl;

void setup(){
  size(1104, 772); // 1616 x 1104 for A3(!?)
  Hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL);
  hpgl.setPaperSize("A4"); //either A4 or A3
  hpgl.setPath("yourFileName.hpgl"); //file will appear in sketch folder
  noLoop();
}

void draw(){
  beginRecord(hpgl);
  // your code here (the graphics you want to export as hpgl file)
  // make sure that nothing is drawn outside of the canvas. The plotter seems to have problems with that.
  endRecord();
}

void mousePressed(){
  redraw();
}

How to send a HPGL file to the plotter?

Use the HP7475A_feed_hpgl_file_01 or HP7475A_feed_hpgl_file_02 programs, which are almost the same (only the buffer handling works differently). Both do not work perfectly yet for all cases, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments.