Remap M6 no python HELP!!!!

More
27 Sep 2026 01:42 #349922 by Fastfred
Remap M6 no python HELP!!!! was created by Fastfred
 Ive been trying to figure this out on my own but I am not getting any luck, after using my 3d probe to find Z0 on work piece (down.ngc) then call for T5 M6 for example (tool_change.ngc) both move with no errors but the calculation is off at the moment after T5 touches off the tool setter tip of tool is below Z0 (123 block) but if i move past the 123 block the spindle nose will Z0 off the 123 block.When i calculated the 3dprobe length I touched off spindle nose off the block then used 3d probe to touch off the block to get it length, but the spindle nose distance is moving over to the tool length (I think) dont know what else to do.


 

File Attachment:

File Name: tool_change.ngc
File Size:6 KB


 

File Attachment:

File Name: down.ngc
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
27 Sep 2026 05:05 #349924 by Fastfred
Replied by Fastfred on topic Remap M6 no python HELP!!!!
so #5223 is being used in my remap,is it something that I config wrong in the remap or down.ngc ?

Please Log in or Create an account to join the conversation.

  • djdelorie
  • Away
  • Premium Member
  • Premium Member
More
27 Sep 2026 15:51 #349930 by djdelorie
Replied by djdelorie on topic Remap M6 no python HELP!!!!
I've got some general observations which you may or may not already know, and some specifics from my setup which does basically the same thing.  Note: I'm not an expert, I just spent a lot of time trying to wrap my head around how this all works ;-)

Remember that #5063 is in the current WCS coordinate system, NOT the machine coordinate system, and not always G54.  To get the machine Z, you need to undo this correctly. Also note that the current location after a probe hit is NOT the same as the location stored in #5061 et al.  The probe needs some time to stop, so it's always past the probe point when you read "current position".
As for probing for tool length, it turns out you don't need ANY of that.  All you have to do is probe the toolsetter, and offset the tool length by the amount the probe is off by, in a known coordinate system.  I dedicate G59.3 to be "where the toolsetter is" and, in G59.3, do this:
G38.2 Z-[#<retract>] F[#<slow>]                        (PRINT,trip switch very slowly )
( tool was measured with it's offset active, so we add the hit to the existing offset )
G10 L1 P[#<_selected_tool>] Z[#5403 + #5063]
G43 H[#<_selected_tool>]  ( load tool table data )
If you don't want to do that, you need to know the machine Z of the toolsetter (which you do) and do the math to undo the probe point (undo the WCS offset and tool offset), then set the tool length to be the offset from where you expected the toolsetter to be.
Remember that "machine Z" = "probe hit Z" + "WCS Z" + "tool offset Z" so you need to know which WCS and tool offset is in effect when you probe.  Yes, keeping track of which way to apply the offsets can be tricky.  Remember that offsets are always added to where you want, to get where the machine goes.  A longer tool as a more positive (usually "bigger") tool offset to move the spindle more in the +Z direction ("up").
Remember that you're not always in G54.  You can use #5220 to compute a parameter for the current WCS.  Your current WCS Z is #[ 5200 + #5220 * 20 + 3 ]
I use G70 and G72 to save and restore the machine's modal state during tool changes, so I don't mess up a running program by changing something important and not setting it back.
Also, you most certainly CAN probe the toolsetter with the 3d probe to calculate its length.  I do this all the time.  You just have to make sure the probe "hits" when either probe is tripped, as one will trip before the other but you don't know which.  You don't need to use the 3d probe's length in your tool length offset, the 3d probe is just another tool.  Reference off a known fixed location in machine space (your spindle_setter_z), not some other tool's arbitrary offset.  The 3d probe has its own tool offset when it's loaded, just like any other tool.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
27 Sep 2026 21:39 #349938 by Fastfred
Replied by Fastfred on topic Remap M6 no python HELP!!!!
 Thank You for you input, I copied and made a separate tool_change.ngc for testing this tool probe in G59.3 somehow I was able to get that to probe and go back to previous WCS but my measure is still off tool tip about 9.5mm below Z0. My question is do I remove #<tool_length> = [#<spindle_setter_z> - #<setter_touch_machine_z>]p, li { white-space: pre-wrap; }hr { height: 1px; border-width: 0; }li.unchecked::marker { content: "\2610"; }li.checked::marker { content: "\2612"; }and update ; Write the measured length to the selected tool-table entry.G10 L1 P#<selected_tool> Z#<tool_length>p, li { white-space: pre-wrap; }hr { height: 1px; border-width: 0; }li.unchecked::marker { content: "\2610"; }li.checked::marker { content: "\2612"; }with G10 L1 P[#<_selected_tool>] Z[#5403 + #5063]

just want to be clear
Thankyou


 

File Attachment:

File Name: tool_chang...9-27.ngc
File Size:7 KB
Attachments:

Please Log in or Create an account to join the conversation.

  • djdelorie
  • Away
  • Premium Member
  • Premium Member
More
27 Sep 2026 23:24 #349940 by djdelorie
Replied by djdelorie on topic Remap M6 no python HELP!!!!
In my script, with G59.3, after I do those three lines, the only other thing I do is a quick G43 (no H needed) to reload the just-modified table entry.

Please Log in or Create an account to join the conversation.

Time to create page: 0.102 seconds
Powered by Kunena Forum