1
Mach4 General Discussion / re-mapping motors and home switch inputs through lua script
« on: December 21, 2016, 04:11:13 PM »
I'm running a CNC hotwire and require all axes to be homed independently (essentially gantry squaring). The PMDX Smart BOB unfortunately does not support homing slaved motors so we currently have to run two separate profiles of Mach4, one just for homing of all the axes every day. I read in the forums that someone had tried to create a script to decouple the motors and re-map them but haven't found anything past the rumors.
I looked through the API and found mcMotorGetAxis(), however I don't see any method of setting or changing the axis label. Is it possible to edit the axis that motors are assigned to through lua scripting? Possibly through some other sort of IO commands?
I haven't been able to do testing on modifying the home switch labels, however I believe I can do it using mcIoSetState() to modify the "Home 2 Motor" input. Please correct me if I am wrong, I'm new to lua but understand scripting and coding.
Any input is appreciated.
I looked through the API and found mcMotorGetAxis(), however I don't see any method of setting or changing the axis label. Is it possible to edit the axis that motors are assigned to through lua scripting? Possibly through some other sort of IO commands?
I haven't been able to do testing on modifying the home switch labels, however I believe I can do it using mcIoSetState() to modify the "Home 2 Motor" input. Please correct me if I am wrong, I'm new to lua but understand scripting and coding.
Any input is appreciated.