Hello Guest it is May 11, 2021, 06:27:58 PM

Author Topic: Getting text to a macro  (Read 1743 times)

0 Members and 1 Guest are viewing this topic.

Offline Calum

*
  •  45 45
    • View Profile
Getting text to a macro
« 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

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Getting text to a macro
« Reply #1 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

Offline Calum

*
  •  45 45
    • View Profile
Re: Getting text to a macro
« Reply #2 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
Re: Getting text to a macro
« Reply #3 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.
Regards,
Ray L.

Offline Calum

*
  •  45 45
    • View Profile
Re: Getting text to a macro
« Reply #4 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