Machsupport Forum
Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started 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
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)
-
I tried it and as soon as I press the Edit Tool button the Mach4 freezes and I have to restart.
-
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
-
Thanks for the info
-
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
-
Can you give details on what you did?
-
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:
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
-
thank you :)