General CNC Chat > Share Your GCode

Wait for signal

(1/5) > >>

Evangelosemm:
Hello forum.
Can you please advice me how can i write the g code so when i get a high signal in to an input to stop the g code from running and when the signal gets low the program to continue running automatic.
Thank you
Evangelos

joeaverage:
Hi,
Gcode as used by mach3 or Mach4Hobby does not include conditional statements. Without a conditional you cannot write
Gcode  to do it. Mach4Industrial enacts Marco B programming which does have conditionals and could do it in Gcode alone.

What you require is a macro running in the background that causes a <feedhold> when low and a <cyclestart> when high.

I use Mach4 and would code this in Lua easily enough. I presume you could do a similar thing in Mach3 but I can't be bothered
with Cypress Enable.

Craig

Evangelosemm:
Thank you very much for your answer. So I need mach 4 indutrial in order to be able to get signals and manipulate the g code. I am new to all this and I don't know if there is a manual for m conditional Instructions and how to do it.
I ll do a research and if cant do it maybe ask you again. Thank you in deed.

TPS:

--- Quote from: joeaverage on January 24, 2019, 11:57:20 AM ---Gcode as used by mach3 or Mach4Hobby does not include conditional statements. with Cypress Enable.
Craig

--- End quote ---

i am not familar with Mach4 (LUA Scripting),

but i am pretty sure that the is (Mach4Hobby), a posibility to create a macro call M123 or what ever,
witch is waiting for a stupit Input to get "High".

Evangelosemm:
Is there any manual for M commands at Mach 4? Is it possible an example? A small one from point a to point b with a wait at point b.
Thank you

Navigation

[0] Message Index

[#] Next page

Go to full version