kinematics: Add dual_carriage to hybrid-corexyz#4296
Conversation
|
Thank you to Ankurv who made a tremendous work to test with his IDEX Switchwire and helped to improve and chase the bugs in this kinematic. Does I have to do something with this failed check? I am not very in hands with github functionalities. |
|
Thanks. Not sure why the build originally failed - likely some github hiccup. It's now failing due to whitespace errors. Alas, I wont be able to look at this in detail until next week. Cheers, |
|
Thanks. I'm struggling a bit to understand how this code works. If I understand correctly, the main idea is that one can "disable" the stepper on a particular rail and "enable" some other stepper on the same rail - so as to control two separate carriages on the same rail. The key difference between this dual carriage system vs cartesian is that the "disabled" stepper still needs to generate steps. Did I understand this correctly? If so, what is the reason for hooking this code into the homing and limit checks? Also, can you give a high-level description of what each of the new classes is used for. Some things I noticed:
Cheers, |
|
Thank you for your feedbacks.
I haven't found how to dynamically reverse a pin. But I also think it is clearer to do it like I did. Do you have a clue for this reversal?
Ok, will do.
Yes I was informed of this and I thought I had taken care to avoid it. I don't see where I did this, which class variable did you see to be affected?
Ok. will do
There is nothing new compared to cartesian dual_carriage at this point. Except that the axis must be x here. |
Yes it's exactly that. My goal is to provide a module that can be use for hybrid-corexy/z, cartesian, corexy/z or any style of printer that can handle 2 carriages. The following PR will introduce the duplicate and mirror modes for IDEX. The whole code is already working on ankurv's printer.
Homing sequence (G28): as cartesian dual_carriage, we need to home both carriage in the homing sequence. Forced homing during carriage toggle: carriage position is critical for dual-color prints and one have to fine tune the offsets to get nice prints. I have a cartesian IDEX printer and I need to home my axis before using a tool for a more reliable position. Maybe it is caused by disabling the stepper, maybe it is mechanic,.. For hybrid-corexy I presume that passively moving the axis on a not so rigid gantry can cause misalignment in some cases. So why not simply homing both carriages with a G28 X? because it's not required and as the endstops have a certain mechanical durability, this feature divide by 2 the amount of triggering. Limits update: The idea behind this is to set your limits as T0 can never collide T1, i.e. if the carriage is 60mm wide on a 400mm axis, T0 range would be [0, 340] and T1 range would be [60, 400]. This will be enhanced for the duplicate and mirror modes; I will write a documentation for this purpose. |
Okay, but in that case, I'd add the new functions to the existing kin_cartesian.c code (as they are fundamentally a cartesian kinematics) - for example, by adding a new
I saw
FWIW, the simple answer would be to not disable the stepper motor.
Okay, but I think it would help reviewing if this feature could be added after the basic support is added. Separately, is there a plan to use the new DualCarriageRail stuff on the existing cartesian kinematics? -Kevin |
|
Thanks!
edit:
Got it. It refers to the class DualCarriagesRail which is in idex_modes.py too. The rail is created in the kinematic file, then use as argument to create a DualCarriagesRail object. Two DualCarriagesRail objects are then use as arguments for the DualCarriage class. I will add a get_range function to the DualCarriagesRail if it's ok to you. I will remove the HOMING=0|1 to this PR and I will create a separate PR with it. Sure, I will add the dupe/mirror modes to cartesian printers. If someone wants to create a corexyu or corexyuv kinematics, my idex_modes module should ease this work. I don't plan to build corexy IDEX so I will not add it myself since I won't be able to test it but adding this should require really little work. |
- Add dual_carriage abilities for hybrid-corexy and hybrid-corexz - Introduce the module idex_mode - Fix add_stepper to the correct rail in hybrid-corexy
Fix trailing spaces
d40ad3c to
8cf06df
Compare
Following PR comments: - Module idex_mode is now in kinematics/ - Add reverse stepper alloc for cartesian printers - Fix direct access to rails in DualCarriages - Add dual_carriages status to the documentation - Remove the force homing option for carriage toggling and his documentation
Fix line length
|
I made the required changes accordingly to your comments. |
Okay.
Okay - I missed that. My mistake.
Thanks. I noticed a couple of minor things in the code:
Separately, not something that would hold up merging, but I wonder if we could make DualCarriagesRail() behave like a PrinterRail() class - then cartesian.py, corexy.py, corexz.py could unconditionally allocate a DualCarriagesRail and have that class deal with the different cases that occur when a dual_carriage definition is in place or not. Thanks again, |
|
Thank you.
I am not sure to understand what you want there. To be honest I would find logical to add all the features of DualCarriageRail into PrinterRail. To match this: I did not get into that changes directly as in the PR #3609 adding parameters to PrinterRail were not the good way to do. *The reverse capability will be introduced in the next PR for the mirror mode and only for the 2nd carriage. |
|
Okay - I think we should change the
I'm not sure it would be a good idea to add significant complexity to PrinterRail - as that class is used by many other kinematics where DualCarriage isn't used. The DualCarriage is a relatively rare setup, so I think the code would be more manageable in its own class. That said, it should be possible for a DualCarriage class to mimic a PrinterRail class so that its users could largely treat it as a regular rail. Alas, though, I don't know enough about the upcoming mirror/dup mode changes to know if that actually makes sense. And, unfortunately, I don't think I'll be able to review it in the short term. Cheers, |
remove all hasattr() go back over get_status() usage save_idex_state and restore_idex_state are now independent of get_status()
Fix trailing spaces
|
I made the required changes. |
Conditional test in calc_position for carriage_1 to be more tolerent to future modifications. Was very strict on get_status format.
|
Thanks. -Kevin |
- Add dual_carriage abilities for hybrid-corexy and hybrid-corexz - Introduce the module idex_mode - Fix add_stepper to the correct rail in hybrid-corexy Signed-off-by: Fabrice GALLET <tircown@gmail.com>
|
Hej I would like to "open" this again because of the x+y and x-y topic. With Corexy this is a simple fix. But not with the Hybrid Corexy (aka Markforged) kinematic. So basically I have two options right now. Either switch to Marlin again or changing the position of my Steppermotor. By the way, the lack of documentation on this Kinematic system makes it really hard to find a solution. |
|
Hi, That's true, you can't just invert the direction or swap A/B motor as you would do with a CoreXY. If you have 2 carriages on your hybrid-corexy try to swap physically both carriage. This kinematics depends on which belt is attached on which carriage. So assuming T0 is attached to the bottom belt and T1 is attached to the top belt in a CoreXY belt path configuration, attaching T0 to the top belt and T1 to the bottom belt should solve your issue (you may need to invert some stepper direction too). Thanks. |
|
Hey @Tircown That sounds very promising. In fact your implementation of the Markforged Kinematic was the main decision driver for me to switch from Marlin to Klipper! Unfortunately I have only one carriage. Please let me know if there is any way how I could support you ;) |
Any news? I would really like to test the kinematic on my printer. Right now it's just collecting dust. :) |
|
I will have more time to work on the kinematics in few days. Thanks |
|
Just curious to hear if something happened in the meantime. I would really like to test it if it's available ;) Thanks |
|
@Tircown |
Add dual_carriage abilities for hybrid-corexy and hybrid-corexz
Introduce the module idex_mode
Fix add_stepper to the correct rail in hybrid-corexy
Signed-off-by: Fabrice GALLET tircown@gmail.com