Pen plotters: Difference between revisions
Line 59: | Line 59: | ||
http://hpmuseum.net/display_item.php?hw=80 | http://hpmuseum.net/display_item.php?hw=80 | ||
===[[Pen plotters/HP 7440A]]=== | ===[[Pen plotters/HP 7440A|HP 7440A]]=== | ||
{{ :Pen_plotters/HP_7440A }} | {{ :Pen_plotters/HP_7440A }} |
Revision as of 20:19, 13 November 2023
HPGL
Hewlett-Packard Graphics Language
- There is a HPGL book in the studio/library!
- HP-GL Reference Guide
IN;IP0,0,4000,4000;SC0,100,0,100;
SP1;
PA0,0;
PD;
PA100,0;
PA100,100;
PA0,100;
PA0,0;
PU;
Plotters at XPUB
![](/mw-mediadesign/images/thumb/4/49/DraftProDXL_1988-PromoPhoto-32.jpg/300px-DraftProDXL_1988-PromoPhoto-32.jpg)
HP DraftPro EXL
A0+ pen plotter.
Currently borrowed from Varia. It was a gift from Gijs (OSP).
http://hpmuseum.net/display_item.php?hw=393
http://www.hpmuseum.net/document.php?hwfile=3232 (user manual) http://www.hpmuseum.net/collection_document.php (list of HP museum user manuals, in case the download link above does not work)
demo plot: press P1 + P2
simultaneously (the buttons with a small 1 and 2)
It speaks: HPGL (HP graphics language)
HP 7475A
A4/A3 plotter
https://www.hpmuseum.net/display_item.php?hw=74
https://archive.org/details/HP7475AInterfacingandProgrammingManual
demo plot: hold down the P1 + P2
keys and turn on the power
- repair log: Printing/xml-plotter-1
HP ColorPro
A4 plotter
http://hpmuseum.net/display_item.php?hw=80
HP 7440A
TAXAN X-Y KPL710
- REDIRECT Pen plotters/TAXAN X-Y KPL710
BBC Metrawatt SE-283
- repair log: Printing/xml-plotter-2
HP 7550A
A4/A3 plotter, with a paper feeder!
- state: Currently not working, the carousel is missing
CLI
Most plotters connect to this socket on a Linux machine:
/dev/ttyUSB0
Add your user to the dialout group first:
$ useradd USERNAME dialout
Then configure how your computer and the plotter communicate, these settings should work with most plotters:
$ stty 9600 parodd parenb ixon ixoff -F /dev/ttyUSB0
Then send a file with cat:
$ cat myfile.hpgl > /dev/ttyUSB0
Chiplotle
Chiplotle is an HPGL plotter driver that implements and extends the HPGL (Hewlett-Packard Graphics Language) plotter control language. It provides direct control of your HPGL-aware hardware via a standard usb<->serial port interface. Chiplotle is also a general purpose vector drawing library with functions for creating and transforming shapes, which can then be sent directly to your HPGL plotter for printing.
Chiplotle is written and maintained by Víctor Adán and Douglas Repetto.
- Main web page: http://sites.music.columbia.edu/cmc/chiplotle/
- Documentation: https://chiplotle.readthedocs.io/en/latest/index.html
- More documentation: http://sites.music.columbia.edu/cmc/chiplotle/manual/chapters/tutorial/intro.html
Use
Connect to plotter to computer with usb.
Start the plotter.
Wait! until the plotter is fully running.
Activate the venv you made.
In Linux:
$ source FOLDERNAME/bin/activate
In Windows (using Powershell):
$ FOLDERNAME\Scripts\Activate.ps1
Now you can start chiplotle:
$ chiplotle3
It should automatically detect the plotter...
If it doesn't, you can try to turn the plotter on and off, or load paper.
Once the plotter is detected, you can send a HPGL file to plotter:
plotter.write_file('FILENAME.hpgl')
When you're done, close chiplotle with:
exit()
Install
Install pip, venv
First install pip and the virtual environment python module, if you don't have them yet.
On Linux:
$ sudo apt install python3-pip $ sudo apt install python3-venv
On Mac and Windows:
follow the instructions at https://www.python.org/.
Make a virtual environment
On Linux and Mac:
$ python3 -m venv FOLDERNAME
For example:
$ python3 -m venv plotter-venv
On Windows:
py -m venv FOLDERNAME
For example:
$ py -m venv plotter-venv
Activate the virtual environment
On Linux and Mac:
$ source FOLDERNAME/bin/activate
On Windows (using Powershell):
FOLDERNAME\Scripts\Activate.ps1
You can exit again by writing deactivate
.
Install Chiplotle
Install Chiplotle inside this virtual environment (the Python library to speak HPGL to the plotter):
$ pip install Chiplotle3
Run Chiplotle
See #Use.
Errors
Windows: Script Execution Policy
See: https://www.makeuseof.com/enable-script-execution-policy-windows-powershell/
Mac: ImportError: module not found "imp"
?
Windows: "port" not found (?)
File "C:\Users\aless\OneDrive\Desktop\PENPLOTTER_venv\lib\site-packages\serial\serialutil.py", line 268, in port raise ValueError('"port" must be None or a string, not {}'.format(type(port))) ValueError: "port" must be None or a string, not <class 'int'>
Alessia and Manetta spend an hour on this error on Nov 13th 2023, but did not figure it out. There is little documentation on using Chiplotle on Windows unfortunately. A next step could be do open serialutil.py
to see if the error can be resolved directly there.
It's the next day now, we looked into this again and solved it!
First, edit your Chiplotle config file, which is stored in your home folder, which you can edit on Linux/Mac with:
$ nano ~/.chiplotle/config.py
or on Windows:
> notepad C:\Users\USERNAME\.chiplotle\config.py
Change this line:
serial_port_to_plotter_map = None
into:
serial_port_to_plotter_map = {'COM4' : 'HP7475A'}
or use another plotter model number.
Secondly, you need to also edit a Python script within the Chiplotle library, which you can open on Linux/Mac with:
$ nano PATH-TO-YOUR-VENV/chiplotle3/src/chiplotle3/plotters/baseplotter.py
or on Windows:
> notepad PATH-TO-YOUR-VENV\chiplotle3\src\chiplotle3\plotters\baseplotter.py
Then edit the following on line 196:
@property def _buffer_space(self): self._serial_port.flushInput() self._serial_port.write(self._hpgl.B().format.encode()) bs = self._read_port() return int(bs)
and just change the last line:
@property def _buffer_space(self): self._serial_port.flushInput() self._serial_port.write(self._hpgl.B().format.encode()) bs = self._read_port() return int(128)
Now Chiplotle should work.
Raspberry Pi
Numpy error:
libopenblas.so.0: cannot open shared object file: No such file or directory
Install the missing library:
$ sudo apt install libopenblas-dev
Debian / Ubuntu / Raspbian: "Chiplotle3" command not found
After running chiplotle
after intalling it through pip3 install chiplotle3
, you might be prompted with an error that the command is not found. This might be caused due to a PATH problem. pip
installs into ~/.local/bin
, which is not part of the default PATH on Debain based operating systems.
Check your path:
> echo $PATH
Add to path:
> nano /.bashrc [scroll to the bottom and add the line:] export PATH="$HOME/.local/bin:$PATH" restart your shell
Inkscape
The plot function is under: export > plot
Error: pySerial is not installed.
Please follow these steps:
- Download and extract (unzip) this file to your local harddisk: https://pypi.python.org/packages/source/p/pyserial/pyserial-2.7.tar.gz
- Copy the "serial" folder (Can be found inside the just extracted folder) into the following Inkscape folder:
/usr/????????
- Close and restart Inkscape
Make a vector file in Inkscape.
Save it as a HPGL
file. See the image on the right for the settings.
For example: A3 landscape
Tip (!): landscape file = portrait plot. Make a landscape document, it plots in portrait orientation on the plotter (weird, but works)
Pens
HP Fiber Tip Plotter Pens S Style Pens:
- $ 22 for 5: https://www.draftingsteals.com/catalog-plotters---plotter-supplies-plotter-pens-fiber-tip-plotter-pens.html
3d printable adapters for pens:
this pen plotter is (not) made to die
Monday 30 + Tuesday 31 Oct 2023
Joak: On Monday (30/10/2023) and Tuesday (31/10/2023) I will be helping to repair the pen plotters between 5:15pm and 7:30pm. You have probably seen all the different (broken) pen plotters in the XML or Studio, these come from WDKA and other places. Most of them need probably just a small fix, some have a complex problem. These two evenings are just a start. I think by the end of this term 3/4 of the pen plotters should be working again.
If you are interested, just pass by. No previous knowledge of electronics, programming or pen plotters are required. These repair evenings are intended as an introduction to these topics. Everyone is welcome. Modus operandi: You will get an pen plotter on your table and step by step you will repair it over the next weeks or you will even modify it and do some imaginary (but still real) drawing tool/device.
Location: aquarium or studio
The plan is to do in the second trimester the same with (electronic) typewriters and in the third trimester with dot-matrix-printer!
Monday 6 + Tuesday 7 November
Monday 13 + Tuesday 14 November
...