Page 1 of 1

Abusing CAMexpert for plotting to HP plotter

Posted: Wed Apr 04, 2007 5:36 pm
by edi
Caused by general despair over unfixed bugs, I have taken the camexpert demo, selected all the bits that go onto the plan, exported them to hpgl code and catted it to /dev/lp0 where my plotter lives, thus avoiding any bugs that might lurk in some print server. Not only that it generally works, the plotting quality is *way* superior to everything else I got pdf or ps-wise. :)

So basically you *do* have support for all HP plotters here, right? The only problem left is the clipping: The drawing is for some reason clipped to a width of ~47cm and after slightly more than 60cm the plotter stops plotting. I don't understand why? Is there anything that could be done about it? Maybe it is some restriction of the demo?

Re: Abusing CAMexpert for plotting to HP plotter

Posted: Thu Apr 12, 2007 8:17 pm
by andrew
edi wrote:So basically you *do* have support for all HP plotters here, right?
HPGL output for a specific plotter type requires usually a significant amount of configuration (adjusting hpgl.cxm file). HPGL is a very weak standard and there are almost as many dialects as there are plotters.
edi wrote:The only problem left is the clipping: The drawing is for some reason clipped to a width of ~47cm and after slightly more than 60cm the plotter stops plotting. I don't understand why? Is there anything that could be done about it? Maybe it is some restriction of the demo?
The demo does not restrict the output and CAM Expert does not do any type of clipping when generating output, so this must be some limitation of the plotter, its HPGL dialect or an incompatibility.

You might want to perform some tests with a large rectangle and compare a working and a not working HPGL file.

Re: Abusing CAMexpert for plotting to HP plotter

Posted: Fri Apr 13, 2007 5:06 am
by btech
[quote="edi"]exported them to hpgl code and catted it to /dev/lp0 where my plotter lives
[/quo

I use my HP7550A with Camexpert. It works as you describe by generating a cam file and then sending it to the plotter. Under Windows I use the Roland DXY-1350A plotter driver for the HP7550A, which works perfectly. Another thing that makes the HP plotter work well is to use a parallel to serial converter. I use one made by Tandy-RadioShack, works well with Linux and Windows.
In Camexpert you can change the sheet size from the Edit menu as well as during cam export by % size. Do a print preview and click on the printer auto-size button and it will be sized to your selected sheet.

computer side:
parallel port--->>parallel-serial converter

plotter side:
when plugged as terminal control:
9600,8,n,1 local standalone xon-xoff

when plugged as computer/modem port:
9600,8,n,1 remote standalone xon-xoff

I have never used the HP-IB connector.

Posted: Sat Apr 14, 2007 9:50 am
by edi
Thanks for the replies

My problem is as I said that the drawing gets clipped and is out of position. I haven't used the print preview because I thought it won't give me the same things as the CAM export file, but I will do that right away.
I'd be a bit loth to invest money into a parallel-to-serial converter unless I know for sure there will be something to gain.

Andrew,

I am aware there are lots of HPGL dialects out there, it's the same thing with almost any printer description language. But there must be a strong subset supported by all of them. Under windows, you can define a "generic HPGL plotter". And you must have had something similar in mind when you wrote CAM Expert, otherwise it wouldn't make sense to talk about HPGL export, right?
My point is, the printing quality achieved by catting the CAM-export file to the plotter is *way* superior to what I get from the foomatic driver plus it's a workaround for that silly qt bug which might not get fixed in our lifetime.

Posted: Sat Apr 14, 2007 10:55 am
by edi
OK, here is some new data along with things I don't understand. All data gathered with my HP 430.

1. Setting the paper and using the print preview doesn't seem to affect the CAM export in any way.
2. Selecting something and then do CAM export *does* affect the output in a weird manner: You do not export the selected part, but the same piece of the drawing (the part right above the X-axis, clipped in a way I do not yet understand) which gets partly scrambled (bits of letters moved around, some arcs appearing somewhere else).
3. So I copied the parts I wanted to export into a new drawing and just exported this file to HPGL. I get the same clipping and offset issues, but into the bargain, I end up with lots of very large spurious arcs.

I could post pictures if this sounds interesting to anybody but me.

Posted: Sat Apr 14, 2007 3:00 pm
by btech
edi wrote:OK, here is some new data along with things I don't understand. All data gathered with my HP 430.

1. Setting the paper and using the print preview doesn't seem to affect the CAM export in any way.

** Printing and Cam export are two different issues.

I could post pictures if this sounds interesting to anybody but me.

**The dxf file might help.
Are you using Windows, what version?
Do you have the updated driver for your hp430:
http://h20000.www2.hp.com/bizsupport/Te ... R1002_USEN

Also Windows, in Printer Settings, under File, under Server properties, you can define custom paper sizes. You can also change the standard sizes, so when tabloid is selected it would configure to what you have it set to.

Camexpert hp cam outout is HPGL, your raster plotter uses HPGL/2.

The Roland plotter drivers are free to download and one may work with your plotter.

Roland Plotter Drivers:
http://www.rolanddg.com/download.html

Using a serial-parallel converter eliminates many problems with using the serial port for printing on the newer computers. Many new machines do not even have serial ports. In Linux the converter works straight away.

I use a HP7550A plotter and a HPDeskjet1220C with Camexpert with no problems in Windows and Linux. After things are set up paper sizes are not a problem.

Posted: Sat Apr 14, 2007 5:47 pm
by edi
No windows here, I am using linux (ubuntu x64). I have assumed HPGL is a subset of HPGL/2 so that my printer would understan it. BTW, my CNC software (PCNC 3.0) is supposed to understand HPGL, but it chokes on the files generated by CAM Expert, too. :(

The dxf file does not seem to be the problem either, they are all affected in the same way.

Posted: Sat Apr 14, 2007 6:29 pm
by btech
edi wrote:No windows here, I am using Linux (ubuntu x64). I have assumed HPGL is a subset of HPGL/2 so that my printer would understand it. BTW, my CNC software (PCNC 3.0) is supposed to understand HPGL, but it chokes on the files generated by CAM Expert, too. :(
Using Camexpert with Linux is why I hooked up the parallel-serial converter. After installing it all my Linux plotter printing troubles went away. It prints directly to my plotter with no errors. The converter handles all the speed/handshake etc.. I just leave installed when using Windows and it works just as well.

HPGL/2 is a raster plotting language EPS like and not a subset of HPGL. HPGL has just a few commands for controlling pen plotters and was developed first. HP wrote HPGL/2 for the newer raster plotters years ago.

Linux printer drivers:
http://openprinting.org/show_printer.cg ... ignJet_430

Posted: Mon Apr 16, 2007 7:18 pm
by edi
btech wrote:
edi wrote:No windows here, I am using Linux (ubuntu x64). I have assumed HPGL is a subset of HPGL/2 so that my printer would understand it. BTW, my CNC software (PCNC 3.0) is supposed to understand HPGL, but it chokes on the files generated by CAM Expert, too. :(
Using Camexpert with Linux is why I hooked up the parallel-serial converter. After installing it all my Linux plotter printing troubles went away.
I was referring to my CNC mill here ...
btech wrote: It prints directly to my plotter with no errors. The converter handles all the speed/handshake etc.. I just leave installed when using Windows and it works just as well.

HPGL/2 is a raster plotting language EPS like and not a subset of HPGL. HPGL has just a few commands for controlling pen plotters and was developed first. HP wrote HPGL/2 for the newer raster plotters years ago.

Linux printer drivers:
http://openprinting.org/show_printer.cg ... ignJet_430
I know that printer driver, actually, I have it installed. But it works through ghostscript and some of the lines don't look as nice as they should. Furthermore, I get bitten by the Qt bug with the Custom Paper size. So I thought I could circumvent this by generating a plot file and feeding it to the printer via "cat plotfile > /dev/lp0" which kinda works, but gives me weird clippings. I cannot yet see why this would be different if the file would be fed through the serial port and a serial-to-parallel converter (apart from the fact that I could connect the HP 430 directly to the serial port). I gather from your post that you are using A3 or A4 paper. No problems plotting to that stuff. It's the arbitrarily long plot 24" wide which causes my headaches.

Posted: Tue Apr 17, 2007 1:22 am
by btech
edi wrote: BTW, my CNC software (PCNC 3.0) is supposed to understand HPGL, but it chokes on the files generated by CAM Expert, too. :(

I was referring to my CNC mill here ...

It's the arbitrarily long plot 24" wide which causes my headaches.
What a bugger. One last thing, my HP plotter uses an odd-ball pin-out with the serial cable. Unless you use it you will get odd plotting and dropped data etc. Have you checked your cable to see if it is an exact match to your machine? With mine a standard cable will not work nor will a standard null-modem. I made my own from my junk pile.

Also, I have used custom sheet sizes with no trouble, so your problem can most likely be solved.

Posted: Tue Apr 17, 2007 8:42 am
by edi
As I said, I have never used the serial cable. The guy I got the plotter from was an architect who was gearing up. He showed me the plots and they were fine. As a matter of fact, so are mine when prepared with windows software like Autosketch, AXCAD or AutoCAD (these I get ready to print - just "cat file > /dev/lp0"). Only I would like to be able to prepare my stuff w.o. booting into Windows. (With wine I have a printer driver problem and under win4lin the print preview doesn't work.)

Posted: Tue Apr 17, 2007 1:16 pm
by btech
edi wrote:As I said, I have never used the serial cable.
So your computer is right next to your machine? Reliable parallel cable length is about 11 feet, no more than 15 feet with a quality cable and strong drivers. If your are going further than this then you need to use the serial port. Or converters and line amps.

Posted: Sat May 19, 2007 7:32 pm
by edi
btech wrote:
edi wrote:As I said, I have never used the serial cable.
So your computer is right next to your machine?
To the plotter, yes.

Posted: Sat Jun 16, 2007 6:07 pm
by stukennedyuk
Sorry, I only just came across this. The original problem is easy to explain, small format HP plotters have the plot origin at "bottom, left" - '0,0' if you like. Large format plotters have the origin in the exact centre of the page / media. Any program that outputs HPGL tends to have the plot origin at '0,0' - This is the reason you do not see the whole plot, it is outside the physical plot area.

I tried to find an HPGL command that reset the plot origin, but no joy, there are some I think, but they just did not work (despite removing a reset in the HPGL file - right at the beginning). I know a potential fix, which is to take each x and y co-ordinate and add on an offset, maybe in a spreadsheet, maybe with some sort of macro?

I have the pin-outs for the serial cable that has worked for me.

Stoo.....

Posted: Tue Jul 17, 2007 4:50 pm
by edi
I have tried to add an offset, but to no avail. It does shove the output to one side, but the clip remains.