Learn CAD/CAM or Gcode

More
31 Jan 2013 05:02 - 31 Jan 2013 05:04 #29336 by BigJohnT
Replied by BigJohnT on topic Learn CAD/CAM or Gcode
The first thing I see is you set incremental mode in your preamble. This may be a source of confusion for you. Another thing is G1 is a modal command in group 1 so it will stay in effect until you issue another G code from modal group 1.

gnipsel.com/linuxcnc/reference/page2.html

I would use G81 to drill identical holes in different locations.
G20 G54 G40 G49 G90 G80 G94
Assuming your jogging to the start position and wanting that to be X0 Y0
G91 G81 X0 Y0 Z-0.5 R0.25
X.5
X.25
X.25
...
G90 G80
G0 X0 Y0
M2

The "go to home" move at the end went to the G91 X0 Y0, either change back to G90 or put a G53 G0 X0 Y0 to go to machine zero.

I use G92 on my plasma where I jog to a start point and want that to be X0 Y0 then all the coordinates make more sense as you use the actual X Y coordinates. Then at the end you use G92.1 to clear the offset.

John
Last edit: 31 Jan 2013 05:04 by BigJohnT.

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

More
31 Jan 2013 05:07 #29337 by BigJohnT
Replied by BigJohnT on topic Learn CAD/CAM or Gcode
Can you be more specific about #1?

#3 your probably drilling much too slow for 26k in wood. You might try the peck drill cycle G83 or a pause between each hole for the bit to cool down a bit. What size hole are you drilling?

John

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

More
31 Jan 2013 05:53 - 31 Jan 2013 05:56 #29340 by Sterling
Replied by Sterling on topic Learn CAD/CAM or Gcode
Thanx, I'll read up on what you've posted about G81 and hope I can sort it out. ;)

As for #1) What I meant was that in the display, the WHITE lines show the intended path, and the RED lines show the actual path of the drill. Whereas they are 'identical' the paths do not flow over each other.

Drilling speed; Yea, I guess that's what what was. I don't know what setting to use, to tell it how fast it should go (I don't want it to go too fast)
Last edit: 31 Jan 2013 05:56 by Sterling.

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

More
31 Jan 2013 06:24 #29341 by Sterling
Replied by Sterling on topic Learn CAD/CAM or Gcode
Sooo... If I used G81 in the preamble, I then use the Z measurement once, and have it follow the X commands and then the Y commands until I type in a G80 to stop it?

The 'R' I do not understand. For this code I am using an 1/8" (.125) drill bit going down approx 1/2" (.5) So would an R1 mean that Z will always drill .5? (If that is what I set it to)

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

More
31 Jan 2013 08:01 - 31 Jan 2013 08:11 #29344 by BigJohnT
Replied by BigJohnT on topic Learn CAD/CAM or Gcode
At 27k rpm with a 1/8" drill bit that is 850 SFM (Surface Feet per Minute) which is really fast. If you tried to take 0.001" per revolution you would have to feed at 52 IPM (Inches Per Minute). I don't think you can feed too fast while you drill unless you stall the spindle. Using G81 will rapid out of the hole which will help reduce the friction on the bit and keep it cooler.

The G81 line goes at the start of the drill sequence not in the preamble. The preamble is for setting up the machine and contains things like units, turn off compensation, turn off any cycles, set your path control mode, the active plane etc. The preamble is to put the machine into a known state so G codes that follow are interpreted correctly.

The G81 followed by the location of the first hole in your X and Y corrdinates then the Z depth to drill and finally the R retract position. There are a few more options but the basic is G81 X Y Z R. The reason for the R is to specify the retract height after first hole. You can be higher when you start the G81 cycle but the retract height is where it ends up.

Normally you touch off the tools to the top and set that as Z0. In this example I assume that. I assume you jogged to the starting point and the G code assumes that to be X0 Y0.
; preamble
G20 G17 G40 G49 G64 P0.005 G80 G90 G94

; set the G92 offsets for X and Y
G92 X0 Y0

; start the series of holes at the current position and drill to Z-0.5 then rapid back to Z0.75
G81 X0 Y0 Z-0.5 R0.75
; next hole
X0.5
; more holes
X1.0
X1.5
X2.0
;move to a new Y position
Y0.5
X1.5
X1.0
X0.5
X0.0
; exit the canned cycle
G80
;remove the G92 offset
G92.1
;rapid to home, the G0 will stop the canned cycle as it is in the same modal group but it is
;good practice to use G80 as it makes the code easier to follow.
G0 X0 Y0

If you didn't specify the path control mode then you get G64 which is move as fast as you can no matter what corners you cut... Also the GUI back plot is not in real time so the path it shows may not be the exact path the tool takes.

John
Last edit: 31 Jan 2013 08:11 by BigJohnT.

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

More
31 Jan 2013 13:21 #29350 by Sterling
Replied by Sterling on topic Learn CAD/CAM or Gcode
Wow, lots of information for me!!
I read your message about a dozen times, and went through the links anywhere from twice to eight for others!
I think I understand it, (or at least I have a general concept).
So, switching from G91 to G90, I did the math (in excel) and re-wrote the code. I *think* I got it down and will try it tomorrow.
At the moment, my question/concern is...how fast can/will the unit move? Is it dependent upon the stepconfig?


Thanx -

>>> Sterl

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

More
31 Jan 2013 19:34 - 31 Jan 2013 19:35 #29360 by Rick G
Replied by Rick G on topic Learn CAD/CAM or Gcode

At the moment, my question/concern is...how fast can/will the unit move? Is it dependent upon the stepconfig?

The speed your machine can move at is dependent on several factors, the rpm range of the motors, their torque curve, the gearing etc. Also the direction steps (for a stepper drive) that can be generated either by software or hardware which is effected by the computer's latency. Micro stepping. Then other physical limitations of the machine, it's weight acceleration, etc.

If you are using a router for drilling perhaps a variable speed control to reduce spindle speed.

You can use stepconf with your tested latency to determine your step generation, then test how fast the machine can safely move and accelerate then back off that for safety.

Rick G
Last edit: 31 Jan 2013 19:35 by Rick G.

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

More
01 Feb 2013 02:07 - 02 Feb 2013 07:13 #29397 by BigJohnT
Replied by BigJohnT on topic Learn CAD/CAM or Gcode
One thing that helps me is to put a comment for G codes I'm not familiar with.

So this:
; preamble
G20 G17 G40 G49 G64 P0.005 G80 G90 G94

Would be changed to this:
; preamble
G20 (inch mode)
G17 (XY Plane)
G40 (compensation off)
G49 (cutter length compensation off)
G64 P0.005 (enable naive cam detector and stay within 0.005 of the programmed path)
G80 (cycles off)
G90 (absolute distance mode)
G94(units per minute mode)
Last edit: 02 Feb 2013 07:13 by BigJohnT. Reason: forgot a comment

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

More
02 Feb 2013 05:20 #29453 by Sterling
Replied by Sterling on topic Learn CAD/CAM or Gcode
Howdy -
That totally makes sense, but the problem I have is that some of the understanding. For instance,

G17 (XY Plane)

and

G64 P0.005 (enable naive cam detector and stay within 0.005 of the programmed path)


Doesn't make sense to me. For "XY Plane" , if this the measurements of the piece of wood I have on the machine and if I've got the router on 'home' and the coordinates mapped out...why is this necessary? Is it a safety/redundancy issue?
...and I don't know what the 'naive cam detector' is! :blush:

Thanx for the help everybody; I'm learning as I go! B)

>>> Sterl

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

More
02 Feb 2013 07:11 #29459 by BigJohnT
Replied by BigJohnT on topic Learn CAD/CAM or Gcode
The G17 XY plane is generally for mills and mill like devices and the G18 XZ plane is for lathes. This defines how some cycles work and how arcs are interpreted. The G17 plane is a flat plane drawn through the X and Y axis so this makes the Z axis perpendicular to the plane. On a lathe the G18 XZ plane is drawn through the X and Z planes and the imaginary Y axis is perpendicular to the plane.

www.linuxcnc.org/docs/html/gcode/gcode.html#sec:G17-G18-G19

This is a short heads up on using the trajectory planner.
www.linuxcnc.org/docs/html/common/User_C...trajectory_control_a

Don't feel bad I still don't know what the naive cam detector is... I only know what it does.

John

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

Moderators: Skullworks
Time to create page: 0.089 seconds
Powered by Kunena Forum