There is a trend to move away from G92. I don’t use it at all. I think I would just go with the G10L20P1.
How does this command work? Does it 1-1 replace g92 ? In other words am I simply trading g92 for the g10 string?
Sounds like an awesome alternative!
Speaking for all the guys who don’t understand all the code stuff, thank you guys who are working to make all our experiences with CNC a more intuitive and enjoyable one!!
G21
G38.2 Y15 F20
G92 Y-3
would translate
G21
G38.2 Y15 F20
G10 L2 P# Y-3
“#” = choice of workspace.
?
making future use of this, you simply need to call G54 for what P1 was set to? If my understanding is correct, I have some ideas of how I’m going to implement this.
Should G90 be used to be sure it’s in absolute when setting the offset?
Also, can or should, the z axis be setup with g92 or g10? If you are zeroing to the bottom of the material everytime at the same location I can see g10 being perfect and calling it with g54 (if my understanding is correct). on the other hand, for the jobs where z is set to the top of the material, would g92 be the optimum choice for setting the Z and calling g54 for the xy coordinates?
I want to be sure I write this out to be as adaptable as possible and want to get a sample of how others set up their zeros in the 3d space.
myself, for example, depending on what I’m doing , I work 1 of 3 ways
-
Set to the bottom of the material. I do this with most jobs that i’m just going to cut through. Or, where I want to be sure i’m getting a precise thickness.
-
top of material. signs, reliefs,
-
a reference point within a jig. see example in this post
Laundry room table
For all of these methods, I’ve been using g92, however, looking at g10… it seems like the way to go. I was looking at g28 and g30 as methods of moving to a repeatable zero, however, it looks like this will be of more use for getting the tool out of the way or for tool changing.
Please correct me if I’m wrong in my understanding.
I’m setting to bottom of the material for profile cut on Vcarve pro. Exact material thicknesses doesn’t matter. Could be close to reality. I don’t think you have to play with that on your program. As long as Toolpath set correctly, Gcode sender is doing the rest. If I understand that correctly on your number 1. prompt.
G10 L2 sets a WCS origin as offset from MCS (by given values)
G10 L20 sets a WCS origin directly (to given values)
The latter is what you need.
Yes, P# picks WCS (P1 is G54).
It’s safer to move incrementally (G91) when probing and retracting, then switch back to absolute (G90).
Here’s my current Z macro for reference:
M5 (stop spindle)
G91 (switch to incremental mode)
G38.2 Z-20 F30 (probe down by max 20mm @30mm/min)
G10 L20 P1 Z19.3 (set WCS1 Z to 19.3 - the thickness of my pluck)
G0 Z5 (move up by 5mm)
G90 (switch back to absolute mode)
M0 (pause - give time to unclip the aligator)
As a matter of fact I’ve been meaning to try a double G38.2 for more precision, the same way that homing works: find it slow, retract by a bit, find it even slower. E.g.
M5 (stop spindle)
G91 (switch to incremental mode)
G38.2 Z-20 F30 (first probe @30mm/min)
G0 Z1 (retract by 1mm)
G38.2 Z-2 F10 (second probe @10mm/min)
G10 L20 P1 Z19.3 (set WCS1 Z to 19.3 - the thickness of my pluck)
G0 Z5 (move up by 5mm)
G90 (switch back to absolute mode)
M0 (pause - give time to unclip the aligator)
G10 or G92 is on the Z or in general is a personal preference. You can even use both at the same time for temporary offsetting as long as you don’t forget about it when you don’t need it
Thanks! I like the double probing idea. This will be a toggle that will add the code as an option.
So if understand correctly… here’s the process…
first you want to home the machine.
then the following code can be run after positioning your tool over your touch plate
M5 (stop spindle)
(find z)
G21
G38.2 Z-15 F20
G10 L20 P(coordinate choice) Z(plate thickness)
(move the tool to the left side “x” of the touch plate)
G91
G0 Z2
G0 X-15
G0 Z-12
(findx)
G21
G38.2 X15 F20
G10 L20 P(coordinate choice) X-(Radius of the tool)
(move the tool to the front “y” of the touch plate)
G0 X -2
G0 Y-15
G90 G0 X10
(find y)
G21
G38.2 Y15 F20
G10 L20 P(coordinate choice) Y-(Radius of the tool)
90 (set to absolute since we now know where we are)
G0 Z 27.4 (this is user definable, however I have it coded so that it will manditorily move it at least 2mm above the plate height to avoid collision)
G0 X0 GO Y0
A view of the machine controls tab… it’s a mess right now. I’m not decided yet how the UI will be laid out so i’m just throwing things around for now just to get it together. With a few of the recent suggestions and discoveries regarding Gcode, I’m likely going to overhaul the interface to accomidate even more flexibility and ease of use. this way advanced users and novices alike will be able to get the most out of their machines.
Cup holder??
If you push that, your CD player opens up?
Ol’ programing gag. had to.
It’s too late for me to switch to metric.
currently all of the code spits out as metric. however, if you reference the screen (touch code gen) you can input inches. the code that is generated is metric.
I have thought about making it able to spit out g20 along with the inches, but didn’t think it was necessary. In my own experience, I work back and forth between metric and imperial. my gcode is imperial, I setup the machine in metric. The gcode starts with g20
However, if there is a reason to make the code in imperial (g20) let me know. This can be something I implement down the road.
On the subject of zeroing… I have a box “finish z pos”
These three boxes “finish $ pos” is where you define where you want the tool to move to after the automated zeroing process. I have been tossing around in my head how I want this handled. the x and y are absolute values. currently the z value isn’t taken into account. I have it using the z clearance parameter + the touchplate thickness to avoid collision.
I am thinking of writing a statement so that if the typed finish z pos is less than the touch plate thickness a warning will pop up.
Basically these parameters will make it so you can zero your machine, then it will move where you want so you can get your touchplate off.
Since modeling/templating is what you are after, then better leave out the moves that position your spindle before probing for the simple reason that different people with different setups will have to reach there in a different way. Maybe a certain G0 works for you, but causes a bad crash on a clamp/fixture for someone else.
Also, unless you specifically want to zero all X,Y,Z at the same time with a specific 3-way zeroing plate, it’s safer to produce probing code independently for each axis.
So, for a given axis, once you position your spindle ready for probing
(1) make sure the spindle is not running
(2) switch to incremental
(3) probe at $probe_axis by $max_probe_distance at $probe_feed
(4) set your origin to $plate_thickness ( or $tool_radius )
(5) retract by $post_probe_retract
(6) switch to absolute
(7) pause
(3) & (5) could be done in absolute mode too if the values were planned carefully, but definitely not in a one-size-fits all context as the one discussed here.
Write a nice disclaimer just in case. Some people like to sue
Now, if you excuse me, I’m requested to play mermaid dolls…
every parameter of the code is user defined.
walking through the screen…
tool diameter… self explain
plate thickness…
touch plate x offset… best way i could describe this. basically, it’s the lip of the edge of a 3 axis zero plate. if from the edge of the material to the edge of your plate is .25 in on the x then put that value in there.
touch plate y off set = same as above
z depth for xy = how deep should the tool go below the top of the plate
travel z to x = after the tool sets for z, how far does it need to go to clear the plate and be ready to go down
travel x to y = how far does the tool need to travel after the x zero in order to clear the front face of the plate.
probing feed rate = Fr (currently only in mm… this will be updated down the road along with the rest in advanced)
probing travel distance = how far is the tool allowed to travel looking for contact
plate clearance = how high should the z axis be above the plate to clear it safely
finish x y and z… where is the tool moving to after this is finished.
Another part of this that will be in the works is graphic instructions to make it clear what each setting does and the process that needs to be followed in order to determine these values. In addition, I’ll be making tutorial videos that will walk through the entire setup.
I may even add presets (drop down box) for different tool setters. I currently use 2 different ones that need to be setup differently. In other words, take all your measurements according to the instructions, input your values, click a save button and title it. in the future, just drop down and select your preset for that touchplate and modify tool diameter, press generate and send it.
on the other hand, if you only use 1 touch plate… then those settings will remain when you open the program. any time you reopen, the last parameters will be kept. at least this is what i’m planning. I haven’t defined this part of the code yet. Easier to set these parameters after I’ve hashed out everything else.
On the other hand, as shown, the z probe, x probe, and y prob’s can be sent by themselves. I use 123 blocks and sometimes if I need to get the edges of my material, ill press the block against the side with 2inch of offset. same with the y. automated code isn’t good for this.
…enjoy the mermaids lol
Here’s what a double G38.2 looks like.
I just tried it out and it works as expected.
Never too late, I have switch to metric at age of 59. Damn solid measurement, 1s 10s 100s and so on. Besides, most complex machines and heavy machinery manufacturers using metric system, included Aircraft manufacturers.
10 mm is 1 cm, 100 cm is 1 m. Like it.
OK. i’m in love with g10 now. just messed around with it and cant believe i never found this before. This has me rethinking a few things.
G90-ly
This is a CAM decision and depends on your software. It might directly support it (e.g. by a “stock to leave” option). If it does not, you can still trick it if you lie to it and input your stock size larger by “stock to leave”.
Ah… this felt like a failed comedian in an empty theater. Someone was supposed to say… hey, did he just say “absolutely” in geek?