M191 not waiting as expected



  • Here's the last few lines of the GCODE I'm printing

    T2
    G10 P0 S120 R120
    M140 S25
    M191 P0 R35
    M141 P0 S0
    G1 Y-35 F3000
    T-1
    

    My expectation is that when M191 is reached, the printer will pause and await the chamber to reach 35 degrees before it then executes the move step G1. In practice, the move step is being executed immediately.

    Is there something else I need to do to achieve a guaranteed wait?

    Things in mind for me to try are to execute an M400 (though I thought this only applied to moves), and to execute an empty macro (because this might induce alternate code processing).

    While on the subject of M191, the documented example might need tweaking as the example given doesn't match the documentation above and seems to indicate that chamber 60 should do nothing at all. I can only assume this was an older form of the command.



  • Just guessing here, maybe chamber index (P parameter) must be same as heater channel used for chamber, so for example if its connected to heater3 channel, then M191 P3 T35 will work.



  • Thanks for the input. To add, I use this at the start of the file to await heating, rather than cooling.

    ; Wait for bed thermistor (chamber P0) to report reasonable temp
    M191 P0 R70
    ; Ignore thermistor now
    M141 P0 S0
    
    ; Home
    M98 P"homeall.g"
    

    This does work. The job waits at M191 until the chamber reports 69 degrees and then moves forward. That's why I don't understand it not working correctly at the end of the file.



  • Now attempting to narrow down the problem, I have created the following separate GCODE test file:

    ; Home
    M98 P"homeall.g"
    ; Measure Mesh
    G29
    
    T0
    G0 Z10
    
    G0 X150 Y100
    M140 S50
    M191 P0 R40
    
    G0 X150 Y0
    M140 S30
    M191 P0 R30
    
    G0 X150 Y100
    M140 S50
    M191 P0 R40
    
    G0 X150 Y0
    M140 S30
    M191 P0 R30
    
    G0 X150 Y100
    M140 S50
    M191 P0 R40
    
    G0 X150 Y0
    M140 S30
    M191 P0 R30
    
    T-1
    

    The behaviour I observe is

    • Homing
    • Mesh Measurement
    • Tool collection
    • Move to bed center
    • Pause for chamber temp to be reached
    • Repeated moves back and forth after temp reached
    • Tool docked

    The behaviour I expect is

    • Homing
    • Mesh Measurement
    • Tool collection
    • Move to bed center
    • Pause for chamber temp to be reached
    • Move to second position
    • Pause for temperature to be lowered
    • Move to first position
    • Pause for temperature to be reached
    • Repeat
    • Dock

    What am I doing wrong that this works once and then not subsequently?



  • OK - I just spotted this on M190 documentation:

    Note: M190 will not wait for temperatures below 40c because in many cases they may never be reached due to ambient temps. So if you want to wait for a bed to cool, use 41c or higher.

    This isn't specified for M191, but I'm going to assume it's the same limit. If I'm working in Antarctica, or space, perhaps lower ambient temps are perfectly reasonable to expect. Will verify if this impacts M191 also. In my case, I'm trying to wait for a print to detach fully from the heated bed, which is coated with PEI. I find this happens around 35 degrees. If M191 will not permit me to wait for lower than 41 I'll be forced to insert a blind pause to accommodate the extra wait. Ambient bed temp when the bed isn't heated is current 23C, which is far lower than 40.



  • Verified.

    This works as expected:

    ; Home
    M98 P"homeall.g"
    ; Measure Mesh
    G29
    
    T0
    G0 Z10
    
    G0 X150 Y100
    M140 S60
    M191 P0 R45
    
    G0 X150 Y0
    M140 S41
    M191 P0 R41
    
    G0 X150 Y100
    M140 S60
    M191 P0 R45
    
    G0 X150 Y0
    M140 S41
    M191 P0 R41
    
    G0 X150 Y100
    M140 S60
    M191 P0 R45
    
    G0 X150 Y0
    M140 S41
    M191 P0 R41
    
    T-1
    

    M191 should reflect this limit of 41. Would be nice to be able to specify this, perhaps in the same breath as we can specify the max limit using M143.



  • @SpoonUnit I thought maybe you could use M116 instead of M191 https://duet3d.dozuki.com/Wiki/Gcode#Section_M116_Wait

    But when I checked the wiki, I see it has the same comments about temperatures<= 40.

    I guess the firmware developers are between a rock and hard place with this because if they changed the limit to be say 35, then they would no doubt get complaints from people who live in warmer climes with M191 waiting forever and never reaching (cooling down) to the set point because the ambient is (say) 38.



  • @deckingman It's fair to say that you can't please all the people all of the time :). 41 seems like a strange default, but there it is. It would be nice to be able to configure it though. At present, I now have a wait to 41 followed by a 5 minute blind pause, and that works just fine for now.


Log in to reply