Hi,
They assemble a multi-material filament exchanger. Everything is already functional and tested.
One of the functions I wanted to use was to load and unload the filament when changing the material to detect the end switch, which would ensure that the filament really got out of the path of another filament.
Using [gcode_maco] this is not possible in the {% for %} loop because the switch state cannot be updated.
It would be worth considering to use the “endstop_pin” option and g-code e.g.
I’m not sure why you would need this in a for-loop. When you have defined a gcode button Klipper will monitor it and react with the press_gcode / release_gcode.
So in theory, the press_gcode should get executed when filament enters your “splitter” and the release_gcode when a filament leaves it.
If you separate the code to verify the filament sensor state into a separate macro, the new macro will have an updated state as soon as you run it. That’s what I did when developing the macros for the 3MS multimaterial system.
HI,
I tried replacing the [extruder_stepper] with the [manual_stepper ] configuration and found it to be a function that would fit except for these flaws:
[manual_stepper ] is not synchronous with [extruder]
if the defined value of MOVE or SET_POSITION is for example 300 mm, the motor will stop at end_stop, but there will be a pause before processing the next code. (the motor is probably doing the MOVE virtually, but is no longer physically spinning)
This is true. You would need to use extruder_stepper instead of manual_stepper. Maybe I have not understood why you prefer the manual one over the dedicated extruder one, which seems a better fit.
I think you don’t understand that it was an experiment that demonstrated the load/unload filament function on the end_stop pin.
If ( SET_POSITION, MOVE, SPEED and STOP_ON_ENDSTOP ) could be used in the same way for the [extruder] configuration, then filament swapping on multi-material devices would be much smoother and safer.
This would require modifying the core Klipper code but I can’t do that,
I can only provide testing and feedback.
1|-1 will remain the same as for (manual_stepper) movement length - parameter SET_POSITION and MOVE
2|-2 the filament will move until it is activated switch regardless of the specified
parameter SET_POSITION and MOVE, possible here use the ‘max_length’ parameter in the configuration so that there was no infinite motion when there was not filament.
Is there anyone who could program it?
I can test it.