Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: roebling on March 27, 2021, 12:41:09 PM

Title: Reference all axes in macro
Post by: roebling on March 27, 2021, 12:41:09 PM
Hello--
    I am working on a custom 6-axis machine controlled by Mach 4 and an ESS Smoothstepper controller. Since a number of functions that I've created need to be called by both screen buttons and by M-codes in the program, I've located them in a module. That's all worked out fine.
    But one of the module functions references all the axes using mc.mcAxisHomeAll(). When called by the screen button, it works fine, but fails when called by the M-code. I understand that module functions can't use coroutines, but as I understand it, mc.mcAxisHomeAll() doesn't rely on one. Can anyone please explain this behavior?
    Sorry--one other frustration: does anyone know how to have Mach re-load the module, without restarting Mach each time? When I edit and save my load_modules.mcs file, it re-loads any macros, but not the module file.
   Thanks in advance!