Hello Guest it is June 20, 2019, 04:24:13 AM

Author Topic: A new Tool Table for Mach4  (Read 3596 times)

0 Members and 1 Guest are viewing this topic.

Offline DazTheGas

*
  •  747 747
  • DazTheGas
    • View Profile
A new Tool Table for Mach4
« 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
« Last Edit: October 05, 2015, 03:50:11 PM by DazTheGas »
Theres always time for a choccy biccy

Offline dq828

*
  •  57 57
    • View Profile
Re: A new Tool Table for Mach4
« Reply #1 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.

Offline DazTheGas

*
  •  747 747
  • DazTheGas
    • View Profile
Re: A new Tool Table for Mach4
« Reply #2 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
Theres always time for a choccy biccy

Offline dq828

*
  •  57 57
    • View Profile
Re: A new Tool Table for Mach4
« Reply #3 on: June 02, 2017, 07:39:50 AM »
Thanks for the info
Re: A new Tool Table for Mach4
« Reply #4 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

Offline dq828

*
  •  57 57
    • View Profile
Re: A new Tool Table for Mach4
« Reply #5 on: June 10, 2017, 11:57:11 PM »
Can you give details on what you did?
Re: A new Tool Table for Mach4
« Reply #6 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


Offline dq828

*
  •  57 57
    • View Profile
Re: A new Tool Table for Mach4
« Reply #7 on: June 11, 2017, 05:32:25 AM »
thank you :)