Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Re: CNC GM fil...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 8 Topic 175 of 275
Post > Topic >>

Re: CNC GM file format help needed

by F. George McDuffee <gmcduffee@[EMAIL PROTECTED] > Feb 14, 2006 at 08:07 PM

On Tue, 24 Jan 2006 05:45:51 -0500, Cliff <Clhuprich@[EMAIL PROTECTED]
>
wrote:
>On Mon, 23 Jan 2006 14:54:34 -0600, F. George McDuffee
><gmcduffee@[EMAIL PROTECTED]
> wrote:
>>I am looking for information on the most popular [G/M] cnc file
>>layouts.  
>>  It's indeed rather varied. Which is why we have postprocessors.
>  OTOH There is also the basic RS-274D standard which is a subset
>of many sets of commnads these days.
>  See also the "Gerber" or  RS-274D/X standard.
=================================
Thanks to Cliff and every one else that replied directly [emails]
about the output file formats.

I have just about completed coding for the actual conversion of
the preprocessed ( using the gpl hp2xx ) HPGL and HPGL/2 files.

Your suggestion to operationally create a simple post appears to
be the best solution to the file format question.

  Also I am doing range checking [min/max values] and would
appreciate advise on the following points, assuming you are using
small endmills for sign creation, etc.
(1) What are the min/max vertical feedrates and units that you
would ever use?
(2) What are the min/max horizontal feedrates and units you would
ever use?
(3) What is the min/max distance above the surface you would ever
use?
(4) What is the min/max plunge below the surface you would ever
use?

Items 1-4 will be input when you convert a processed hpgl file.

If you use a cad program, you can turn layers on/off before
plotting, so lettering in the bottom of a pocket is easy.  Mirror
immage is also simple.

Units [mm/inch] will be determined in the configuration file.

A proforma output configuration file follows.  Please  review and
let me know what variables I have omitted, or other features you
would like.

=== possible configuration file for hpgl ==> G-CODE translator ==
*
* « CONFIGURATION FILE » 
* for hpgl2cnc.exe -- a GPL public domain program.
*
* by default hpgl2cnc uses the hpgl2cnc.cfg config file.
*
* you can use different configuration files 
* by specifying on the command line
* for example <hpgl2cnc fanuc01.cfg> or <hpgl2cnc hurco.cfg>
* these will need to be in the same directory as 
* hpgl2cnc.exe unless you specify drive/directory. 
*
* NOTE: hpgl2cnc generates only 2_1/2D moves, i.e. only 1 or 2
axis change in any one block.
*
* Lines begining with an astrisk are comments.
*
* All alpha values converted to upper case by the program.
* 
* Settings shown are for an Emco F1 educational machining center,
and most and
* ==> MOST LIKELY NEED TO BE EDITED FOR YOUR CONTROLLER.<==
*
* Be sure to use an editor program such as <notepad> or <edit> or
<edlin> that writes 
* ==>only plain ascii text<== files with no formatting or other
control codes.
*
* Save a copy of this configuration file
* *BEFORE* you edit it as hpgl2cnc.org and set attributes to read
only.
*
* It is suggested that you complete the comment lines below
indicating 
* what controller your configuration file su****ts when you modify
it. 
* (and keep back-up versions)
*	-- gmcd 07FEB2006  (gmcduffee@[EMAIL PROTECTED]
) 
*
* edited configuration file data 
* edited by: <your name>
* on: <date>
* for: < your controller or machine name>
*
* ==========================================
*
I , "unit output -- <I>nch/<I>mperial or <M>etric  -- valid
values are I/M "
*
* ==========================================
*
% , "character used for controller comment line [ignore block]
<9999> supresses comments"
*
* ==========================================
*
P , "decimal point character -- valid values are <N>one, <P>oint
for <.> and <C>omma for <,>"
* NOTE: cannot input <,> directly
*
* ==========================================
*
3 , "number of digits in line number -- 0 suppresses [no N],
valid values are 0,3,4,5,6"
*
250 , "max number of lines you can cut-n-paste into your cnc
control program at one time"
* program will withdraw tool and home, write comment line, reset
line number counter to 25
* return tool to previous position and continue.  Because
hpgl2cnc uses only straight line
* moves, cnc programs can be very large when arcs/curves are
involved.
*
* with 3 digit line numbers, max number of lines is 975 in any
one sub program
* with 4 diget line numbers, max number of lines is 9975 in any
one sub program
* with 5 digit line numbers, max number of lines is 99975 in any
one sub program
* with 6 diget line numbers, max number of lines is 999975 in any
one sub program
*
* ==========================================
*
1, " number of spaces between line number and 1st parameter? --
valid values are 0,1,2"
*
* =========================================
*
1 , "number of spaces between parameters? -- valid values are 0 ,
1, 2"
*
3 , "number of digits in XYZ cordinates -- valid values are
1,2,3,4,5,6"
*
4 , "number of decimals in XYZ cordinates -- valid values are
0,1,2,3,4,5,6"
*
Y , "leading zeros required for XYZ coordinates -- valid values
are <Y>es/<N>o"
*
A , "does the minus sign [-] go before or after a negative
coordinate value -- <B>efore /<A>fter
*
N , "include a plus sign [+] for positive coordinate values? --
<Y>es / <N>o"
*
B , "Does the axis designator [XYZ] go <B>efore or <A>fter the
axis vlaue?"
*
N , "space between XYZ axis designator and value? valid values --
<Y>es , <N>o"
*
* ==========================================
*
A , "show all 3 coordinates or only changed coordinates in cnc
block -- <A>ll or <C>hanged only"
*
* ==========================================
*
F , "feed rate designator -- generally <F> but any ascii string
255 characters or less"
*
2 , "number of digits in feed rates [F] -- valid values are
2,3,4,5"
*
1 , "number of decimal places in feed rate [F] -- valid values
are 0,1,2,3"
*
Y , "leading zeros required in feed rate? -- valid values <Y>es /
<N>o"
*
N , "space required between F designator and feed rate value?  --
valid entries are <Y>es / <N>o"
*
B , "does the F go before or after the feed rate value? -- valid
entries are <B>efore / <A>fter"
*
1 , "spaces between axis cordinate and feed rate -- valid vaues
are <0>,<1>,<2>
*
E , "Feed rate specified for <E>ach machining move or <M>odal --
valid values are E & M"
*  
* ==========================================
*
G00 , "point-to-point straight line rapid traverse command --
generally <G0> (G-zero) 
*  or <G00> (g-zero-zero) but can be any ascii string 255
characters or less
* 
*
G01 , "point-to-point straight line controlled feed command --
generally <G1> G-one
* or G01 (G-zero-one) but can be any ascii string 255 characters
or less
*
* ==========================================
*
0.000 , "granularity or minimum move from X1,Y1,Z1 ==> X2,Y2,Z2"
*  
* units are what ever you selected above <I>nch/<I>mperial or
<M>etric
* set to zero for best possible resolution.  larger values will
produce smaller,
* faster running programs but detail and smoothness of curves may
be degraded.
* NOTE: HPGL plotter units are 40 per m/m or 1016 per inch, so
best possible
* accuracy is 0.001 inches or 0.025 m/m per axis.
*
* ========= NOTES =================
*
* NOTE: HPGL2CNC outputs 2_1/2D moves, i.e. only 2 axis moves in
any one block.
*
* Internally, HPGL2CNC uses PowerBasic long-word [unsigned long
integer]
* variables for the plotter value storage 
* and converts to the desired inch/imperial or metric units using
double precesion variables
* before rounding to your indicated accuracy.
*
* PowerBasic's website is http://www.PowerBasic.com
if you would
like more details
* Their manual is on-line.
*
* maximum unsigned long-word PowerBasic value is 4,294,967,295.
*  
* At 1016 plotter units per inch this is a maximum size per side
of
* 4225361.511 inches, 352113.4592 feet or 66.68815516 miles.
*
* At 40 plotter units per m/m this is  a maximum size per side of
107324182.4 m/m, 
* 107324.1824 meters or 107.3241824 KM.
*   
* ==========================================
 




 8 Posts in Topic:
CNC GM file format help needed
F. George McDuffee <gm  2006-01-23 14:54:34 
Re: CNC GM file format help needed
Cliff <Clhuprich@[EMAI  2006-01-24 05:45:51 
Re: CNC GM file format help needed
F. George McDuffee <gm  2006-02-14 20:07:08 
Re: CNC GM file format help needed
Cliff <Clhuprich@[EMAI  2006-02-15 10:11:20 
Re: CNC GM file format help needed
F. George McDuffee <gm  2006-02-15 13:21:55 
Re: CNC GM file format help needed
Cliff <Clhuprich@[EMAI  2006-02-15 17:36:16 
Re: CNC GM file format help needed
g-a-r-y@[EMAIL PROTECTED]  2006-01-24 09:00:30 
Re: CNC GM file format help needed
Cliff <Clhuprich@[EMAI  2006-01-24 12:47:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Jul 8 22:57:47 CDT 2008.