- Joined
- Mar 27, 2023
- Messages
- 9
Hi all, I'm pretty new to CNC and Gcode. I have a Tormach 440 with the passive probe. One thing that has quickly become annoying is facing stock (based on this method:
) without being able to use the Tormach with hand wheels/manual input. I can use the jog shuttle to do it but have to be pretty careful (ie slow) since there's no mechanical feedback. One slip of the cheap little jog wheel and I ruin my stock (or a tool).
To try and get around this, I wrote a Gcode program that does the following:
Prompt tool change to probe
Starting in the middle of X, and back 25% of Y (near rear jaw of where my vice always sits), probe Z height of work piece
Starting at machine's (G53) X/Y zero with Z down a few mm, probe until you hit X/Y of stock, then do the same working backwards from machine's max travel
Store the resulting computed stock width/height
Position to back-left corner of stock, set X/Y zero here
Prompt tool change to specified cutter
Take a perimeter pass around the stock, 5mm depth, cutting in about 0.5mm on all sides (accounts for tool width properly etc)
Take a facing pass over the stock, taking off about 0.25mm (accounts for stepover etc) -- repeat with stepovers until the top has been faced
Done
The outcome is stock that has the top faced flat and each side has a little spot where it is true to the top (assuming the machine is trammed in properly). Then I can flip the block around in the vice such that it rests one ONE parallel (the parallel contacting the 5mm faced patch), with the faced off top of the stock now contacting the back jaw of the vice. I can then face each side of the cube manually (ez) and lastly the bottom (ez).
I don't have to use Tormach's (not very intuitive) conversational programming, which I find fiddly and time consuming, and don't need to save a new NC file for every stock facing operation. Just fire up the program, let it measure, change tools, and you've completed a big chunk of the facing operation.
The problem is... I turned the machine off and on again, and immediately broke a tool because my facing routine is now operating in an unexpected way! I consulted Tormach's manual on this and they explicitly advise against "parametric" Gcode due to the hard to understand/debug nature. I agree! There's no console log, preview, or anything when the Gcode is parametric I'm still baffled with the undefined (feels that way atleast) behavior of my Gcode, but will get into that later.
Does anyone have tips on how to do this better, or is an ill-advised endeavor and I should just do it manually and stop wasting my time?
To try and get around this, I wrote a Gcode program that does the following:
Prompt tool change to probe
Starting in the middle of X, and back 25% of Y (near rear jaw of where my vice always sits), probe Z height of work piece
Starting at machine's (G53) X/Y zero with Z down a few mm, probe until you hit X/Y of stock, then do the same working backwards from machine's max travel
Store the resulting computed stock width/height
Position to back-left corner of stock, set X/Y zero here
Prompt tool change to specified cutter
Take a perimeter pass around the stock, 5mm depth, cutting in about 0.5mm on all sides (accounts for tool width properly etc)
Take a facing pass over the stock, taking off about 0.25mm (accounts for stepover etc) -- repeat with stepovers until the top has been faced
Done
The outcome is stock that has the top faced flat and each side has a little spot where it is true to the top (assuming the machine is trammed in properly). Then I can flip the block around in the vice such that it rests one ONE parallel (the parallel contacting the 5mm faced patch), with the faced off top of the stock now contacting the back jaw of the vice. I can then face each side of the cube manually (ez) and lastly the bottom (ez).
I don't have to use Tormach's (not very intuitive) conversational programming, which I find fiddly and time consuming, and don't need to save a new NC file for every stock facing operation. Just fire up the program, let it measure, change tools, and you've completed a big chunk of the facing operation.
The problem is... I turned the machine off and on again, and immediately broke a tool because my facing routine is now operating in an unexpected way! I consulted Tormach's manual on this and they explicitly advise against "parametric" Gcode due to the hard to understand/debug nature. I agree! There's no console log, preview, or anything when the Gcode is parametric I'm still baffled with the undefined (feels that way atleast) behavior of my Gcode, but will get into that later.
Does anyone have tips on how to do this better, or is an ill-advised endeavor and I should just do it manually and stop wasting my time?