George,
I have to aggree with Cliff. Much to varied. Might I suggest to
incor****ate a NC formatter for basic things like you mentioned. You
don't need anything complex.
gary
F. George McDuffee wrote:
> I am looking for information on the most popular [G/M] cnc file
> layouts.
>
> As some of you may remember I am writing a program to convert
> HPGL files to cnc files. The reason for using HPGL rather than
> dxf for input is that the HPGL files have the actual vectors for
> text, including ttf, where the dxf files contain the text
> strings.
>
> I discovered a free GNU program called hp2xx that will take
> regular HPGL and HPGL/2 files for input and generate an output
> file using only PU [pen up], PD [pen down], and PA [plot
> absolute] commands, with some other extraneous [for my purposes]
> commands such as IN [initialize plotter]. This eliminates the
> more problematic conversions such as converting AR [arc relative]
> because of the difference in the way cnc controllers handle the
> arc commands. The downside of this is that a single line for an
> AR [arc relative] command is replaced with a huge number of short
> absolute G1 moves.
>
> My program called hpgl2cnc is nearing completion. Rather than
> attempting to write a complete cnc program, this generates only
> the G0/G1 codes that will need to be cut-n-pasted into a complete
> program with headers to start the machine and footers to properly
> shut it down. The program has the option of either metric or
> inch code generation and will run in the "console" [dos box] of
> windows xp and 2k. [I had to buy a new compiler (PowerBasic
> CC4.01) to do this.]
>
> HPGL plotter units are 1016 to the inch or 40 per m/m. Accuracy
> will be 0.001 inch or 0.05 m/m. You will be able to set a
> different plunge [z] and lateral [xy] feed rates. You will also
> set a "clearance" above the part and a "plunge" distance into the
> part in either inch or metric.
>
> Specifically I need to know what is the most common/****table cnc
> output file format suitable for cut-n-paste:
>
> Line numbers? - how many places? Sequential or every 5 etc.
>
> Include decimal points? If no decimal points what is assumed
> accuracy?
>
> Leading or trailing signs? -0.123 or 0.123- also do you want/need
> + signs?
>
> Spaces between variable name and value, i.e. "X0.123" v "X 0.123"
>
> Comment indicator? "%". " ' ", "*" or what?
>
> ==> Is column alignment still im****tant? If so what spacing? <==
>
> ==> I am including range checking on the xy and z feed rates.
> What is the min/max in inch and/or metric that you think you
> would use? I am using IMP in the inch mode. What is the accepted
> metric feed rate unit?
>
> While HPGL2CNC is generally intended for plaques, I can see doing
> 2 dimensional contouring such as flat cams. With the ability in
> most cad programs to turn layers on/off, some elaborate work
> should be possible, with the manual insertion of G41/G42 codes
> and T specifications.
>
> Thanks for your advice.
>
> I will post the compiled exe program and PowerBasic source on my
> website and submit for inclusion on some of the other cnc sites
> and the PowerBasic site. This will be freeware under the GPL.
> If you would like a copy when it is completed please send me an
> email. Most likely not the program to use for high volume
> production, but may be just what you need for a one off plaque or
> sign.
>
> I'll start work on the 'C' axis version for engraving around a
> cylinder when this one is up and running.
>
> Uncle George


|