What's new
What's new

Hardinge lathe w/ Fanuc code for the progam to check machine Z location

FredIII

Plastic
Joined
Oct 4, 2019
I'm programming to cut/slice off multiple parts from a blank.
I calculate the number of parts I can get before hitting the spindle.
Is there code that I can use in any program/part count to double check distance to spindle?
 
If it has Macros enabled you could have a spot at the top of your program to enter in your part thickness and the Z location of your chuck face. Something like:

#600=.562 (part thickness plus cutoff)
#601=-23.752 (Z location of chuck face)

Then, before the M98 line to jump to your sub program that slices the part off or whatever, you say:

IF[[#600+#601]LT[current z-position register]]GOTO1;
;
9000(NOT ENOUGH MTL LEFT);
;
N1:
;
M98P100;
;
......

That way you can change the z location of your chuck face as well as the part thickness at the top of the program as needed. Before cutting off the next part it checks to see if there’s enough room and if it’s too close it’ll throw up an alarm. You’d actually probably want to check before you make your z move to the cutoff length but you can take that into account in your “part thickness” value.

Good luck!
 
This looks great. Thanks.
Any more machine values like [current z-position register]?
 
If your control has G10 option (most doo) you can:

Start your program with G10 P0 X0 Z-3.5 just below the header.

M98

G10 P0 X0 Z-2.8

M98

G10 P0 X0 Z-2.1

M98

The G10 z-3.5 will move your Z zero point 3.5" further out from the chuck.
Once you get to Z0 you are back to square one.

The nice point of G10 Zxxx is that it is ABSOLUTE, and not hinged on where you were just before you fired it.

However - you can edit it INCRementally by using G10 Wxxx

You always want to use a neg value in Z as a positive will put you into the chuck.


I would find this a whole lot less cornfusing that a macro.

I use G10 on all of my Fanuc lathes on almost all progs.


------------------

Think Snow Eh!
Ox
 
This looks great. Thanks.
Any more machine values like [current z-position register]?

I’m not sure what the registers are, exactly, so you’ll have to find out what numbers to reference in your conditional statements. The example I offered essentially just checks to see if enough material is left in Z prior to going to slice it off.

Ox’s machining aptitude is superior to mine so please consider his idea as well. Like many things, it depends on what “clicks” and makes the most sense to you!

Good luck!
 








 
Back
Top