What's new
What's new

M98 sub jump looping, CNC lathe

teamjnz

Plastic
Joined
Mar 26, 2007
Location
near Sacramento, CA
I wanted to share this trick I recently learned. I have a 1998 Femco HL15 CNC lathe with a Fanuc O-T control. I often pull bar stock in this machine. Long time ago I learned how to used the L command for repeating a sub routine, something like this. M98 P1000 L10 but my machine would not except this command and would give and alarm. So I would create a main program with many M98 P1000 lines for puling bar. I would have for example 10 lines with M98 P1000 to pull the bar run the program 10 times BUT I recently learned this command and it worked in my machine. Here is the trick for sub jumping without having to copy and paste a whole bunch of M98 lines.

M98 P101000

The first 2 numbers is the times to repeat and the last 4 numbers is the jump to program. Nice and simple. I wanted to share this if anyone else was doing what I was doing. One of the sub jump programs I used had 95 M98 sub jump lines. I am glad to have learned this simple new trick.

-teamjnz
 
I did the same thing as you albeit with only 5 repeats.
Then found the command you show here in the manual and now use it same as you.
One of those things that is sort of buried in the manual so thanks for sharing.
 
This method can be used for up to 999 repeats. Last 4 digits is program number; left to this is repeat count.
L method, if available, allows 9999 repeats.
 
this brings up something also, how to enable loop counts. I found it a couple different ways I think but can't remember. What worked for guys here? I think the most basic is something on the M99 correct?
 
For my machine there is a M code that adds +1 to the counter I insert the the program before the M99 and it has proven to be accurate on the count for lots of parts.
 








 
Back
Top