Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: KatzYaakov on January 05, 2021, 05:08:42 PM

Title: add condition on Gcode
Post by: KatzYaakov on January 05, 2021, 05:08:42 PM
is there way to add condition on Gcode(if,then,else) to act according buttons or any other event that will happened while gcode run?
i think there way but i didn't see in the manual nothing about this
thks
Title: Re: add condition on Gcode
Post by: Brian Barker on January 05, 2021, 08:30:39 PM
You can do it with an Mcode in hobby or use macro B in industrial .
Title: Re: add condition on Gcode
Post by: KatzYaakov on January 06, 2021, 12:31:17 AM
Thks
But i didn't clear my self,only act or do something acording event its simple ,but i mean something else
We have several options to run the gcode and all that options can export from postprocessor,but finaly which gcode will run at realtime its depends on user ,which button he will press,where he will put the part....
So i need condition that i can decied which part of gcode to run ,not only act specific action
Hope its more clear
Thks
Title: Re: add condition on Gcode
Post by: Brian Barker on January 06, 2021, 06:35:59 AM
Okay, to do that you need Macro B , it has if, then, else and goto. This is only in the industrial version. If you have industrial a great reference is Peter Smid’s programming in MacroB book.