diptrace g code

More
17 May 2015 12:53 - 17 May 2015 12:56 #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
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.
Last edit: 17 May 2015 12:56 by vre.

Please Log in or Create an account to join the conversation.

More
17 May 2015 16:21 - 17 May 2015 17:24 #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
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
Last edit: 17 May 2015 17:24 by ArcEye.
The following user(s) said Thank You: vre

Please Log in or Create an account to join the conversation.

More
17 May 2015 19:29 - 17 May 2015 19:30 #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
Last edit: 17 May 2015 19:30 by BigJohnT.
The following user(s) said Thank You: vre

Please Log in or Create an account to join the conversation.

More
17 May 2015 20:57 #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
(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 or Create an account to join the conversation.

More
17 May 2015 21:03 #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 or Create an account to join the conversation.

More
18 May 2015 06:08 - 18 May 2015 06:08 #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
Last edit: 18 May 2015 06:08 by vre.

Please Log in or Create an account to join the conversation.

More
18 May 2015 07:13 #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
The following user(s) said Thank You: vre

Please Log in or Create an account to join the conversation.

More
18 May 2015 17:40 #58816 by BigJohnT
Replied by BigJohnT 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


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

JT

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum