Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: rrc1962 on November 22, 2009, 05:38:48 PM

Title: Macro Question
Post by: rrc1962 on November 22, 2009, 05:38:48 PM
I'm guessing that a macro is the way to go here, but not sure how to use them.  I want to execute a script from within a G-code program.  Would I write the script as a macro, name it...say M123, place it in the macro folder, then call it from G-code by placing M123 in the code?  I know how to use button scripts, just not sure how to execute VB script from G-code.

Thanks...
Title: Re: Macro Question
Post by: Hood on November 22, 2009, 05:43:46 PM
Yes thats what you would do but make sure your macro has the m1s extension and that you place it within your profiles macro folder which is in the main macro folder.
Hood
Title: Re: Macro Question
Post by: rrc1962 on November 22, 2009, 07:51:51 PM
Cool, Thanks.  Is there a list of available OEM DRO codes for custom use?  I have the list of OEM codes that Mach uses.  Can I just make up a number as long as it's not being used?  I saw a few labeled reserved, but some of those must be in use in the THC300 profile because I get odd results when I try to use them.

Title: Re: Macro Question
Post by: Hood on November 22, 2009, 07:59:31 PM
User DROs are from 1000 to 2255

Hood
Title: Re: Macro Question
Post by: rrc1962 on November 22, 2009, 08:14:12 PM
Excellent...Thanks very much.
Title: Re: Macro Question
Post by: Hood on November 23, 2009, 08:42:45 AM
No problem :)
Hood