Hello Guest it is March 28, 2024, 10:05:58 PM

Author Topic: Using Fanuc code with Mach3: problem...  (Read 4343 times)

0 Members and 1 Guest are viewing this topic.

Using Fanuc code with Mach3: problem...
« on: June 25, 2009, 03:10:54 AM »
Hello, newbie question.
I need to thread mill a NPT 1"1/2 11.5 TPI left handed external stock.
I'm using one of the programs found around which generate code for the specific tool (a Vardex trhead mill and the program I use is on their site)

I got a problem with Mach3.
It correctly loads the file but the sooner I start machinig it offsets the X,Y and Z position. Naturally before realizing it I've broken a coupple of inserts!!
I've tried without actually machining the stock even referring all to home, but there is no way  :(

Seems after I zeroed the axis the programs use machine coordinates (or something like).
The program generate Fanuc M11 code (besides others such as Siemens, Mazatrol, Mitsubishi, Heidenhain which Mach3 doe'nt like...)

I'm using Mach3 R3.042.020.
The code use G90 G57 G43 and G40 opcodes but I do not know if this is the problem.

This is the code:
%
O0001(TMEXLH CLIMB MM CYCLES =2)
(Tool cutting diameter = 15.5 mm - Fanuc 11M Controller.)
(Taper=1/32.0 dAlfa=22.5  Second Loop Teeth=3)
G90 G00 G57 X26.6439 Y26.6439
G43 H10 Z50. M3 S1848
Z-9.1109
G41 D60 X17.6283 Y17.6283
G02 X22.2026 Y0Z-8.8348I-31.6799 J-17.6283 F37
G02 X15.6935 Y-15.6935 Z-8.5587 I-22.1983 J0.0104 F123
G02 X0.0000 Y-22.1854 Z-8.2826 I-15.6831 J15.6978
G02 X-15.6813 Y-15.6813 Z-8.0065 I0.0104 J22.1811
G02 X-22.1681 Y0.0000 Z-7.7304 I15.6856 J15.6709
G02 X-15.6691 Y15.6691 Z-7.4543 I22.1638 J-0.0104
G02 X0.0000 Y22.1509 Z-7.1783 I15.6587 J-15.6734
G02 X15.6569 Y15.6569 Z-6.9022 I-0.0104 J-22.1466
G02 X22.1336 Y0.0000 Z-6.6261 I-15.6612 J-15.6465
G02 X17.5592 Y-17.6283 Z-6.3500 I-36.2543 J0
G00 G40 X26.5749 Y-26.6439
X36.4731 Y-26.4975
X26.4975 Y26.4975
Z-2.4848
G41 D60 X17.4819 Y17.4819
G02 X21.9956 Y0Z-2.2087I-31.5972 J-17.4819 F37
G02 X15.5471 Y-15.5471 Z-1.9326 I-21.9913 J0.0104 F123
G02 X0.0000 Y-21.9783 Z-1.6565 I-15.5367 J15.5514
G02 X-15.5349 Y-15.5349 Z-1.3804 I0.0104 J21.9740
G02 X-21.9611 Y0.0000 Z-1.1043 I15.5392 J15.5245
G02 X-15.5227 Y15.5227 Z-0.8283 I21.9567 J-0.0104
G02 X0.0000 Y21.9438 Z-0.5522 I15.5123 J-15.5270
G02 X15.5105 Y15.5105 Z-0.2761 I-0.0104 J-21.9395
G02 X21.9265 Y0.0000 Z0.0000 I-15.5148 J-15.5001
G02 X17.4128 Y-17.4819 Z0.2761 I-36.1109 J0
G00 G40 X26.4284 Y-26.4975
G90 G00 Z5.0000
M5
M30
%

Does anyone has any suggestion?

Thanks

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using Fanuc code with Mach3: problem...
« Reply #1 on: June 25, 2009, 03:32:24 AM »
It is using the G57 offset, change that line to have a G54 instead, either that or set your G57 offset up and see if that helps.
Hood
« Last Edit: June 25, 2009, 03:34:00 AM by Hood »

vmax549

*
Re: Using Fanuc code with Mach3: problem...
« Reply #2 on: June 25, 2009, 10:35:05 AM »
HOOD has it pegged(;-) THE g57 is causing a shift. IF you are centering over the hole and setting zero then change the line

G90 G00 G57 X26.6439 Y26.6439  ------ TO


G90 G00  X0.000 Y0.000   ------   or whatever value represents the center of the hole.

Just a thought, (;-) TP
Re: Using Fanuc code with Mach3: problem...
« Reply #3 on: June 25, 2009, 11:07:27 AM »
Thank you guys.


vmax549: thanks but this is an external thread so no hole, and wan't work since the instruction immediately after the G57 is a move of Z down which leads to a collosion even if top of the stock is 12.5 mm.

It also use offset and tangential move approchiang the stock, so seems to me it needs a G57 (or the like).



Hood: I'll give it a try and let you know.


It is a darn problem.
What is really happening is seems everything is fine on one side of the NTP taper (the right one) resulting in good threads but when approach the left one collides...
I've tried so many time with or better without the tool mounted and taking good care to set right tool diameter (or tried to vary it) in the Mach3 tool setting.

I do the taper on the very same machine and loading the thread code after the taper one: no way...

Anyway thanks

vmax549

*
Re: Using Fanuc code with Mach3: problem...
« Reply #4 on: June 25, 2009, 04:59:42 PM »
I ran your code here, it is NOT a complete npt thread as is it misses a large chunk of thread. BUT the code runs fine it follows the instruction exactly.

Just a thought, (;-) TP


OK Let me correct that statement it may be correct if you used a multi segment thread mill (;-)

(;-0 TP
« Last Edit: June 25, 2009, 11:13:47 PM by vmax549 »
Re: Using Fanuc code with Mach3: problem...
« Reply #5 on: June 29, 2009, 02:33:57 AM »
Thanks vmax549: it is a 6 teeth Vardex insert. The code is correct. On a different milling center (but with Fanuc controller...) and the very same tool naturally it works fine.


Hood I've changed the G57 to G54: is acting the same!!! the first line of code - even startig the program right away, even referring all to home, even trying to do anything I coul possibly think - changes the origin from 0,0 in X & Y to somethig else whch seems to be a machine coordinates (sometimes). Naturally this blow up everything since it thinks to have the taper in one position which it in not!

I start from the center of the upper face of the taper referring it as X & Y 0 and having set Z with the right height.
The program mistake something the code since it chages them...

I've tried to input one single G code per line but nothing is changing.

I'll try a candidate release (or older if I cn find it) relese just in case.


But is  there around a Fanuc translator just in case is somethng Mach3 doe'nt like from GCode written for Fanuc?

Thanx anyway guys.