Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Vivek on October 10, 2018, 02:43:13 PM

Title: homing 2 axis
Post by: Vivek on October 10, 2018, 02:43:13 PM
I am trying to home a hot wire table in 2 axis mode, where I have motor2 and motor 3 as a slave to motor 0 and motor 1. I want the motors not to be slaves only when its homing that way all four motors would hit the limit switch when home button is pressed. Does anyone know a way I could do this. I was thinking of creating toggle switch on the screen and program so it would toggle the motors between slave and working independently of one another, but I didn't come across a way of coding this in. I Would really appreciate the help. Thank you.
Title: Re: homing 2 axis
Post by: bryannab on October 10, 2018, 04:27:35 PM

You can have all four motors home at the same time without slaving any of them together. Go to Configure>Control>Homing/Soft Limits and you can change the Home Order to the same number for each pair of motors or all four if you'd like.

Title: Re: homing 2 axis
Post by: Vivek on October 17, 2018, 04:27:33 PM
Thank you Bryanna,

But I already have the same number for each pair of motors in homing order, but that doesn't seem to home each motor individual. If the motor 1 reaches home first than motor 3 stops where it is. Is there any other way. I want all the motor to reach limit switch independently of the other motors only when reference home button is pressed.

Title: Re: homing 2 axis
Post by: smurph on October 21, 2018, 02:56:03 PM
This would all depend on how the motion plugin handles homing, meaning homing is a motion controller function.  The correct behavior would be where motor 1 hits its' home switch first, stops, and motor 3 continues to its' home switch. 

So the question now becomes what motion controller are you using?

Title: Re: homing 2 axis
Post by: Vivek on October 22, 2018, 04:31:46 PM
We use Gecko motion controller. So what do I need to do, I was under the impression I could create a button from screen edit or edit the code in lua script to home as I need. Its for a hot wire Machine so the motors cant be to far apart, so I cant have motor 1 reach home and than start motor 3 for homing sequence. I do need them to start somewhat sentimentally.

Thanks for your help.
Title: Re: homing 2 axis
Post by: smurph on October 22, 2018, 04:46:15 PM
Gecko is not a motion controller.  A motion controller drives the gecko.  Usually the PC's parallel port or some motion controller like the ESS or a PoKeys. 

If the two motors are mapped to one axis (a gantry type setup), then the homing SHOULD work as I described above.  So I would talk to your motion controller provider and get them to fix that. 

Failing that, you could use the LUA script API to "unmap" one of the motors from the axis in question and "map" that motor to an OOB axis.  Then you can home the original axis (that now only has one motor) and then home the OOB axis (that now has a motor mapped to it).  Then, once all of the homing is done, unmap the motor from the OOB and map if back to the original axis. 

You will probably want to read the API manual to see what functions are available.  In the Axis category. 

Again, the default homing action SHOULD be sufficient for you.  And if it worked, no scripting would be required.  That is why I suggest asking the motion controller provider to clear this up.