new to writing Gcode, please confirm my O sub does what i want

More
7 years 6 months ago #131288 by travis036
i don't remember where i got the original file from, but i modified it to suit my machine, i think.
Code:
o100 sub ( make sure we are in mm mode ) G21 ( MDI_COMMAND=o100 call ) (MSG, Please insert touch probe plate, and connect tool ground clip) ( Set current Z position to 0 so that we will always be moving down ) G10 L20 P1 Z0 ( Probe to Z-10 mm at F2 [Uses machine units, mm in my case, this is meant to be slow!] ) G38.2 Z-10 f2 ( Set Z0 at point where probe triggers with offset of +10 [this is the thickness of my touch plate. You must adjust this for your plate / setup] ) (G10 L20 = Set Coordinate System // P - coordinate system 0-9 0 = Not active) G10 L20 P1 Z10 (Incremental mode) G91 (Rapid Z up 10 mm) G0 Z10 (Use workpiece coordinates) G90 G54 G0 o100 endsub

my understanding is this.
Code:
(MSG, Please insert touch probe plate, and connect tool ground clip)
inserts a reminder for me to place the plate, and the ground clip.
then it sets workpiece zero (g54) to wherever it currently is (presumably just above probe plate).
Code:
G38.2 Z-10 f2
probe down, within -10mm, at 2mm feedrate (too slow?)
Code:
G10 L20 P1 Z10
set tool offset for G54 (workpiece), to 10mm, or the thickness of my to-be-made probe plate.
then the Z moves up 10mm, so i can remove the plate.

have i modified this correctly?

Thanks in advance

~Travis

Please Log in to join the conversation.

More
7 years 6 months ago #131303 by Todd Zuercher
If it works for you you did it right.

Please Log in to join the conversation.

More
7 years 6 months ago #131304 by travis036
uhhh... true. more to the point, i wanted to make sure i understood it correctly.
i can test it in a bit, when i head out.

~Travis

Please Log in to join the conversation.

More
7 years 6 months ago #131505 by pl7i92
for tempory settings you can also use G92
and as a General ini preset G92.1 to undoo all the ofsets

Please Log in to join the conversation.

More
7 years 6 months ago #131506 by pl7i92
you shoudt also check if you are not the only user of the mashine
[#5400 GT 0] (is there a tool loaded)
msg out if not

is there a H in place
you can get into real trouble with multi tools

Please Log in to join the conversation.

Time to create page: 0.149 seconds
Powered by Kunena Forum