1
G-Code, CAD, and CAM discussions / Using M98 and M99
« on: November 20, 2016, 12:55:56 AM »
Would someone be so kind as write a sample of code. I've done several searches and watched numerous videos but still unclear about this one. If I could see a sample of code I believe it would help me understand the commanded machine movements more. I write a lot of simple linear codes for myself but I'm trying to understand more how the M98 function works.
Here is all I need the machine to do. First I'll briefly describe the set up. Mill...XYZ with a rotary A drive with a separate control so it does not need to be included in the code. It just basically operates as a continuous rotating lathe spindle. I need to slice off a row of "buttons" from a rotating piece in the A drive.
So here is what I need the M98 code to do.....from X0 (the end of the part)Y0...Z0 will be top of the part. The Z starts at 1. above Z0 then retract to .050 above Z0 for the clearance.
The X will do a G0 move to -.042 and the Z go -.25 at a G1Fxx from Z0 and just repeat that X and Z incremental move 25 times with the Z retracting to the .050 after each -.25 depth cut.
After it has completed all 25 passes return to X0Y0Z1.
I need a 1 inch Tool Length offset in the program.
So basically at the start of the program....Z will be 1. above the part at X0Y0 and have the X to move into the minus .042 of an inch and each time the X moves the Z needs to retract -.25....all this 25 times before return back to its start.
I would very much appreciate a sample of what this code should look like and I'm confident I can do my modifications, if needed, from there.
Thank you
Regards Dave aka cnc rookie
Here is all I need the machine to do. First I'll briefly describe the set up. Mill...XYZ with a rotary A drive with a separate control so it does not need to be included in the code. It just basically operates as a continuous rotating lathe spindle. I need to slice off a row of "buttons" from a rotating piece in the A drive.
So here is what I need the M98 code to do.....from X0 (the end of the part)Y0...Z0 will be top of the part. The Z starts at 1. above Z0 then retract to .050 above Z0 for the clearance.
The X will do a G0 move to -.042 and the Z go -.25 at a G1Fxx from Z0 and just repeat that X and Z incremental move 25 times with the Z retracting to the .050 after each -.25 depth cut.
After it has completed all 25 passes return to X0Y0Z1.
I need a 1 inch Tool Length offset in the program.
So basically at the start of the program....Z will be 1. above the part at X0Y0 and have the X to move into the minus .042 of an inch and each time the X moves the Z needs to retract -.25....all this 25 times before return back to its start.
I would very much appreciate a sample of what this code should look like and I'm confident I can do my modifications, if needed, from there.
Thank you
Regards Dave aka cnc rookie