Hello Guest it is May 29, 2024, 05:47:12 AM

Author Topic: Tool radius compensation for Mach3 DONE  (Read 2867 times)

0 Members and 1 Guest are viewing this topic.

Tool radius compensation for Mach3 DONE
« on: September 15, 2009, 01:48:05 PM »

Recently I got a job for making a very special lathe for a client. I did it with Mach3. But my client uses existent FANUC machine code that already have the tool radius compensation. No CAM was allowed in between. I had two choices:
1) Quit the job
2) Make an application that "translates" non compensated code to compensated code and Mxx and G72 G74 among others instructions fully compatible with mach3

I did the program and the machine. This software is working every day.
I do not know if there is interest for users or for even Mach personal. If a good number of users have interest, I can make a sample version cropped in some manner to test.

Where goes a sample of a translation (G72 and others macros were calculated to simple movements. Also the tool compensation was taken in account):

Code: [Select]
(Generated by FastPostProcessor - Mastor, Lda)
(Version0.55 Build 22082009)
(Sat Aug 22 17:18:26 2009)
G21 G90 G95
M16                               ( Vacuum start )
M80                              ( Coolant start )
G95 M4 S1107 (emulated speed)
G00 X115 Z2.8
G01 X113.4 Z0.8 F0.7
G01 X85 Z0.8 F0.091
G00 X85 Z5.8
G95 M4 S1160 (emulated speed)
G00 X109.717 Z2.1414
G00 X110.116 Z1.8
G01 X110.116 Z1.0271 F0.091
G01 X111.41 Z-1.3168 F0.084
G03 X111.307 Z-1.5114 R0.2 F0.084
G01 X109.707 Z-2.3114 F0.084
G02 X109.211 Z-2.0007 R0.2 F0.084
G01 X109.943 Z-1.7707 F0.084
G03 X110.439 Z-1.7986 R0.2 F0.084
G01 X112.039 Z-2.5986 F0.084
G03 X112.156 Z-2.74 R0.2 F0.084
G01 X112.156 Z-5.48 F0.084
G03 X112.039 Z-5.6214 R0.2 F0.084
G01 X110.439 Z-6.4214 F0.084
G03 X109.943 Z-6.4493 R0.2 F0.084
G01 X109.211 Z-6.2193 F0.084
G02 X109.707 Z-5.9086 R0.2 F0.084
G01 X111.307 Z-6.7086 F0.084
G03 X111.407 Z-6.9077 R0.2 F0.084
G01 X110.116 Z-9.0495 F0.084
G01 X110.116 Z-9.17 F0.084
G00 X113.756 Z-9.17
G00 X113.756 Z2
G00 X107.116 Z1.8114
G01 X107.116 Z1.0271 F0.084
G01 X108.41 Z-1.3168 F0.084
G03 X108.307 Z-1.5114 R0.2 F0.084
G01 X106.707 Z-2.3114 F0.084
G02 X106.211 Z-2.0007 R0.2 F0.084
G01 X106.943 Z-1.7707 F0.084
G03 X107.439 Z-1.7986 R0.2 F0.084
G01 X109.039 Z-2.5986 F0.084
G03 X109.156 Z-2.74 R0.2 F0.084
G01 X109.156 Z-5.48 F0.084
G03 X109.039 Z-5.6214 R0.2 F0.084
G01 X107.439 Z-6.4214 F0.084
G03 X106.943 Z-6.4493 R0.2 F0.084
G01 X106.211 Z-6.2193 F0.084
G02 X106.707 Z-5.9086 R0.2 F0.084
G01 X108.307 Z-6.7086 F0.084
G03 X108.407 Z-6.9077 R0.2 F0.084
G01 X107.116 Z-9.0495 F0.084
G01 X107.116 Z-9.17 F0.084
G00 X110.756 Z-9.17
G00 X110.756 Z2
G00 X104.116 Z1.8114
G01 X104.116 Z1.0271 F0.084
G01 X105.41 Z-1.3168 F0.084
G03 X105.307 Z-1.5114 R0.2 F0.084
G01 X103.707 Z-2.3114 F0.084
G02 X103.211 Z-2.0007 R0.2 F0.084
G01 X103.943 Z-1.7707 F0.084
G03 X104.439 Z-1.7986 R0.2 F0.084
G01 X106.039 Z-2.5986 F0.084
G03 X106.156 Z-2.74 R0.2 F0.084
G01 X106.156 Z-5.48 F0.084
G03 X106.039 Z-5.6214 R0.2 F0.084
G01 X104.439 Z-6.4214 F0.084
G03 X103.943 Z-6.4493 R0.2 F0.084
G01 X103.211 Z-6.2193 F0.084
G02 X103.707 Z-5.9086 R0.2 F0.084
G01 X105.307 Z-6.7086 F0.084
G03 X105.407 Z-6.9077 R0.2 F0.084
G01 X104.116 Z-9.0495 F0.084
G01 X104.116 Z-9.17 F0.084
G00 X107.756 Z-9.17
G00 X107.756 Z2
G95 M4 S1475 (emulated speed)
G00 X92.2828 Z2.8586
G01 X90.9656 Z2.2 F0.084
G01 X87.3016 Z2.2 F0.084
G02 X85.936 Z2 R0.2 F0.084
G01 X85.936 Z-2.055 F0.084
G02 X85.9526 Z-2.1119 R0.2 F0.084
G01 X86.79 Z-3.5219 F0.084
G01 X86.79 Z-4.6971 F0.084
G01 X85.9526 Z-6.1081 F0.084
G02 X85.936 Z-6.165 R0.2 F0.084
G01 X85.936 Z-9.17 F0.084
G00 X84.336 Z-9.17
G00 X84.336 Z2.2
G00 X87.936 Z2.02
G01 X87.936 Z-2.055 F0.084
G02 X87.9526 Z-2.1119 R0.2 F0.084
G01 X88.79 Z-3.5219 F0.084
G01 X88.79 Z-4.6971 F0.084
G01 X87.9526 Z-6.1081 F0.084
G02 X87.936 Z-6.165 R0.2 F0.084
G01 X87.936 Z-9.17 F0.084
G00 X86.336 Z-9.17
G00 X86.336 Z2.2
M01            ( optional stop finishFeedrate!=0 )
G00 X91.936 Z2.0133
G01 X91.936 Z-2.055 F0.084
G02 X91.9526 Z-2.1119 R0.2 F0.084
G01 X92.79 Z-3.5219 F0.084
G01 X92.79 Z-4.6971 F0.084
G01 X91.9526 Z-6.1081 F0.084
G02 X91.936 Z-6.165 R0.2 F0.084
G01 X91.936 Z-9.17 F0.084
G00 X90.336 Z-9.17
G00 X90.336 Z2.2
M17                                ( Vacuum stop )
G95 M4 S738 (emulated speed)
G00 X107.756 Z2.2
G00 X107.756 Z-8.22
G01 X90.336 Z-8.22 F0.175
G00 X107.756 Z-8.22
G00 X107.756 Z15
G92 Z24.57                          (AutoOffset Z)
( End main program preparation ------------------)
M81                               ( coolant stop )
M05                               ( spindle stop )
T0303                      ( ready for next piece )
M30 ( Program end and rewind --------------------)