Jack Coats wrote:
> I heard that Mach3 has a facility to 'home' an axis that has multiple stepper
> motors on it,
> designed for gantries with two motors on the X axis, where each leg of the
> gantry has ahome switch.
>
> Ok, finally, the question. How can we do that with EMC2? A few hints how
> would beappreciated
Gmane mailing list archives - but it took me some time to find my own
posts again ...
http://article.gmane.org/gmane.linux.distributions.emc.user/6158/match=
was one of my posts on this subject.
During homing EMC reaches the home switch, backs off and then very
slowly goes back to home until home is found.
You can do this in EMC (using classic ladder) but then you need 2 step
outputs for both axis, I preferred some simple logic gates.
In simple boolean text notation I found the following solution:
home_en1 = dir OR NOT home1
home_en2 = dir OR NOT home2
step_1 = step AND home_en1
step_2 = step AND home_en2
home = ( ( home1 AND home2 ) AND NOT dir ) OR ( ( home 1 OR home2 )
AND dir )
dir is 0 in the homing direction, the home_en signals are only true as
long as the motor is moving away from homing or (towards homing) while
the home switch is not active.
So there are only step signals when moving away from home or when the
switch is not activated.
The home signal (towards EMC) will only be active when both home1 and
home2 switches are triggered when moving towards the home switched but
when moving away from the home position it will move away until both
switches have disengaged.
So in this way, both motors will be homed but as soon as one of the
motors reaches its home position it will stop. EMC will continue driving
the other motor.
When both motors are 'homed' they may actually have traveled too far (a
bit) due to the ramp down. Now EMC will get the motors away from their
home position (both motors) and then slowly go back until (both) motors
are homed again.
I have forgotten how this homing sequence is called, it should be in
section 6 of the user manual but somehow in the current manual on wiki
this chapter got replaced by "keystick" ...
Please note that this homing sequence only works for a home position at
the limit of the machine outside the normal working area of the mill. It
does not work for a home position within the working area (since the
motors will be stopped by hardware or HAL).
If someone converts this into classic ladder code, I could change my
setup and test the classic ladder version.
It could then be placed in the wiki as a reference to others.
Regards,
Rob
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users