Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: arhimedoffs on March 18, 2018, 02:41:32 PM

Title: Enabling motor from script
Post by: arhimedoffs on March 18, 2018, 02:41:32 PM
I use two motors for X axis. There are two separate heads on X axis, they do not work simultaneously. For this purpose script move current carriage to parking position, remapt axis to ther motor and do homing. The problem is "Enable" output signal still persist on, even for unmapped motor and go to false only if I disable motor in config manualy. The same problem - if I disable axis, then enable signal still True. How can I Enable/Disable motor from Lua script?
Title: Re: Enabling motor from script
Post by: joeaverage on March 19, 2018, 10:17:28 PM
Hi,
this might provide some ideas:

http://www.machsupport.com/forum/index.php/topic,33866.0.html (http://www.machsupport.com/forum/index.php/topic,33866.0.html)

Craig
Title: Re: Enabling motor from script
Post by: arhimedoffs on March 20, 2018, 12:29:29 AM
Thanks for reply.
I read this post before, it is very usefull for motor remap.
But I want not only unmap, but disable motor, like uncheck enabled checkbox in configuration tab. I have try simple write configuration string via Lua into profile and reload config, but without luck.
Title: Re: Enabling motor from script
Post by: joeaverage on March 20, 2018, 02:28:42 AM
Hi,
if I'm not mistaken you can programmatically turn off individual enable signals, the motor would stop. It may not then be necessary to unmap it, so long
as it stopped.

Craig
Title: Re: Enabling motor from script
Post by: arhimedoffs on March 20, 2018, 05:14:24 AM
Ok, I will try it