reading tool table from qtdragon_handler.py

More
02 Jul 2021 21:38 #213510 by mb_cnc
Does anyone know of a way to read a specific tools data in the tool.tbl file from qtdragon_handler.py using python?

thanks

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

More
03 Jul 2021 04:15 #213532 by cmorley
can you give a little more info?
there are a couple ways depending on what info you want.

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

More
03 Jul 2021 16:47 #213572 by mb_cnc
I am using an electronic tool length setter and have modified the default silverdragon gui to separate tool length and z offset measuring. I have also modified qtdragon_handler.py with the coding changes as it seemed like the logical choice. I understand python but not at an expert level.

I was thinking to create a tool in the table just to store the spindle Z value and then use that value as part of the formula when running tool length measuring.

The other is use the tool table x or y values to store a large diameter tool adjustment for x/y positioning over the tool length sensor.

thanks

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

More
04 Jul 2021 05:25 #213642 by cmorley
ok interesting.
We do something similar to get wear offsets for lathes.
tools numbers above 10000 are considered as wear information.

This requires remap to handle tool changes properly ( to add the wear offset )

you could use the linuxcnc python module to read the status of the tool_table.
linuxcnc.org/docs/2.8/html/config/python...xcnc_stat_attributes
look for 'tool_table'


in qtvcp tstat.py is used for direct tool file manipulation.

it has a function you might use:
linuxcnc.org/docs/2.8/html/gui/qtvcp_lib...tool_info_toolnumber

def GET_TOOL_INFO(self, toolnum):
self.current_tool_num = int(toolnum)
self._reload()
return self.toolinfo


The linuxcnc python module method is easiest and safest if it will do what you want.

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

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