Need help Homing sequence in H-bot( CoreXY) system
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Another option might be to use immediate homing to get out of joint mode then probe your x and y home switches and reset the home position to that point.
Please Log in or Create an account to join the conversation.
Since to move in the X axis both joints must turn in the same direction, and to move the Y axis the joints must turn in opposite directions.
What happens if only one turns?
Another option would absolute encoders.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Please Log in or Create an account to join the conversation.
Set up the home signal for each joint to be set when its "own" switch trips, and then to reset when the other switch trips:
own other output[
0 0 0
1 0 1
0 1 0
1 1 0
(I think this is a NAND with the first input inverted, but I would just set it up using LUT5 with the homed-state as another input so that limits work normally after homing)
Now both joints can home at the same time, then when one limit switch is hit one of the motors will reverse direction for the home latch search move, moving the other axis.
Please Log in or Create an account to join the conversation.
@andypugh : I already tried synchronize=-1 on both joints. But the rotation direction after the 1st joint has homed, needs to be reversed. So no luck...
Also could you explain me your proposal in your last post (the home signal). It seems an interesting option, but I have not understand it, sorry...
@Todd: I was also thinking about waht you proposed:
Another option might be to use immediate homing to get out of joint mode then probe your x and y home switches and reset the home position to that point.
Could you explain how to set-up the second part (probe x and y limit switches and reset the home positions) ?
I think it may be my best option until LinuxCNC is able to directly manage the homing of corexy machines...
Thanks a lot for your help.
Best regards,
Bernard
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
For the plan of probing the home switches as a secondary task, using the limit switches will be slightly problematic. You will have to create a probing routine subprogram (there are example g-code files around you should be able to look at.)
If you want to use the limit switches, you will have to use some hal trickery to disable them while the probe routine runs. Should be easily done with a couple of custom M-codes.
Then after both the x and y home position has been probed the home probing routine can re-enable the limit switches and reset the home position of the joints using a custom M-code that toggles the hal pins halui.joint.0.home and halui.joint.1.home.
The biggest down side to this I can foresee is that your homed indicators will always show homed (even when they are not). But you may be able to rig up a separate one in a vcp panel that would be triggered by your home probing routine.
Please Log in or Create an account to join the conversation.
I already tried synchronize=-1 on both joints. But the rotation direction after the 1st joint has homed, needs to be reversed. So no luck...
Also could you explain me your proposal in your last post (the home signal). It seems an interesting option, but I have not understand it, sorry...
When a joint finds the home signal it can be configured to then reverse and travel in the opposite direction off of the home switch.
(And, if configured that way, to then reverse again and find the home switch again in the original direction). And then it will travel at rapid speed (I think it is rapid speed) to the programmed home parking position.
So the built-in homing behaviour does allow for reversing one or both motors. `What would be needed is some sort of HAL logic that intercepts the home switch signals to cause the required behaviour.
I think that the motions can be made to happen. What I am not sure about is if this can be used to locate a home position for both joints.
Just to clarify, is this machine H-bot or Core-XY? They are different (And I think that CoreXY is probably superior)
Please Log in or Create an account to join the conversation.
Thanks a lot for your replies. I appreciate, and it's very usefull for me.
My machine is a CoreXY configuration. I'am using teh kinematics=corexykin option.
Would it be possible to modify the LinuxCNC homing C code to correctly manage homing of corexy machines (for example homing along X and then along Y instead of Joint 0 and then join 1) and then reintegrate this update in the main dev branch ?
If not, my best option will to try solving the homing problem using andypugh proposal. Then I will not have to launch a post homing script. I'll go the other way (Todd's proposal) if I'm not successful with the first option.
What do you think ?
Thanks in advance.
Please Log in or Create an account to join the conversation.
Would it be possible to modify the LinuxCNC homing C code to correctly manage homing of corexy machines (for example homing along X and then along Y instead of Joint 0 and then join 1) and then reintegrate this update in the main dev branch
I think it would be both possible and desirable.
I am just not entirely sure how to go about it.
The trick might be to have the homed-state as an input to CoreXYkins so that it drives the joints differently during homing.
Please Log in or Create an account to join the conversation.
I'am currently looking into control.c and homing.c to understand the homing stuff.
One idea I'am looking at coul be to add a configuration parameter in the INI file to choose between homing on joints, or on world XYZABCUVW.
The idea behind is to allow the homing.c code to optionnally call the "InverseKinematics" function while homing in order to allow to move all joints according to the machine architecture as described in the kins files (like corexykins.c for me).
I think this way, the homing function and strategy can be more versatile for different kinds of machine architectures... Indeed, some may have thier limit/home switch on the joint, some other machines may have their limit/home switch on the XYZ... world.
What do you thinks about the idea ?
Btw, should I open a new topic in the DEV part of the forum to go further in this discussion ?
Thanks in advance.
Best regards, Bernard
Please Log in or Create an account to join the conversation.