What's new
What's new

Haas mini mill - Repeating to a known z value datum point

CNCnewbie2020

Plastic
Joined
Dec 14, 2020
Hello all,

I'm very new to CNC programming and am operating on a Haas Mini mill. I have created a program that uses a Face mill to outline a shape from a block. I am currently running the program to decrease the z axis value by 4mm, then once the program has completed I am altering the z value manually to take me down another 4mm and repeating this process until I get to somewhere around the 44mm mark. I then use a saw attachment to take out multiple thin sections.

To automate the process of getting down to 44mm, my limited knowledge of G coding tells me just to copy the program 11 times with the z value changed each time, but I know there is a more elegant solution. Can anyone help me with repeat codes that would incrementally move 4mm down each time then stop the program running when it reaches 44mm???

Thanks

A complete novice.
 
Does your machine have VQC (visual quick code, a type of conversational)? It sounds like you don't have access to a CAM package is why I ask. What year is your machine? As much info as you can give us makes the answers you receive better suited to you and what you want to do...
Sounds like you could use a pocketing routine, unless your face mill is large enough to make just 1 pass each time, then a different routine would be better. Also, try googling sub-routines, might be able to figure out from there. It will save you from copying a bunch of code at the least.
 
To answer your question, you make your program a sub program (N1000) and at the beginning of your main program, declare your Z value #501 = 4 (check that #501 isn't used by anything else in your control, probing, etc) so... "G90 G0 X-10 Y -10 Z#501" and the rest of your profile. At the end of your subprogram, #501 = #501+4.

Then in your main program call M98 P1000 Q11.

This will call your sub program 11 times, and increment your Z value by 4mm each time the sub program runs.

Not the most elegant solution, but a quick and dirty one that works.
 
Or write a sub program that includes a G91Z-4.0 block at the start of the program. Then switch to G90 for the rest of the program and use L11 to repeat.Similar to Teach's idea.
 








 
Back
Top