Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: alevitt53 on October 19, 2020, 08:24:16 PM

Title: Help with RefAll
Post by: alevitt53 on October 19, 2020, 08:24:16 PM
I want to move the machine to a specific coordinate and reset the DRO's.
I am trying to edit the refall function in the screen editor. It seems that no matter what I do, no code
runs after the gcode command.
That portion of the file is attached.
Any help appreciated.
Thank you
Title: Re: Help with RefAll
Post by: Bill_O on October 20, 2020, 08:43:00 AM
Try
mc.mcCntlMdiExecute(inst, string.format("G0 x0 y.5 Z4.5 A180"))
Title: Re: Help with RefAll
Post by: alevitt53 on October 20, 2020, 07:32:04 PM
Ok so that did not work.
The line after the move instruction is suppose to set the #3 DRO to 0.00 and it stays at 180.
Title: Re: Help with RefAll
Post by: jbuehn on October 20, 2020, 07:46:31 PM
Try adding a coroutine.yield() after the mc.mcCntlMdiExecute() command...and remove the coroutine.resume().

That'll wait to set your #3 DRO to 0.00 until the MDI command has finished executing.