QtDragonHD tool sensor help for a maker space

31 Dec 2023 20:10 #289445 by cmorley
Last night I tried the disabled tool probing and it works but I dare say it doesn't set the tool table properly - the number seems way too high.

I was looking for examples to go by eg:

Seems it common to reference from spindle face or from tool end.
Spindle face seems better.
I would guess then that one would need to know the distance in g53 for the spindle face to toolsetter - toolsetter height.
Then the difference between that and the touch off with a tool would be tool length.

roughly this is what I got (there is code before this to offset by radius for large tools)
            cmdList.append('G91 ')
            # should start spindle in proper direction/speed here..
            cmdList.append('G1 X{}'.format(Xoffset))
            cmdList.append('G38.2 Z-{} F{}'.format(self.data_ts_max,self.data_search_vel))
            cmdList.append('G1 Z{} F{}'.format(self.data_latch_return_dist, self.data_rapid_vel))
            cmdList.append('G38.2 Z-{}'.format(self.data_latch_return_dist*1.2))
            cmdList.append('G1 Z{} F{}'.format(self.data_z_clearance, self.data_rapid_vel))
            cmdList.append('G1 X{}'.format(-Xoffset))
            cmdList.append('#<touch_result> = #5063')
            cmdList.append('G10 L1 P{}  Z[#<touch_result> -{}]'.format(
Z[#<touch_result> - tool_probe_height + tool_block_height doesn't seem right.


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

31 Dec 2023 20:47 #289448 by warwickben
Yeah normally you set it to tool zero probe the spindle on the tool setter .

Then every other tool comp is based off the location the spindle tripped g53 z ….. since your spindle and tool setter should never move .

So when you take the probe tool 99 and set it length on the tool sensor , the probe the work z it’s using tool length comp comparing back to the tool zero since ever number based on the tool spindle will be a bigger number . So when you load a tool the machine cord is that vaule is that much higher to have wcs z .

So say you tool set the spindle and it’s g53 z -10 .
T99 (probe) probed at g53 z-12.00 since it’s sticking out two inch more .
T1 probes out at -13.00

When you probe (t99) your work z , say it’s g53 z7.00 It records it as g53z5.00 since your probe is sticking out 2 inches more .

You start your program and you load tool one it uses tool length comp, references the spindle values sees t1 is 3 inches longer so the spindle now runs 3 inches higher.

The idea is to remove human error. Since you set spindle and tool setter once . And ever thing else is automated

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

31 Dec 2023 23:04 #289453 by cmorley
I need it broken down all the way down to machine integrator.

-tool probe the spindle face on the tool setter: gives a g53 number that will be setter height that is the reference to the spindle face.

-probe the tool setter with the spindle probe: gives me the spindle probe length. Will use this later to probe the work height.

-tool probe each tool on the tool setter. then (spindle probe length - probed length) = tool table tool length

- probe the work piece: (probed workpiece height - spindle probe length) = user origin offset

I must be getting close...

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

01 Jan 2024 08:57 - 01 Jan 2024 09:22 #289462 by warwickben
Believe that's right. Should all be based off the spindle…

Math should be (spindle) - (tool length) = comp value
Value are g53 location
spindle length -10
tool length -12
(-10) - (-12) = 2 which would have the spindle 2 inches higher for that tool.
Think of the spindle probe just as if it is any other tool. If the probe sticks out 2"  inches .... you probe g54z you would - 2 inches from the g53 value as if the spindle is touching.  So if you crash the probe later, your tool off sets are still right because they are based on the spindle vs the probe.   Also allows you to use that tool pocket for another tool after setting WCS.    Why path pilot for example tool change button on screen is labeled m6 g43         

Depending on how the tool table is show. I.e. the offset value is positive. The operator can just add to raise or minus to lower to fine tune. If you list the g53 position as length, the wear column, you use a positive to raise and negative to lower. So  that formal you just add +(wear value) to the end.
Last edit: 01 Jan 2024 09:22 by warwickben.

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

01 Jan 2024 12:37 #289467 by JohnnyCNC
I have been trying to get my M6 Remap with auto tool measurement working since moving to 2.9.2 and QTDragon_HD.   I had this working in 2.8.4 with QTDragon.  There were a couple of things I didn't like the way I did it. but it worked really well.   I attached a document that I wrote at the time describing the process.  I hope to do this all in Python this time and not use G59.3 for the tool setter. I have a mix of fixed and variable length tools and I only want to measure the variable length ones.

I agree that it should be based off of the spindle.  If you know where it is in space when the spindle nose trips the tool setter and know where in space the tool trips the tool setter, it just math after that.


This browser does not support PDFs. Please download the PDF to view it: Download PDF

I will be glad to help with any testing on this work.  

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

01 Jan 2024 19:40 - 02 Jan 2024 19:35 #289502 by warwickben
FYI, I was able to get time and start from scratch with 2.9.2
Versa probe no longer has errors etc.

I can now test out any code , and can share any files you want.
Last edit: 02 Jan 2024 19:35 by warwickben.

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

02 Jan 2024 19:36 #289590 by warwickben
also i think i messed up when i typed the math out. think it should be tool length - spindle length. i was half awake when i typed that out.

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

03 Jan 2024 06:23 #289638 by cmorley
Ok if you are interested in testing...

Need to add these files in to the appropriate folders. I assume you have an installed version.
I would keep copies of the old files to go back. Need to use sudo to modify these folders.
(rename the supplied files)


If all goes well the button will work for 'probe height of the current tool'
You need to have 'probe height' set from the spindle face.
'tool probe toolsetter height' button will do this (it just probes straight down).
after that:

You need to choose a tool first of course.
need to manually set the Z height over the toolsetter
If you set the diameter of the tool and it's bigger then the tool setter diameter it will first move the radius in X.
it will double probe in Z and then pop up clear a bit.
The tooltable should show the new Z offset and the status will show the probed heights.

Please test carefully.
Hopefully the math is right and we can fine tune the routine.


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

03 Jan 2024 22:01 - 04 Jan 2024 02:58 #289702 by warwickben
i backed up the two files and replaced them with the ones i down loaded.
made tool zero for spindle in the tool page , tried m06 t0 and m06 t0 g43 in midi . also did the same as t99 .i got the same error results for all 4 attempts. also the go to tool setter button in versa probe i get a different error.      the button go to sensor in the bottom left side of the screen still works. i attached a couple screen shots showing the two errors i got and settings tab and utility tab.  let me know what other info you need. im probably over looking some thing right in front of me. i tend to cant find things when im looking.
Last edit: 04 Jan 2024 02:58 by warwickben.

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

04 Jan 2024 06:47 #289741 by cmorley
You need to add the Z_MAX_CLEAR setting to the INI in the [VERSA_TOOLSETTER] section.

In fact it should look something like this numbers will be different of course:
# where in absolute (g53) machine units to probe the tool
# tool setter position in x y z  (Z should be clearance)
X = 300
Y = 300
Z = -50
# set Z lift when moving to the tool setter
# tool setter diameter for diameter probing
# maximum machine units to lower while probing
For instance this is the sequence for go to tool setter button:
Travel to Toolsetter
Action sequence:
  • go to VERSA_TOOLSETTER XY position
  • go to VERSA_TOOLSETTER Z position.


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

Moderators: cmorley
Time to create page: 0.089 seconds
Powered by Kunena Forum