Closed himanshugoel2797 closed 9 months ago
Hi. Very detailed report, thank you! I know there was a bug that meant syncing was not restored when restarting print but I thought that was fixed and only effected a 24h period. It would be good to confirm that you are completely up-to-date first.
Each "step" of the unload/load process will alter the servo state based on needs and will perform a combination of synced and non-synced moves. The reason is (obviously) not all moves can be synced. Each "step" will correct the servo and sync based on needs and leave it in a non-deterministic state. Well, not strictly non-deterministic, but there isn't any attention paid to the state it is in on exit because the next "step" in the sequence will set appropriately.
FYI that all movement by the "steps" would be equivalent to MOTOR=
extruder
or gear
or gear+extruder
based on need. None are synced
which is what would be used in a print.
To be clear: "extruder+gear" means your are sending movement to the extruder and the gear is following along. "gear+extruder" means you are driving the gear stepper rail and the extruder is temporarily placed on the same rail to follow the movement. The former is what is used in-print.
The "DEBUG: Syncing gear stepper and extruder" is the restoration of syncing by happy hair before the print resumes and thus after the _MMU_POST_LOAD
. You are correct that ANY HH initiated move will disable the automatic syncing so all the "step" functions would do so.
The use of MMU_LOAD_SEQUENCE
is another wrinkle that I haven't tried for a while, but really the default I ship is calling the same sequence of "steps" that are coded within Happy Hare so shouldn't make a difference
So to summerize. In MMU_POST_LOAD
which is called after the load_extruder() "step" I'd expect the servo to be down because that last movements would have been synced moves by using the equivalent of "gear+extruder" movement. Thus to do some extruder driven movement in POST_LOAD, you would want to use "MOTOR=synced" Or you could move the servo up and use "MOTOR=extruder". But these are HH driven movement not general g-code.
You could also run MMU_SYNC_GEAR_MOTOR ...
then just do extruder movement as you are in your example. This would reengage the gear to follow the extruder (as in a print). It will also take care of the servo position if necessary
It's arguable that extruder syncing should be re-enabled before these call out macros but I think that could/would lead to a lot of servo flutter. I think it is better that the user re-engages the syncing.
Let me know how it goes ... there aren't many folks doing creative things. Also when you get it all working let me know what additions I should make to the doc ..
Thanks for the very detailed response! I had been busy dealing with some other printer issues, so I hadn't been able to get around to checking things and responding.
I think I had updated after the 24-hour period you mentioned, so I don't think that's involved. My takeaway from your explanation is that this isn't a bug and it would be proper for me to just call MMU_SYNC_GEAR_MOTOR
in the purge macro as needed. This is what I ended up doing, and with it, the purge macro is working as expected.
I think documentation wise, a simple purge macro example could be added somewhere to clarify that calls to MMU_SYNC_GEAR_MOTOR
may be needed in gcode customization. I can look around the documentation and suggest a good place for it (or maybe it already is somewhere and I missed it, so I can verify that :P ).
I'm really enjoying tinkering around with all this more 'creative' functionality :)
This issue can probably be closed for now, I'll reopen and/or submit a pull request when I have something to add regarding documentation.
I call a purge macro as part of the post load routine:
It just does:
But the
G1 E{purge_amount}
isn't actually able to work, because the servo is engaged and the gear isn't moving, so the extruder is just grinding rather than purging the filament. I'm using the given custom MMU_LOAD_SEQUENCE for stallguard 'home to nozzle' if that might matter.Looking in mmu.log, I see:
the 'Syncing gear stepper and extruder' coming after 'Running macro: _MMU_POST_LOAD' makes me think that the sync is being disabled during the post load macro.
I'm thinking this is related to the home-to-nozzle functionality, I had initially encountered this error:
To 'fix' this, I had changed the stepper from 'extruder+gear' to 'gear+extruder', looking into it further I realize that's not right, as 'extruder+gear' is supposed to be the equivalent of 'synced'. However, https://github.com/moggieuk/Happy-Hare/blob/a3a23c0e1acddf670475ef23a4a6c2d9123be22e/extras/mmu.py#L4592 shows that, as also indicated by the error message, 'synced' is not an option for homing moves.
So, which is the intended behavior here for the post load sequence?
'synced' added to the options for homing movesI see this is explicitly prevented at https://github.com/moggieuk/Happy-Hare/blob/a3a23c0e1acddf670475ef23a4a6c2d9123be22e/extras/mmu.py#L4360Similarly, how should the home-to-nozzle load sequence be changed to fix the current error regarding 'extruder+gear'?