Announce - Open Source CNC website

=============== Item 3/4 I will provide both source and compiled [.exe] files that should run on any late windows box. I am most comfortable working with the older basic dialects in DOS [and I still like cp/m], however as someone pointed out its time to move on as XP has problems with some DOS "box" programs, so I an updating to visual basic for windows.

Uncle George

Reply to
F. George McDuffee
Loading thread data ...

====================

Open source cnc software - HPGL to g code programs

My major interest in this was to allow easy use of fonts to generate cnc programs.

As the sign says "so soon old - so late smart."

As part of writing the converter I did intensive web research. Google did not directly point to this, but through a series of links I discovered that such an application already exists and has long been used in the Unix/Linux community, and has been ported to Windows. [After I blew the butter-and-egg money on a new compiler that will generate console apps that will work in XP

-- did get a cool t-shirt though. see:

formatting link
You need to download and install hp2xx. There are several sites and mirrors. Among many see
formatting link

The version I used is hp2xx-3.4.4.2.exe. This is an automatically unpacking install file. It will install the base hp2xx.exe program, most likely in c:\program Files\GnuWin32\bin

My small contribution to the group is to make you aware of this program and provide you with an easy way to run it with the required options. Basically I wrote a dos bat file called makecnc.bat. This needs to go all on one line, and reads as follows.: (note that this is from the unix/linux world and thus the toggles are case sensitive)

c:\progra~1\GnuWin32\bin\hp2xx -m nc -n -N -z -2.00 -Z 2.00 -l makecnc.log -f cnccode.out %1

You can put this batch file in what every your working directory is [directories are]. The lead-in accesses hp2xx in its "home" directory

-m nc tells the program you want cnc code out

-n tells the program not to fill polygons

-N tells the program to ignore the PS or pen size command

-z -2.0 tells the program to plunge 2.0 m/m below the x-y plane on a pen down PD. You can set this to whatever you want as long as the pen up xy is greater than the pen down xy

-Z 2.0 tells the program to raise 2.0 m/m over the x-y plane on a pen up PU. You can set this to whatever you want as long as it is greater than the pen down xy.

-l makecnc.log tells the program to write progress information/errors to makecnc.log in the directory where you called it from. You can change this to whatever you want but use the 8.3 format.

-f cnccode.out tells the program to write the output to cnccode.out in the directory where you called it from. You can change this to whatever you want but use the 8.3 format.

The %1 is what every you type after makecnc. For example if I input "makecnc plaque.plt" at the command line, the %1 becomes "plaque.plt". This allows easy conversion.

Be sure and download [and read] the documentation.

You will want to experiment with the PS [pen size] and the -n/-N fill toggles.

Note that all moves are absolute [G90] metric [G71] Use the G71 [not included] to set to metric at the start of the block and G70 to return to inch at the end of the block. You will have to set the feed rate to the slower of the plunge or traverse, and will need to have a header to start your machine and a footer to shut everything down.

I have tried this with the HP7550 plus, the HP Draftmaster SX, and the HPGL/2 plotter drivers in Windows2000 with good results from several graphics and cad programs including CMS Intellicad

5.1 PE+. As some of these plotters can go to E size and/or can use 36-inch wide roll paper, they can generate some files for big parts [anyone with a cnc spar mill out there?] Note that HP2xx is mainly for HPGL and not HPGL/2, but it accommodates a large subset of HPGL/2 that included everything I tried.

The downside is that while this does indeed let you use stroke/Hershey and TrueType (ttf) fonts, the code does not use anything but G0 and G1 moves. All arcs are approximated by an enormous number of short line segments, so the output files are huge. However, as most people have the ability to cut-n-paste this should not present a problem. Most likely not the thing to use for high volume production, but may be just what you need for a one-off special for the boss.

Let us know how this works and what you used it for.

Uncle George

Reply to
F. George McDuffee

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.