[QtDragon] Auto Tool Measurement approach and UI wishes/issues

More
2 years 7 months ago #295480 by Odiug
My machine spindle has an ER11 collet, so manually changing tools will not ensure a consistent height. Therefore I wanted to have a mechanism to automatically measure the new tool length after each manual M6 tool change.

The attached remap code basically this
  • spindle moves to change position
  • operator manually changes tool and confirms in UI
  • spindle moves to toolsetter position
  • absolute position is probed and a reference position is subtracted
  • resulting tool length is set into tool table
  • tool length compensation is activated (G43)
My workflow should now look like this
  • preparation phase
    • load a tool with remapped M6 to get a proper tool length measurement
    • use tool to touch off workpiece and establish the correct Z height
  • running NC file
    • any M6 tool change will ask the operator to change the tool manually in the change position and after a tool length measurement the new tool length will be applied in the compensation

Wish: This seems to work so far when I manually enter the M6 T<tool> as MDI command. It would be more convenient to have an "M6 Tn" button additionally to the "M61 Qn" button.

Issue: In order to touch off Z0 on top of my work piece, I use a touch plate. Currently the only way to correctly do this is using PROBE (VersaProbe). Setting ADJ OFFSET -> SET Z to my touch plate height, enabling AUTO ZERO and using the probe down button.
However, when I use TOOL -> TOUCH PLATE the current tool length gets subtracted. Maybe it was not meant to be used that way.

Another wish: OFFSETS and PROBE both define workpiece heights and tool sensor heights. Both not needed with this approach. So, it would be nice if this would be configurable, maybe a separate tab for the different types of auto tool measurements.

For who made it so far, here the required settings in the INI to make the qt_simple_probe.ngc remap work.
Code:
# this remaps m6 to do auto probing after tool change #REMAP=M6 modalgroup=6 prolog=change_prolog ngc=qt_auto_probe_tool epilog=change_epilog REMAP=M6 modalgroup=6 prolog=change_prolog ngc=qt_simple_probe epilog=change_epilog
Code:
[CHANGE_POSITION] # Abs (G53) coordinates remap tool change point X = 100 Y = 245 Z = -1 [TOOLSETTER] X = 10 Y = 245 Z = -30 # how high to lift when moving to the tool setter Z_MAX_CLEAR = -1 # maximum probe distance MAX_PROBE_DISTANCE = 70 # reference tool Z position (e.g. empty spindle touching toolsetter) Z_REF = -96 SEARCH_VELOCITY = 300 BACKOFF_DISTANCE = 0.5 PROBE_VELOCITY = 5

Happy Probing
Guido
 

Please Log in to join the conversation.

More
2 years 7 months ago #295557 by cmorley
Well that's some good work.
If there are others that wish this option, I could add it to the master repository.

Qtdragon is made to be customized.
adding a button should be easy.

Please Log in to join the conversation.

More
2 years 7 months ago #295579 by Odiug
Well, I just used qt_auto_probe_tool.ngc as a starting point for the remap. The rest was trial and error and a combination of various auto tool measurement approaches found in this forum. It still has a lot of debug outputs, because I wanted to see the results of the calculations.
First, I wanted to use the example from G38 , but it misses the actual result in #5063. Can somebody confirm that the example is incomplete?

For my TOOL -> TOUCHPLATE issue, I see that this is a functionality from inside QtVcp, and not QtDragon specific. It cancels tool-length compensation when using the touchplate. I would have wished that the actual implementation of TOOL -> TOUCHPLATE would have been more "accessible". I had to dig through multiple layers until I found it. I had hoped for just an NGC file like the ones used for remap or macros. But I guess the checking and error handling prevents it from being implemented as an NGC script.
 

Please Log in to join the conversation.

More
2 years 7 months ago #295669 by cmorley
Try this to add a tool change button:

add this file (rename it qtdragon_handler.py) in your config file, in the folder qtvcp/screens/qtdragon
If anything goes wrong just remove that file and the original will be used again.

Please Log in to join the conversation.

More
2 years 7 months ago #295678 by Odiug
Yes! Thanks! That works pretty sweet!

I had seen that there are multiple ways to extend and modify screens like qtdragon, but I wasn't aware that you can add a button without editing the .ui file in QtDesigner.

I commented out the 'isManSensitive' as the other buttons are also not. However, after TOOL CHANGE the machine is in MDI mode. I haven't paid much attention to the modes. E.g. after a jog it's anyway back to Manual mode.

Is it possible to override /usr/lib/python3/dist-packages/qtvcp/lib/touchoff_subprogram.py in a similar way? I tried copying to <my_config_dir>/qtvcp/lib and editing it, but it did not work.

For my purpose I need to remove the G49. Then I can use the TOOL -> TOUCH PLATE to touchoff my workpiece. Otherwise the tool length got subtracted from the final result.
This is probably not an issue with the probe height + workpiece height approach for automated tool length measurement, as the tool lengths in the tool table stay zero there, as far as I understand.
But for anybody using a tool length from the tool table the TOOL -> TOUCH PLATE should not work as expected. Or I do not understand its purpose. Please explain, if I use it wrongly.

Please Log in to join the conversation.

More
2 years 7 months ago #295710 by cmorley
Ok I used dome black magic voodoo to patch an alternative touchoff_subroutine.py location.

same as before:
add (I guess overwrite the last one) this file (rename it qtdragon_handler.py) in your config file, in the folder qtvcp/screens/qtdragon
If anything goes wrong just remove that file and the original will be used again.

but now also copy  /usr/lib/python3/dist-packages/qtvcp/lib/touchoff_subprogram.py
into your config file, in the folder qtvcp/lib/
then modify that program as you see fit - remove the G49

Please test carefully.

Chris

Please Log in to join the conversation.

More
2 years 7 months ago #295786 by Odiug
Thanks Chris!
This works perfect for me. Now QtDragon is really usable for me. :-)

One thing: On some popups like "Do you want to Shutdown now?" or the tool change request, the main screen goes blurry. I guess it should put the emphasis on the popup, but on older machines that's an intense operation. The window flickers shortly where you see an empty window frame inbetween. So, I would rather like to have this configurable.

BTW, with "Shutdown", I always associate a "System Shutdown". I might have just called it "Quit?" with the buttons "Cancel", "Exit QtDragon", "System Shutdown". Or, even better, have it configurable. Currently, I wouldn't need a "System Shutdown", but others that might autostart QtDragon on a touch screen and only use it to control their machine, might not need an "Exit QtDragon".

Cheers
Guido

Please Log in to join the conversation.

More
2 years 7 months ago #295787 by cmorley
linuxcnc.org/docs/stable/html/gui/qtdragon.html#_stylesheets
shows you how to remove the blur affect. I should make it default actually.

Please Log in to join the conversation.

More
2 years 7 months ago #296641 by itsgudenuf
Just in case someone is running qtdragon_hd....

The extra button sounded nice to me, even with the stock qt_auto_probe_tool script.

I copied the file as qtdragon_handler.py to the <CONFIG>/qtvcp/screens/qtdragon_hd since I'm running qtdragon_hd.

It didn't work. I renamed the file to qtdragon_hd_handler.py and presto it works!

Thanks Chris!

Please Log in to join the conversation.

More
4 months 1 week ago #347142 by Buzzcut
I am trying to implement this on Ver. 2.9.8 and am having no luck. Touch off for Z height works correctly and first tool run is correct. On second tool z height is high above the work piece. Any help would be appropriated.

Please Log in to join the conversation.

Time to create page: 0.822 seconds
Powered by Kunena Forum