Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Calum on April 20, 2014, 01:18:17 AM

Title: Getting text to a macro
Post by: Calum on April 20, 2014, 01:18:17 AM
How can I pass a text string from Gcode to a macro?  I would like to write the tool description from my CAD to the tool table.in Mach3 to help ensure I load the correct tool when I manually change tools.  I can get the tool number and diameter into the macro but haven't found a way to gwt the description.

Calum
Title: Re: Getting text to a macro
Post by: BR549 on April 20, 2014, 05:02:21 PM
Hopefully you ment CAM. Just mod the post to include the description of the tool in brackets . AND the M00 to stop the program so that you can see it in the Mach3 message line

( tool description)
M00
Title: Re: Getting text to a macro
Post by: Calum on April 20, 2014, 05:25:03 PM
Thanks BR549,

Yeah I did mean CAM.

I have Mach3 configured to stop of a tool change so I could put the tool description after the TxM6 on the same block to see if that would work.  I have it in the block before the TxM6 but the info is gone when I come to replace the tool.  I sometimes need to scroll back the part code to verify the next tool which is a bit of a pain.

I was hopping to write out the tool list required for the part at the beginning of each run, just trying to be clever.

Calum
Title: Re: Getting text to a macro
Post by: HimyKabibble on April 20, 2014, 06:03:26 PM
Modify your POST to output a comment, in parens, that contains "MSG " followed by your tool description.  Make sure it comes out just BEFORE the M6, and Mach3 will display it on the message line.

Regards,
Ray L.
Title: Re: Getting text to a macro
Post by: Calum on April 20, 2014, 06:56:03 PM
OK thanks I can do that.  Is there a way I can access the Message from VB in a macro?  Dose the Message box have a DRO number?

Calum