Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Coding with Dynamic Fixture Offset


KevinMSC
 Share

Recommended Posts

Hi,

We have recently added Dynamic Fixture Offset to our OKK VP600 machine and I am having trouble getting our code to work. I have tried going through our OKK distributor and MasterCam post distributor but as of now no one has known what the issue is. Whenever I run a code that has a G54.2 in it I get an error that says "Illegal command in the G43.4/G43.5" If I take the G54.2 line out the will run but then it is not accounting for the offset in G54.2. I posted a sample of our code below, Id appreciate it if anyone could take a look and see if they know what is missing or in the wrong place. 

Thank you.

 

(T8   - 0.2506 BULL-NOSED ENDMILL - H8   - D8   - D0.2502" - R0.0300")
(G10 G90 L21 P1 X-0.0000 Y-0.0000 Z-0.0000 B-0.000 C-0.000)
G00 G17 G20 G40 G80 G90
G54.2 P1 G53 Z0.
G91 G28 Z0.
G28 X0. Y0.
M79
M11
G90 A0. C0.
N1
(TOOLPATH - FINISH5)
(STOCK LEFT ON DRIVE SURFS = 0.)
T8 (0.2506 BULL-NOSED ENDMILL)
M06
G55 G17 G90
G00 A-90. C0.
G05 P10000
G43.4 H8 X0. Y-8.0332 Z5.425 S1762 M03
G94
Z1.525
G01 Z1.425 F13.66
G93 X-.0009 C2.111 F277.29
X-.0015 Z1.4251 C4.219 F279.54
X-.0018 C6.325 F281.46
Z1.4252 C8.425 F282.94
X-.0016 Z1.4253 C10.52 F285.35
X-.0013 C12.608 F286.69

Link to comment
Share on other sites

So I tried moving the G54.2 to right after the G55 and I still got the same error when it hit the G43.4 line. If I run the machine simulation on the Fanuc controller it will play through the entire thing without any errors...

Thanks for the replys.

G00 G17 G20 G40 G80 G90
G91 G28 Z0.
G28 X0. Y0.
M79
M11
G90 A0. C0.
N1
(TOOLPATH - FINISH5)
(STOCK LEFT ON DRIVE SURFS = 0.)
T8 (0.2506 BULL-NOSED ENDMILL)
M06
G55 G17 G90 
G54.2 P1

G00 A-90. C0.
G05 P10000
G43.4 H8 X0. Y-8.0332 Z5.425 S1762 M03
G94
Z1.525
G01 Z1.425 F13.66
G93 X-.0009 C2.111 F277.29

Link to comment
Share on other sites

Have your Mastercam and OKK dealer get a hold of Postability. We have work extensively with OKK USA and Postability to get these post dialed in.

Here is posted code for a different OKK.

O0000 (68.2-G43.4 PROGRAMMING_EXAMPLE)
(POSTABILITY 5-AXIS OKK VC-X500)
(HELP FROM 5TH AXIS CGI)
(MASTERCAM - 2019)
(MCX FILE  - C:\USERS\RON\DOCUMENTS\MY MCAM2019\PARTS\5TH AXIS CGI TESTPART.MCAM)
(POST      - MPPOSTABILITY_OKK_VC-X500.PST)
(PROGRAM   - 68.2 AND G43.2 WITH G54.2 PROGRAMMING_EXAMPLE.NC)
(DATE      - 2019.09.30)
(TIME      - 4:58 PM)
(T290 - 1/2 FLAT ENDMILL     - H290 - D290 - D0.5000")
(T179 - 1/2 DRILL            - H179 - D179 - D0.5000")
N100 (G10 G90 L21 P1 X-0.0000 Y-0.0000 Z-0.0000 B-0.000 C-0.000)
N110 G00 G17 G20 G40 G80 G90
N120 G54.2 P0 G53 Z0.
N130 G91 G28 Z0.
N140 G28 X0. Y0.
N150 M79
N160 M11
N170 G90 A0. C0.
N180 T290 (1/2 FLAT ENDMILL)
N190 M06
N200 G54 G17 G90
N210 G00 A0. C0.
N220 M78
N230 M10
N240 X-1.425 Y.7499 S1069 M03
N250 G54.2 P1
N260 G43 H290 Z10. T179
N270 G94
N280 G05 P10000
N290 Z.25
N300 Z.2
N310 G01 Z0. F6.42
N320 X1.175
N330 G02 Y.4499 I0. J-.15
N340 G01 X-1.175
N350 G03 Y.15 I0. J-.1499
N360 G01 X1.175
N370 G02 Y-.15 I0. J-.15
N380 G01 X-1.175
N390 G03 Y-.4499 I0. J-.15
N400 G01 X1.175
N410 G02 Y-.7499 I0. J-.15
N420 G01 X-1.425
N430 G00 Z.25
N440 Z10.
N450 G05 P0
N460 G54.2 P0 G53 Z0.
N470 G91 G28 Z0.
N480 G54 G90
N490 M79
N500 M11
N510 A-90. C-180.
N520 G68.2 X0. Y0. Z0. I0. J90. K0.
N530 G53.1
N540 M78
N550 M10
N560 X-1.425 Y-.1251
N570 G54.2 P1
N580 G43 H290 Z10.
N590 G05 P10000
N600 Z1.125
N610 Z1.075
N620 G01 Z.875
N630 X1.175
N640 G02 Y-.4251 I0. J-.15
N650 G01 X-1.175
N660 G03 Y-.725 I0. J-.1499
N670 G01 X1.175
N680 G02 Y-1.025 I0. J-.15
N690 G01 X-1.175
N700 G03 Y-1.3249 I0. J-.15
N710 G01 X1.175
N720 G02 Y-1.6249 I0. J-.15
N730 G01 X-1.425
N740 G00 Z1.125
N750 Z10.
N760 G05 P0
N770 G69
N780 G53.1
N790 G54.2 P0 G53 Z0.
N800 G91 G28 Z0.
N810 G54 G90
N820 M11
N830 A-90. C-90.
N840 G68.2 X0. Y0. Z0. I90. J90. K0.
N850 G53.1
N860 M10
N870 X-1.425 Y-.1251
N880 G54.2 P1
N890 G43 H290 Z10.
N900 G05 P10000
N910 Z1.125
N920 Z1.075
N930 G01 Z.875
N940 X1.175
N950 G02 Y-.4251 I0. J-.15
N960 G01 X-1.175
N970 G03 Y-.725 I0. J-.1499
N980 G01 X1.175
N990 G02 Y-1.025 I0. J-.15
N1000 G01 X-1.175
N1010 G03 Y-1.3249 I0. J-.15
N1020 G01 X1.175
N1030 G02 Y-1.6249 I0. J-.15
N1040 G01 X-1.425
N1050 G00 Z1.125
N1060 Z10.
N1070 G05 P0
N1080 G69
N1090 G53.1
N1100 G54.2 P0 G53 Z0.
N1110 G91 G28 Z0.
N1120 G54 G90
N1130 M11
N1140 A-90. C0.
N1150 G68.2 X0. Y0. Z0. I180. J90. K0.
N1160 G53.1
N1170 M10
N1180 X-1.425 Y-.1251
N1190 G54.2 P1
N1200 G43 H290 Z10.
N1210 G05 P10000
N1220 Z1.125
N1230 Z1.075
N1240 G01 Z.875
N1250 X1.175
N1260 G02 Y-.4251 I0. J-.15
N1270 G01 X-1.175
N1280 G03 Y-.725 I0. J-.1499
N1290 G01 X1.175
N1300 G02 Y-1.025 I0. J-.15
N1310 G01 X-1.175
N1320 G03 Y-1.3249 I0. J-.15
N1330 G01 X1.175
N1340 G02 Y-1.6249 I0. J-.15
N1350 G01 X-1.425
N1360 G00 Z1.125
N1370 Z10.
N1380 G05 P0
N1390 G69
N1400 G53.1
N1410 G54.2 P0 G53 Z0.
N1420 G91 G28 Z0.
N1430 G54 G90
N1440 M11
N1450 A-90. C90.
N1460 G68.2 X0. Y0. Z0. I270. J90. K0.
N1470 G53.1
N1480 M10
N1490 X-1.425 Y-.1251
N1500 G54.2 P1
N1510 G43 H290 Z10.
N1520 G05 P10000
N1530 Z1.125
N1540 Z1.075
N1550 G01 Z.875
N1560 X1.175
N1570 G02 Y-.4251 I0. J-.15
N1580 G01 X-1.175
N1590 G03 Y-.725 I0. J-.1499
N1600 G01 X1.175
N1610 G02 Y-1.025 I0. J-.15
N1620 G01 X-1.175
N1630 G03 Y-1.3249 I0. J-.15
N1640 G01 X1.175
N1650 G02 Y-1.6249 I0. J-.15
N1660 G01 X-1.425
N1670 G00 Z1.125
N1680 Z10.
N1690 G05 P0
N1700 M05
N1710 G69
N1720 G53.1
N1730 G54.2 P0 G53 Z0.
N1740 G91 G28 Z0.
N1750 G28 X0. Y0.
N1760 M79
N1770 M11
N1780 G28 A0. C0.
N1790 M01
N1800 T179 (1/2 DRILL)
N1810 M06
N1820 G54 G17 G90
N1830 G00 A-90. C90.
N1840 G68.2 X0. Y0. Z0. I270. J90. K0.
N1850 G53.1
N1860 M78
N1870 M10
N1880 X0. Y-.875 S2139 M03
N1890 G54.2 P1
N1900 G43 H179 Z10. T290
N1910 Z2.
N1920 G94
N1930 G98 G81 Z.375 R.975 F4.11
N1940 G80
N1950 Z10.
N1960 G69
N1970 G53.1
N1980 G54.2 P0 G53 Z0.
N1990 G91 G28 Z0.
N2000 G54 G90
N2010 M11
N2020 A-90. C0.
N2030 G68.2 X0. Y0. Z0. I180. J90. K0.
N2040 G53.1
N2050 M10
N2060 X0. Y-.875
N2070 G54.2 P1
N2080 G43 H179 Z10.
N2090 Z2.
N2100 G98 G81 Z.375 R.975 F4.11
N2110 G80
N2120 Z10.
N2130 G69
N2140 G53.1
N2150 G54.2 P0 G53 Z0.
N2160 G91 G28 Z0.
N2170 G54 G90
N2180 M11
N2190 A-90. C-90.
N2200 G68.2 X0. Y0. Z0. I90. J90. K0.
N2210 G53.1
N2220 M10
N2230 X0. Y-.875
N2240 G54.2 P1
N2250 G43 H179 Z10.
N2260 Z2.
N2270 G98 G81 Z.375 R.975 F4.11
N2280 G80
N2290 Z10.
N2300 G69
N2310 G53.1
N2320 G54.2 P0 G53 Z0.
N2330 G91 G28 Z0.
N2340 G54 G90
N2350 M11
N2360 A-90. C-180.
N2370 G68.2 X0. Y0. Z0. I0. J90. K0.
N2380 G53.1
N2390 M10
N2400 X0. Y-.875
N2410 G54.2 P1
N2420 G43 H179 Z10.
N2430 Z2.
N2440 G98 G81 Z.375 R.975 F4.11
N2450 G80
N2460 Z10.
N2470 G69
N2480 G53.1
N2490 G54.2 P0 G53 Z0.
N2500 G91 G28 Z0.
N2510 G54 G90
N2520 M79
N2530 M11
N2540 A0. C0.
N2550 M78
N2560 M10
N2570 X0. Y0.
N2580 G54.2 P1
N2590 G43 H179 Z10.
N2600 Z.25
N2610 G98 G81 Z-.5 R.1 F4.11
N2620 G80
N2630 Z10.
N2640 M05
N2650 G54.2 P0 G53 Z0.
N2660 G91 G28 Z0.
N2670 G28 X0. Y0.
N2680 M79
N2690 M11
N2700 G28 A0. C0.
N2710 M01
N2720 T290 (1/2 FLAT ENDMILL)
N2730 M06
N2740 G54 G17 G90
N2750 G00 A-81.279 C147.529
N2760 G43.4 H290 X.2684 Y-7.9715 Z6.4449 S2139 M03
N2770 G94
N2780 G05 P10000
N2790 Z2.5449
N2800 G01 Z2.4449 F15.
N2810 G93 Y-7.9446 Z2.6892 A-79.58 F500.12
N2820 Y-7.9103 Z2.9341 A-77.881 F500.12
N2830 Y-7.8707 Z3.1735 A-76.224 F500.24
N2840 Y-7.8238 Z3.413 A-74.567 F500.24
N2850 Y-7.7729 Z3.6456 A-72.961 F500.15
N2860 Y-7.715 Z3.8779 A-71.356 F500.15
N2870 Y-7.6544 Z4.1022 A-69.808 F500.04
N2880 Y-7.5872 Z4.3259 A-68.26 F500.04
N2890 Y-7.444 Z4.7546 A-65.293 F250.09
N2900 Y-7.2886 Z5.1629 A-62.46 F250.
N2910 Y-7.1243 Z5.5501 A-59.767 F250.05
N2920 Y-6.954 Z5.9161 A-57.214 F250.12
N2930 Y-6.7802 Z6.2614 A-54.799 F250.1
N2940 Y-6.6052 Z6.587 A-52.519 F250.09
N2950 Y-6.4305 Z6.8939 A-50.37 F249.94
N2960 Y-6.2578 Z7.183 A-48.347 F250.08
N2970 Y-6.0883 Z7.4558 A-46.444 F250.11
N2980 Y-5.9226 Z7.7135 A-44.653 F250.01
N2990 Y-5.7615 Z7.9574 A-42.969 F250.03
N3000 Y-5.6054 Z8.1887 A-41.385 F250.01
N3010 Y-5.4546 Z8.4084 A-39.894 F250.01
N3020 Y-5.3807 Z8.5151 A-39.177 F496.38
N3030 X.2455 Y-5.298 Z8.5579 A-38.28 C150.592 F250.06
N3040 X.2204 Y-5.2207 Z8.5975 A-37.448 C153.851 F250.12
N3050 X.1929 Y-5.1502 Z8.6333 A-36.694 C157.303 F250.08
N3060 X.1633 Y-5.088 Z8.6647 A-36.032 C160.938 F250.02
N3070 X.1316 Y-5.0356 Z8.6909 A-35.475 C164.739 F250.09
N3080 X.0981 Y-4.9941 Z8.7115 A-35.035 C168.684 F250.
N3090 X.0632 Y-4.9647 Z8.7261 A-34.724 C172.74 F250.05
N3100 X.0273 Y-4.948 Z8.7343 A-34.548 C176.869 F250.12
N3110 X-.009 Y-4.9447 Z8.7359 A-34.513 C181.031 F250.1
N3120 X-.0452 Y-4.9546 Z8.731 A-34.618 C185.183 F250.09
N3130 X-.0807 Y-4.9777 Z8.7196 A-34.862 C189.283 F249.94
N3140 X-.1149 Y-5.0132 Z8.702 A-35.238 C193.287 F250.08
N3150 X-.1475 Y-5.0603 Z8.6786 A-35.737 C197.163 F250.11
N3160 X-.1782 Y-5.1177 Z8.6498 A-36.347 C200.885 F250.01
N3170 X-.2068 Y-5.1842 Z8.6161 A-37.057 C204.432 F250.03
N3180 X-.2331 Y-5.2582 Z8.5783 A-37.852 C207.79 F250.01
N3190 X-.2572 Y-5.3384 Z8.537 A-38.718 C210.953 F250.01
N3200 X-.2684 Y-5.3807 Z8.5151 A-39.177 C212.471 F496.38
N3210 Y-5.5287 Z8.3008 A-40.622 F250.06
N3220 Y-5.6821 Z8.0755 A-42.158 F250.12
N3230 Y-5.8407 Z7.8382 A-43.791 F250.08
N3240 Y-6.0041 Z7.5876 A-45.527 F250.02
N3250 Y-6.1718 Z7.3226 A-47.372 F250.09
N3260 Y-6.3431 Z7.0418 A-49.334 F250.
N3270 Y-6.5169 Z6.7441 A-51.419 F250.05
N3280 Y-6.6919 Z6.4282 A-53.631 F250.12
N3290 Y-6.8666 Z6.093 A-55.977 F250.1
N3300 Y-7.0389 Z5.7374 A-58.461 F250.09
N3310 Y-7.2067 Z5.3608 A-61.085 F249.94
N3320 Y-7.3669 Z4.9632 A-63.847 F250.08
N3330 Y-7.5167 Z4.5447 A-66.746 F250.11
N3340 Y-7.5878 Z4.3258 A-68.263 F500.02
N3350 Y-7.6527 Z4.1062 A-69.779 F500.02
N3360 Y-7.7155 Z3.878 A-71.356 F500.06
N3370 Y-7.7715 Z3.6495 A-72.933 F500.06
N3380 Y-7.8241 Z3.4133 A-74.566 F500.03
N3390 Y-7.8697 Z3.1771 A-76.199 F500.03
N3400 Y-7.9105 Z2.9345 A-77.878 F500.03
N3410 Y-7.944 Z2.6923 A-79.558 F500.03
N3420 Y-7.9715 Z2.4449 A-81.279 F496.38
N3430 G00 Z2.5449
N3440 Z6.4449
N3450 G05 P0
N3460 M05
N3470 G91 G28 Z0.
N3480 G28 X0. Y0.
N3490 M79
N3500 M11
N3510 A0.
N3520 C0.
N3530 M78
N3540 M10
N3550 M30
%

 

  • Like 1
Link to comment
Share on other sites

I believe that Zack (Zoffen) is correct. I don't think G54.2 works with G43.4 or G43.5.

I think G54.2 only works with G43 or G43.1. (Most people just use it with G43).

The G54.2 allows you to treat your Work Offset point as the "Zero" point, regardless of tool position.

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

For DWO, I always do this:

  • Safety Line
  • Tool Change
  • Safe Z Retract (only G53, never G91 G28!!!!)
  • Position to Initial (Reference) Work Offset (G54, G55, G56, etc.)
  • Position to Reference Z Position, while turning on TLO (G00 G43 H#3026 Z2.)
  • (You must call Initial REF Work Offset, and position tool Relative to it, before turning on DWO.)
  • Now, Safe Retract (G00 G90 G53 Z0.)
  • Position Rotaries (A/C, B/C) (G00 G90 A38. C108.)
  • (NOTE: Rotaries must be moved, before DWO is activated, but after REF Work Offset, and XYZ position (with TLO) is set.)
  • (NOTE: Rotary Address Labels must follow ANSI standard label descriptions, I.E.: A-on-X, B-on-Y, C-on-Z)
  • Call DWO (G54.2) (On Haas, G254)
  • Move to XY Positon on a Separate Line (Typically to X0. Y0.) G00 X0. Y0. 
  • Move to Z Position on Second Line (Do not call TLO again, just restate safe Z Position) Z2.
  • Cut at DWO Location...
  • Cut...
  • Cut...
  • Safe Retract Z (G00 G90 G53 Z0.)
  • Rotate to new Rotary Position (A-70. C15.)
  • Call Safe XY (G00 X0. Y0.)
  • Call Safe Z (Z2.)
  • Cut at DWO Location
  • Cut..
  • Cut..
  • Safe Retract Z (G00 G90 G53 Z0.)
  • Rotate to new position (A60. C270.)
  • Call Safe XY
  • Call Safe Z
  • Cut
  • Finally, Cancel DWO (G255 on Haas)

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

As Zack said, you can use G43.4 with G54.4 (WSEC), but not DWO.

  • Like 2
Link to comment
Share on other sites

I'm running a Kitamura 5 axis with a Fanuc 16i-MB control.  I use dynamic fixture offsets for all 3 axis toolpaths and TCP for 5 axis paths.   I've got the post outputting the correct one based on the toolpath type.

 

Code for 5 axis paths

T4 M06
G55 G17 G90 G40 G49 G80
G05.1 Q0
G990 Q0
G0 A0. C0.
G0 X-.74992 Y-3.28216 S6000 M03
G43.4 H4 Z6.

 

Code for 3 axis paths

T42 M06
G17 G90 G40 G49 G80
G05.1 Q0
G990 Q0
M1154     
G54
G54.2 P1
G0 A0. C0.
S8000 M03
G0 X9.26378 Y-2.16535 A0. C0.
G43 H42 Z2.98819
 

The M1154 is one of two custom M codes calling a program that does a G10 parameter write.  We use one before drilling and the other before milling.  It was created before I started running this machine so I don't really know what it is doing or if it has anything to do with dynamic fixture offset.  I don't see it outputting in the 5 axis code making me think it has something to do with the dynamic fixture offset.

Code for custom M code used before drilling

G10 L50
N19600 R00100000
G11

Code for custom M code used before drilling

G10 L50
N19600 R00100100
G11

 

 

Link to comment
Share on other sites

Thanks for all the replys its all super helpful info. So what I have gathered so far is this... Rotary Dynamic Fixture Offset (G52.2) is used for 3+2 axis work and it can not be combined with G43.4 (TPC) but it can be combined with Tilted Work Plane Comp (G68.2). In order to use simultaneous 5 axis machining we would use Workpiece setting error comp (G54.4) and this can be used combined with G43.4 (TCP). So all of this has raised a few more questions about setting up the work piece and translating our Mastercam WCS to the machine. For Rotary Dynamic Offset and work piece error compensation I was under the impression that we would set our G54 to the true machine center of rotation for X Y Z (we have a trunnion table). Then for the fixture offsets we will set those to where the part is located on the table which is not at the center of rotation. Then in Mastercam I can put my WCS on the model that corresponds to where I set the offset of either G54.2 or G54.4 depending on our operations. I attached some pictures of our 2 offset screens on our Fanuc controller. 

Thanks again for all the help!

PA010634.thumb.JPG.db247bef5fb6a26599b897be7257df42.JPGPA010635.thumb.JPG.f145e211ee578282364ef14f464e0d4f.JPG).

Link to comment
Share on other sites

With all of these options G68.2 and G43.4 and G54.2 and G54.4 the idea behind all of these is you don't need to program for center of rotation. You program your part in Mastercam like any 3 Axis machine expect you don't need to rotate your part to get to all the different sides the machine does all of that from the code posted. Your post outputs the code needed from the Work Offset Position programmed and the programmer calls it a day programming wise. The Machinist/Setup Person goes to the machine and picks up the part like they would any 3 axis machine and then run the program. As they run the program and want to adjust or fine tune specific areas then they can use the G54.2 or G54.4 not toughing the Base Work offset. If they have a Feature that has a .001 True position. Then can cut it small or big depending on the feature and measure it and see exactly where it is. Then they would adjust the G54.2 or G54.4 to dial that section in, but not move the complete work offset.   

G54-G59 and G54.1 P1 to P300 are standard workoffsets. G54.2 and G54.4 are fine adjustments to them. Hopefully that makes sense. 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...