diptrace g code

More
11 years 5 months ago #58774 by vre
diptrace g code was created by vre
I made a simple circuit in diptrace and the diptrace exported the following g-code file for drilling holes
Code:
M48 METRIC,0000.00 T01C1.1 % T01 X+001635Y+002206 // these are the location of holes XY the Z missing also missing G codes for feeding X+001889Y+002206 X+001762Y+001254 X+001508Y+001254 X+001254Y+001254 X+002016Y+001254 X+002270Y+001254 T00 M30

How to convert to linuxcnc acceptable code ?
Can anyone to modify this code to working code ? After that i will understand the changes and i will write a script that makes diptrace nc drill files compatible with linuxcnc.

Please Log in to join the conversation.

More
11 years 5 months ago #58778 by ArcEye
Replied by ArcEye on topic diptrace g code
Hi,

There is not much there
M48 is to do with feed override in LCNC so irrelevant

Have to guess that next line sets units and the scale
METRIC,0000.00

G21 G17 is all you need here plus
G90 G40 G54 G8

Again guessing, that next line sets the diameter of tool 1
T01C1.1

Don't need that, it should be in your tool table and you are no applying compensation anyway

Don't need the percent sign %

T01 presumably equates to
M6T1
G43


Then you need to work out what these values actually are, ie where the decimal place is.

I am guessing that the scale given earlier means that
X+001635
means
X16.35

If the values make sense to you converted to that scale, just needs the rest of the program :laugh:

Quite honestly the output is so little you might as well just use the values as hole locations and write the rest, not much point trying to convert it.


Something like
Code:
G17 G21 G90 G54 G40 G8 M6T1 G43 M3 S1000 G0 X0 Y0 Z2 G0 X16.35 Y22.06 G01 Z-1 F100 G0 Z2 (and so on for each hole) G0 X0 Y0 Z2 M5 M2

regards

Please Log in to join the conversation.

More
11 years 5 months ago #58786 by BigJohnT
Replied by BigJohnT on topic diptrace g code
If you just need to drill holes and know their location you can use my G code generator to get valid G code.

gnipsel.com/files/mill-g-code/

Being a work in slow progress not all the functions work but all the hole Ops functions including tapping work.

JT

Please Log in to join the conversation.

More
11 years 5 months ago #58790 by vre
Replied by vre on topic diptrace g code
diptrace has option to output mach3 g code and the output of this function (same pcb) is
Code:
(G code for Mach2/3) (T01 C1.1) T01 M06 M03 G43 H1 S10000 G81 X6,35 Y12,065 Z-1,905 R2,54 F10 X8,89 Y12,065 X7,62 Y2,54 X5,08 Y2,54 X2,54 Y2,54 X10,16 Y2,54 X12,7 Y2,54 G00 Z10.0 M02

Please Log in to join the conversation.

More
11 years 5 months ago #58791 by ArcEye
Replied by ArcEye on topic diptrace g code
The locations are 10mm out from the last ones and all the commas should be decimal points,
but otherwise should run.

Try it in a simulator

Please Log in to join the conversation.

More
11 years 5 months ago #58804 by vre
Replied by vre on topic diptrace g code
What about creating a meaningfull metalanguage in c style for G/M linuxcnc codes?
C know very much people g code very little number of people

Please Log in to join the conversation.

More
11 years 5 months ago #58807 by dgarrett
Replied by dgarrett on topic diptrace g code

What about creating a meaningfull metalanguage in c style for G/M linuxcnc codes?
C know very much people g code very little number of people

see: www.vagrearg.org/content/gcmc

Please Log in to join the conversation.

More
11 years 5 months ago #58816 by BigJohnT
Replied by BigJohnT on topic diptrace g code

vre wrote: What about creating a meaningfull metalanguage in c style for G/M linuxcnc codes?
C know very much people g code very little number of people


All the machinists in the world know G code and they probably out number the programmers...

JT

Please Log in to join the conversation.

Time to create page: 0.109 seconds
Powered by Kunena Forum