Hello Guest it is October 21, 2021, 08:36:11 AM

Author Topic: G43 moving spindle down before moving to correct Z location  (Read 1026 times)

0 Members and 1 Guest are viewing this topic.

Offline Bob49

*
  •  57 57
    • View Profile
G43 moving spindle down before moving to correct Z location
« on: September 08, 2018, 02:14:45 PM »
Had this problem for some time, enough to stop doing tool changes.  But i need to fix whatever is wrong and get back to programmed tool changes.  I'm running Mach4 V4.2.0.3233 and an ESS.  I've moved to BT30 tool holders in my spindle on a vertical mill, but do manual tool changes.  I'm using the unmodified M06 macro and that seems to work as it should, I program x, y and z moves to move the spindle up and over for tool changes, not relying on movement via the M06 macro.  I have T set as tool in use in Mach options and tool changes go as expected. I also have a fully populated tool catalog with all the proper lengths for all my tools as measured by my off line tool pre-setter.  Once the G43 has moved the spindle to the height as specified by the tool heights in the tool catalog, they are all positioned correctly.

However, after the tool change via M06 and hitting cycle start to signify the tool has been changed, the G43 causes a rapid downward movement to near my current Z0, then quickly back up to accomplish the tool height change.  This occurs whether the new tool is longer or shorter than the last.  This does not happen when all this same code is keyed in the mdi and ran from there, the only movement from that is to shift the spindle up or down according to the change in tool height from the previous tool.

Today, I'm so spooked by programmed tool changes, I'm probably taking them out again so I can cut parts.  But this ought to be solvable I'd think.  I have come to the conclusion it's not related to the M06 macro or any lines of code prior the G43.  My G43's are always the same format...G43 Zx.x Hx, they are always added by my programming software, most always follow an x-y move, but lately I've been moving the G43 prior to those moves to avoid the cutter rapiding into my part.  And yes it will do that for every tool change unless I take some action, mostly adding in a x or y move to get the part and vise shifted out of harms way.  Moving the z up higher doesn't help.  Just seems to give it more time to accelerate into the part.

Hopefully this descriptions clear enough for a good understanding of my problem and hopefully too, someone has seen and conquered this problem.  I can share whatever might be helpful if requested.

Regards
Bob
Re: G43 moving spindle down before moving to correct Z location
« Reply #1 on: September 08, 2018, 02:45:32 PM »
Bob,
It sounds like your new G43 Tool Height Offset is being applied after a Z move down.
Be sure that your new G43 is being applied before a Z Move after the tool change.  

Post a snippet of code.  Below is a snippet of some code that I know works properly and doesn't have a dangerous Z dive before the new G43 is applied.
As you will see.  It has a Z move on the same line as the G43 and not before it.
This is from Fusion 360
(DRILL1 2)
T15 M6
(3/16 SPOT DRILL)
S5000 M3
G54
M7
G0 X-2.5 Y0.3125
G43 Z0.6 H15               (*** G43 Line ***)
Z0.2
G98 G81 X-2.5 Y0.3125 Z-0.05 R0.2 F15.
Y-0.3125
G80
Z0.6
M5M9
G28 G91 Z0.
G90

(DRILL2 2)
M1
T21 M6
(.257 DRILL F)
S1600 M3
G54
M7
G0 X-2.5 Y-0.3125
G43 Z0.6 H21               (*** G43 Line ***)
Z0.2
G73 X-2.5 Y-0.3125 Z-0.397 R0.2 Q0.125 F5.6
Y0.3125
G80
Z0.6
M5M9
G28 G91 Z0.
G90

Chad Byrd

Offline Bob49

*
  •  57 57
    • View Profile
Re: G43 moving spindle down before moving to correct Z location
« Reply #2 on: September 08, 2018, 03:35:17 PM »
HI Chad,

Thanks for the response.  Been out testing things both in the MDI and via program control.  But I wrote a short tool change program in my editor on the mill control pc.  Worked up my nerve and ran it, it worked as it should.  Below is the program of the problem G43's.  It was written in catia, posted with a Fanuc 16b post processor using ICAM_INCH.pptable.  I move the head up to give me room to change tools, they get longer as the program progresses.  Been thinking of doing that Z move in my M06 macro instead.

%
O1000
N1 G49 G80 G40 G90 G94 G17 G98
N2 G20
( TOOL: T24 1/2" END MILL-SHORT )
N3 T24 M6
N5 Z4.0
( OPERATION: MILL PROFILE COMPLETE )
N6 G43 Z4. H24
N7 G0 X1.2437 Y-.5006 S1600 M3
N8 G1 Z-.6 F20. M07
N9 G3 X.85 Y-.1069 I-.3937 J0 F4.8
N10 G2 X.6586 Y1.7875 I0 J.9569
N11 G1 X2.1283 Y2.0875
N12 G2 X2.3993 Y2.1035 I.1914 J-.9375
N13 G1 X5.9924 Y1.8035
N14 G2 X5.9127 Y-.1069 I-.0797 J-.9535
N15 G1 X.85
N16 G3 X.4563 Y-.5006 I0 J-.3937
N17 G0 X1.2437 Y-.4906
N18 G3 X.85 Y-.0969 I-.3937 J0
N19 G2 X.6606 Y1.7777 I0 J.9469
N20 G1 X2.1303 Y2.0777
N21 G2 X2.3985 Y2.0936 I.1894 J-.9277
N22 G1 X5.9915 Y1.7936
N23 G2 X5.9127 Y-.0969 I-.0788 J-.9436
N24 G1 X.85
N25 G2 X.6606 Y1.7777 I0 J.9469
N26 G1 X2.1303 Y2.0777
N27 G2 X2.3985 Y2.0936 I.1894 J-.9277
N28 G1 X5.9915 Y1.7936
N29 G2 X5.9127 Y-.0969 I-.0788 J-.9436
N30 G1 X.85
N31 G3 X.4563 Y-.4906 I0 J-.3937
N32 G1 Z.4 F80.
N33 M05
N34 M09
( OPERATION: POINT TO POINT .1 )
N35 G0 Z4.
N36 X0 Y0
( TOOL: T3 82 DEG CHAMFER MILL D 0.5 )
N37 T3 M6
( OPERATION: PROFILE CONTOURING.2 )
N40 G43 Z4. H3
N41 X1.2437 Y-.3147 S1600 M3
N42 G1 Z-.125 F20. M07
N43 G3 X.85 Y.079 I-.3937 J0 F9.6
N44 G2 X.6958 Y1.6054 I0 J.771
N45 G1 X2.1655 Y1.9054
N46 G2 X2.3838 Y1.9183 I.1542 J-.7554
N47 G1 X5.9769 Y1.6183
N48 G2 X5.9127 Y.079 I-.0642 J-.7683
N49 G1 X.85
N50 G3 X.4563 Y-.3147 I0 J-.3937
N51 G0 X1.2437 Y-.3047
N52 G3 X.85 Y.089 I-.3937 J0
N53 G2 X.6978 Y1.5956 I0 J.761
N54 G1 X2.1675 Y1.8956
N55 G2 X2.383 Y1.9084 I.1522 J-.7456
N56 G1 X5.9761 Y1.6084
N57 G2 X5.9127 Y.089 I-.0634 J-.7584
N58 G1 X.85
N59 G2 X.6978 Y1.5956 I0 J.761
N60 G1 X2.1675 Y1.8956
N61 G2 X2.383 Y1.9084 I.1522 J-.7456
N62 G1 X5.9761 Y1.6084
N63 G2 X5.9127 Y.089 I-.0634 J-.7584
N64 G1 X.85
N65 G3 X.4563 Y-.3047 I0 J-.3937
N66 G1 Z.875 F80.
N67 M05
N68 M09
( OPERATION: POINT TO POINT .4 )
N69 G0 Z4.
N70 X0 Y0
N71 M30
%


Regards
Bob
« Last Edit: September 08, 2018, 03:39:36 PM by Bob49 »
Re: G43 moving spindle down before moving to correct Z location
« Reply #3 on: September 08, 2018, 03:47:16 PM »
Bob,

( TOOL: T24 1/2" END MILL-SHORT )
N3 T24 M6
N5 Z4.0           *******************************First z move with new tool.***
( OPERATION: MILL PROFILE COMPLETE )
N6 G43 Z4. H24  *********************G43 Applied to T24

Right here it looks like it will do something funny.  Your first Z Move is after the tool change and before the G43 is applied to T24.
Does this occur when you change to T3?  The code suggests that it will run as expected at T3.   Your Z4. move is on the G43 line, so it should be fine.
Chad Byrd

Offline Bob49

*
  •  57 57
    • View Profile
Re: G43 moving spindle down before moving to correct Z location
« Reply #4 on: September 08, 2018, 03:56:01 PM »
That's a good point and probably 100% the culprit.  I just did modify my M06 macro and am testing it, liking the results.  So those programmed moves are probably going away.  Got a kids soccer game to get to, but I'll modify the program when I get back and see what happens.

Thanks Chad

Regards
Bob
Re: G43 moving spindle down before moving to correct Z location
« Reply #5 on: September 08, 2018, 04:02:36 PM »
No problem.  I did the same thing on a lathe, modified the M6 to move the Z and X to a safe Machine Position.  G30 is also an option.  Check it out if you have time.  But note in the manual, I think the Registers are wrong in the G30 table, but are correct if you search G30 variables at the bottom of the manual.
I'm going to use it for a machine in the shop, I'm tired of the Z Moving all the way up for a tool change when I just need it to go up about 6-8 Inches.
Chad Byrd

Offline Bob49

*
  •  57 57
    • View Profile
Re: G43 moving spindle down before moving to correct Z location
« Reply #6 on: September 08, 2018, 11:25:38 PM »
After getting things working by either moving or removing z moves before or after the tool change M06 statements, I messed with the Z position in the M06 macro.  Ended up setting it to -4.00", added in an M09 and an M05 so I don't have to manually add those in my programming.  Makes programming much simpler.

Thanks again for the help.
Regards
Bob

Offline Graham Waterworth

*
  • *
  •  2,393 2,393
  • Yorkshire Dales, England
    • View Profile
Re: G43 moving spindle down before moving to correct Z location
« Reply #7 on: September 12, 2018, 08:08:35 PM »
That is not a good post, in most cases you would move X&Y to a safe start point and then do your first Z move e.g.

N1 (END MILL)
T24 M6
G00 G90 X1. Y2. S1600 M3
G43 Z4. H24
Z0
G01 Etc.

or like this :-

N1 (END MILL)
T24 M6
G00 G90 G43 X1. Y2. Z4. H24 S1600 M3
Z0
G01 Etc.

Ether way is much safer because the tool offset is active before it is above the work, a long tool could hit the job the way you have it now.

Without engineers the world stops

Offline Bob49

*
  •  57 57
    • View Profile
Re: G43 moving spindle down before moving to correct Z location
« Reply #8 on: September 12, 2018, 09:42:15 PM »
Thanks for the explanation Graham.  I had been using a point to point move to set up the tool change.  It was my placement in the operations that was giving me some grief.  I've moved that point to point to the end of the operations prior to a tool change.  It drives Z up first, then moves in X and Y to a safe tool change position. 

That and the added movement coming from my new M06 gets the mill up in the air now much better than before.  There still are some odd things being output in my programs I haven't figured out how to drive tehm as I program the jobs.  Sometime my G43 Z value will be barely above the part.  I've been editing those manually, but I need to figure out a better process to have them computed correctly.  I got some ideas, just no programming to do at the moment to test them.

Today I spent the entire day running the mill, more of that coming later in the week.  So lots of opportunity to see how this all works out. 

Regards
Bob