I've created a short gcode test for loading and unloading the different filaments prior to going all in. It seems to be working fine with one small exception: The seconds to load is 7 seconds, but to unload, I have to go at least 8 seconds to get it back to it's original position, although short about 10mm (this is a secondary issue to deal with later).
Once I've loaded the last filament, I manually press the button for 6 pulses. 9 out of ten times (probably more frequently than not), the OLED just displays "Cutting..." and nothing happens (other than the cut). Where T3 was the last filament loaded, and is the current filament, if I press the button while it still shows "Cutting...", it will unload T0, not T3. Totally unexpected.
Once in a while, it will ask to unload the current filament, which is what I think I should be expecting. Is this the correct behavior for 6 pulses (Unload current and Home), where it should request a button press to unload, and then unload the current, in this case T3, and not T0?
Here is a link to a video showing the OLED with audio (can't seem to imbed it here, so here is the URL) https://www.youtube.com/shorts/-ddfWNb09bA
Here is my script for review:
G28
G90
M83
G92 E0 ; Reset Extruder
G28O ; Home optionally if steppers were shutdown
M420 S1 ; Activate leveling
; Press the button 3 times to reset the 3D Chameleon
G0 Y376 F2000 ; Move close to 3DC button
G0 Y380 F2000 ; Press button
G4 P150 ; Wait for 150ms
G0 Y376 F2000 ; Move off 3DC button - reset to CLEAR
G4 P4000 ; Pause for 4 seconds before homing
; Home the Chameleon
G0 Y380 F2000 ; Press button
G4 P3360 ; Wait 7 Pulses, or 3+ seconds
G0 Y376 F2000 ; Move off 3DC button
G4 P5000 ; Pause for 5 seconds to complete homing of Chameleon
G0 Y300 F3000 ; Move farther away from the button
; Load filament T0/1
G0 X241.5 Y376 F2000 ; Move to 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button once to set current to T0 filament
G4 P500 ; Wait half second for button press
G0 X241.5 Y376 F2000 ; Back off of 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button
G4 P7000 ; Wait 7 seconds to measure filament
G0 Y300 F2000 ; Back off of 3DC button
; Load filament T1/2
G4 P5000 ; Pause for 10 seconds before loading next filament
G0 X241.5 Y376 F2000 ; Move close to 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button to set current to T1 filament
G4 P1000 ; Wait full second for button press
G0 X241.5 Y376 F2000 ; Back off of 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button to unload T0
G4 P8000 ; Wait 8 seconds to unload filament
G0 Y300 F2000 ; Back off of 3DC button
G0 X241.5 Y380 F2000 ; Press button
G4 P7000 ; Wait 7 seconds to load T1 filament
G0 Y300 F2000 ; Back off of 3DC button
; Load filament T2/3
G4 P5000 ; Pause for 10 seconds before loading next filament
G0 X241.5 Y376 F2000 ; Move close to 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button to set current to T1 filament
G4 P1500 ; Wait full second and a half for button press
G0 X241.5 Y376 F2000 ; Back off of 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button to unload T0
G4 P8000 ; Wait 8 seconds to unload filament
G0 Y300 F2000 ; Back off of 3DC button
G0 X241.5 Y380 F2000 ; Press button
G4 P7000 ; Wait 7 seconds to load T1 filament
G0 Y300 F2000 ; Back off of 3DC button
; Load filament T3/4
G4 5000 ; Pause for 10 seconds before loading next filament
G0 X241.5 Y376 F2000 ; Move close to 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button to set current to T1 filament
G4 P2000 ; Wait full 2 seconds for button press
G0 X241.5 Y376 F2000 ; Back off of 3DC button
G4 P150 ; Wait for 150ms
G0 X241.5 Y380 F2000 ; Press button to unload T0
G4 P8000 ; Wait 8 seconds to unload filament
G0 Y300 F2000 ; Back off of 3DC button
G0 X241.5 Y380 F2000 ; Press button
G4 P7000 ; Wait 7 seconds to load T1 filament
G0 Y300 F2000 ; Back off of 3DC button
Is this a valid test, or am I wasting my time? I've followed Chris Riley's Part 3 video, which still looks to be focused on Mk3, rather than Mk4. So there are details there that don't seem to apply, like "three distinct button presses" to reset the 3D Chameleon. One quick press does a "Clear", which is sufficient in my opinion.
Trent
Ok, a few things I'm noticing.
First, 6 pulses makes no sense if nothing is already loaded... there's an oversight in my code which is why the "cutting..." is still displaying... I'll fix that bug, however, you should be getting into that position... it should always have a filament loaded prior to issuing that command. (Normally, you only use it in the End GCode, after a full print of loads.) In your video, it starts at "Idle", which indicates that there isn't a filament loaded. If it had an active filament, it should say "Idle - T{extruder}".
Two, your button pressing timing is a little off... it should only be moving 3 mm, not 4. That slight delay can cause it to be out of sync with the timer for it, which will cause it to have longer commands. Make sure they are all accurate... that 33% delay can be causing 1 out of 4 commands to be processed incorrectly.
Three, are you taking into account the time the cutter needs to run? When ever the Mk4 firmware backs out the filament, you need to add that time. It's about 1.1 seconds. (Your mileage may vary, but it always happens on the Mk4 firmware right now... it does not happen on the MK3 firmware.)
Four, as for your script, can you record a video of this code running? Lastly, Chris' 3 button press is still valid, as that's how you get out of any state... there are 3 button presses as a maximum... so regardless of where in which command you are, 3 will get you back to a cleared state. You don't need the 3 press reset at the start of each filament change... that's only used in the Start GCode to reset the 3DChameleon at the start of a print to a known condition. (Some people don't turn it off, so this, along with an immediate homing, gives us a good way of getting it to a known start condition.)
Bill