What's new
What's new

G/M code and subroutine question

LongRifles Inc.

Aluminum
Joined
Mar 8, 2009
Location
Sturgis, South Dakota
Newb has a couple questions.

I've got a Daewoo turning center with a Fanuc 21i-T control. I have a bar puller and need to whip out some screws. Pulling the material to a stop was fun for about five parts. Now I'm ready to suck start my Glock pistol.

I'm rusty (that means lost) on exactly how to write the code for this. I know I need to stop the spindle, release the collet, pull the material, lock the collet, and then spool it back up.

I don't know the code for releasing the collet.
I don't know how to write a tape with a subroutine so that the machine will repeat .

If anyone has pity on a poor soul I'd be grateful.

Cheers and thanks.

Chad
 
Chad:
When you get to the point in your program where you want to jump to the Sub, program:
M98 P1000(or whever you want to call the sub, in this case the Sub is O1000)
In the sub you would have whatever activates the bar feed)The last line in the barfeed sequence would be M99, that sends it back to the cutting program.
You can also do it with a barpuller, there you would tell it in the sub call how many times you want to repeat it.
I have some Sub examples on my website, look at those too.
www.doccnc.com
Good luck: Heinz.
 








 
Back
Top