Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Stuart on August 02, 2019, 02:27:11 PM
-
I have a need to execute a couple of lines of gcode and then run a script
Is it best to use a coroutine.wait or mc.mcCntl(inst,”Gxx”)
What i am asking is which is the safer to ensure that the gcode is completed
I do know how to implement the coroutine in screen load and the plc , and have it working as such
-
It all depends on what your doing. If it can be done with mc.mcCntlGcodeExecuteWait() then no reason not to use it. Technically I guess it would be the safest. But using a coroutine is perfectly fine too as long as it is implemented correctly.
-
Thanks for the input
As I said I have it working as a coroutine ,but I wondered if I have over complicated it