Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: egropp on April 22, 2013, 08:44:58 AM

Title: MachIII GCode Leadin questions
Post by: egropp on April 22, 2013, 08:44:58 AM
I hope this is a quick question.
I am trying to learn and understand G-Code and have a bit of a sticking point...

If I look at the toolpath in MachIII, I can see that there are circular leadins for a part, I can zoom into the part and see in the toolpath that the leadin is a cricular leadin, but when i look at the G-Code for that same spot, there is nothing to tell me that there is a leadin (other than the tool starts at that point).
Where in G-Code can I see the leading definitions? I used LazyCam to post the code, selected "Straight" leadins and a tool offset of .125.
I cannot seem to locate how or where in the code the actaul leadin is defined. If I step through the code line by line, i see where the tool goes to the start point, makes the cut around the part then leaves.

Does MachIII make assumptions about the leadins or is it actually defined somewhere?
Any information here would be great.
Title: Re: MachIII GCode Leadin questions
Post by: woodspinner on April 22, 2013, 09:55:42 AM
leadins would be defined in your gcode.

John
Title: Re: MachIII GCode Leadin questions
Post by: egropp on April 22, 2013, 11:17:51 AM
That is my point.
When I look at my G-Code, i see nothing to indicate a leadin (or how its defined as a circular, straight, 45deg...)
I see the machine move into place and beging the cut, but nothing before that other than the offset of G41.
Where does the leadin type and path get defined?
Title: Re: MachIII GCode Leadin questions
Post by: BR549 on April 22, 2013, 12:06:50 PM
The leadin is JUST a move that leads in to or out of a contour to allow Mach3 to adjust the offset before cutting the contour. It does NOT have a type or designation it is just a move such as G01, G02/3.

(;-) TP

Title: Re: MachIII GCode Leadin questions
Post by: egropp on April 22, 2013, 12:56:41 PM
Ok.. understood...
But would this not show up in the G-Code somewhere?


Here is a snippet of the code...

N825 G0  Z1.0000                                 Raise the tool to 1 unit                       
N830  X31.0187 Y22.8512                      Move to the start of the part cut   (this would be the beginning of the lead in) How does it know to do a lead in of straight or circular?
N835  Z0.1000                                      Lower the tool to the cut start depth   
N840 G1  Z0.0000 F1.00                        Lower the tool into the material at a slower speed
N845 G41                                             Set the offset           
N850  X31.0212  Y22.9374   F20.00        Start the cut with a feedrate of 20
N855  X29.0542  Y22.9945   
N860  X26.9885  Y23.0656   
N865  X24.5822  Y23.1224   
Title: Re: MachIII GCode Leadin questions
Post by: BR549 on April 22, 2013, 02:15:33 PM
Your lead in should be the next move after the G41 call. What cam are you using to create the code??

In your code teh G41 is really not used in the proper manner. It should contain either the D or Parameter with the call. In mach3 it will work without it as it assumes the last tool number BUT it is NOT proper etiquite to not use it .

G41 D1     ' use the tool#1 values
G41 P0.125   ' Use the .125 offset value

(;-) TP

Title: Re: MachIII GCode Leadin questions
Post by: egropp on April 22, 2013, 02:22:59 PM
I used Lazycam to post the code
I tried to set all leadins to be straight, but have 2 parts on the layer that have a circular leadin, thats what promped me to start looking
Title: Re: MachIII GCode Leadin questions
Post by: RICH on April 22, 2013, 08:09:42 PM
Suggest you have a look at the LC Manual which can be found in Member's Doc's.
See Tutorial #7.

RICH
Title: Re: MachIII GCode Leadin questions
Post by: egropp on April 23, 2013, 09:12:43 AM
Rich,
   Thank yo for that.. There is a lot of great info there.
I still do not see where or how MachIII gets told what type of leadin is being used. There is nothing that jumps out at me inthe GCode that would indicate a circular, 45 deg or straight leadin as used by LC.
Title: Re: MachIII GCode Leadin questions
Post by: stirling on April 23, 2013, 09:56:05 AM
OK - as you haven't posted your code (except for your tiny snippet) I can't show you where the leadins are but using my crystal ball I see you set at least one of your straight leadins to be 1/10th of an inch long. Nope - sorry - I just can't see your arc leadins - must be losing my touch - or need a new crystal ball maybe... ;)

Hint: the ONE leadin you have shown us is line N850

Ian
Title: Re: MachIII GCode Leadin questions
Post by: BR549 on April 23, 2013, 10:25:19 AM
I guess it is best to ask are you running the pro version of Lcam that actually does tool radius comp?

(;-) TP
Title: Re: MachIII GCode Leadin questions
Post by: RICH on April 24, 2013, 07:24:42 AM
Quote
I still do not see where or how MachIII gets told what type of leadin is being used.

As Terry replied, you need the pro version of LC for advanced features of LC.

You are reponsible for defining where and the type of lead you want to use. LC will do it automaticaly, or try to , and that info
is in Tutorial #7. There are a number of options to select the type. LC will show the leadin / out in the graphics area and post code. The posted code contains the gcode which will be used by Mach.

RICH
Title: Re: MachIII GCode Leadin questions
Post by: RICH on April 24, 2013, 08:09:09 AM
Simple example of lead in  / out with code from LC.

RICH
Title: Re: MachIII GCode Leadin questions
Post by: stirling on April 24, 2013, 08:33:02 AM
but... whatever means are used to get leadins/outs into your code, they are just G1, G2, G3 moves or combinations thereof (as has been said).

That's why I had a little poke to post your code and then we could point them out to you.

Ian