Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started by: DazTheGas on October 05, 2015, 03:48:09 PM

Title: A new Tool Table for Mach4
Post by: DazTheGas on October 05, 2015, 03:48:09 PM
Well still on the quest of making my custom copy of mach4 I needed a more indepth tooltable, I wanted to be able to select a tool from a library and mach4 load all the params I needed.

for Instance I use the mdi panel a lot and do a fair bit of by eye milling so If I decide I want to change tool then mach will change all the spindlespeed - feedrates etc for me.

So I created this for a start and can develop further as needed.

And of course you can have a copy too.  ;)

The Button code is

Code: [Select]
inst = mc.mcGetInstance()
profile = mc.mcProfileGetName(inst)
path = mc.mcCntlGetMachDir(inst)
mods_path = path.."\\Modules\\DTG_Tooltable\\"

dofile(mods_path.."TTable.mcc")

The Script is Posted Below

The Setup and Usage Video Here  http://www.machsupport.com/forum/index.php/topic,30974.0.html (http://www.machsupport.com/forum/index.php/topic,30974.0.html)
Title: Re: A new Tool Table for Mach4
Post by: dq828 on June 02, 2017, 02:09:05 AM
I tried it and as soon as I press the Edit Tool button the Mach4 freezes and I have to restart.
Title: Re: A new Tool Table for Mach4
Post by: DazTheGas on June 02, 2017, 02:30:54 AM
Unfortunately this no longer works, since creating this 2 years ago many things have changed with mach4 including the tooltable so some of the profile variables that it requires are no longer there.

DazTheGas
Title: Re: A new Tool Table for Mach4
Post by: dq828 on June 02, 2017, 07:39:50 AM
Thanks for the info
Title: Re: A new Tool Table for Mach4
Post by: django013 on June 10, 2017, 11:39:39 PM
with current mach4 it is possible, to extend mach4 tool table, instead of creating a completely new one.
I did it that way and it works fine.

Reinhard
Title: Re: A new Tool Table for Mach4
Post by: dq828 on June 10, 2017, 11:57:11 PM
Can you give details on what you did?
Title: Re: A new Tool Table for Mach4
Post by: django013 on June 11, 2017, 12:37:10 AM
I was working on a tooltable inside mach4 (i wanted to avoid popping dialogs) and wanted to add the cutlength of a flute to the tool table.
So from main menu of mach4 enter "view->tool table", which opens the mach4 tool table dialog.
From there go to "Edit -> Table Fields", which opens another dialog with a notebook control.
Last tab to the right is called "User Fields".
There you can add fields to the tool table.

To retrieve the values from lua there's a mach4-API that takes a fieldname as parameter:
Code: [Select]
mc.mcToolGetDataExInt(inst, toolNumber, userdefinedFieldname)That API has variants for Double and String too, so straight forward :)

See attached picture of my tool table tab page. Column "SL" is a user defined field from mach4 tool table and I don't have to care about storage :)

hth Reinhard


Title: Re: A new Tool Table for Mach4
Post by: dq828 on June 11, 2017, 05:32:25 AM
thank you :)