Learn CAD/CAM or Gcode
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
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
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
#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.
- Sterling
- Topic Author
- Offline
- Premium Member
- Posts: 120
- Thank you received: 1
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)
Please Log in or Create an account to join the conversation.
- Sterling
- Topic Author
- Offline
- Premium Member
- Posts: 120
- Thank you received: 1
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.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
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
Please Log in or Create an account to join the conversation.
- Sterling
- Topic Author
- Offline
- Premium Member
- Posts: 120
- Thank you received: 1
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.
- Rick G
- Offline
- Junior Member
- Posts: 26
- Thank you received: 155
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.At the moment, my question/concern is...how fast can/will the unit move? Is it dependent upon the stepconfig?
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
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
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)
Please Log in or Create an account to join the conversation.
- Sterling
- Topic Author
- Offline
- Premium Member
- Posts: 120
- Thank you received: 1
That totally makes sense, but the problem I have is that some of the understanding. For instance,
andG17 (XY Plane)
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!
Thanx for the help everybody; I'm learning as I go!
>>> Sterl
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
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.