
01-05-2012, 08:11 AM
|
| | | Join Date: Jun 2010 Location: U.S.A.
Posts: 4
| |
Originally Posted by fordav11 What kind of machine is this? Normally you can't do 'real' XZ turning on a mill. |
The machine is a round column mill/drill converted to CNC with servos and a Mach3 controller. I'm chucking up 1/2" dia aluminum stock in a collet and clamping some lathe tools in the vice.
Originally Posted by fordav11 If you have never programmed long hand before why are you over-complicating it by using macro variables? |
I guess I figured I was simplifying things. The subroutine keeps me from making dangerous numerical typos, and the parts I'm making have a shoulder and three grooves of varying depths and widths, so I figured by passing in parameters I could use the same subroutine for each groove and the shoulder. It's not in the example I posted, but my plan was to call M98 multiple times, and correspondingly rewrite the parameters for each call. Is that a piss-poor way to go about it?
Originally Posted by fordav11 As for problems, you are in G17 (XY plane) and you are cutting XZ plane (G18). It's not a problem here because you are only cutting straight but if you cut an arc with G02/G03 you will get an alarm (wrong plane) |
Yeah, my plan there was to switch to G18 only for any arc moves (none in this program) and then switch back to G17. Since it's a mill, I wanted to be sure it stays in G17 as a default in case the next program doesn't explicitly call G17.
Originally Posted by fordav11 Also T0 is not valid except when cancelling an offset. A T0 with M6 after it will generate an alarm. |
Good point. My controller doesn't alarm with a T0, but I'll switch it to an unused tool number and use the tool offset for the stock length.
Originally Posted by fordav11 Your program is very strange regardless of these errors  |
How you skin a cat can say a lot about your personality, I suppose |