Controlling 3D printer via auxiliary UART



  • Hi, I have some questions about controlling 3D printer via auxiliary UART, specifically about Chamber and Busy state.

    Right now, printer has this firmware:
    Firmware Name: RepRapFirmware for Duet WiFi
    Firmware Electronics: Duet WiFi 1.0
    Firmware Version: 1.20 (2017-12-23)

    1. Is there a way how to get Chamber status and temperature from M408 S0, just like bed or standard heater? I don’t know if there is config issue or there is no way how to get that from M408 S0 G-Code. The config looks all right, because the web interface recognizes the chamber the right way, just like the bed. M408 S0 doesn’t return the chamber temperature even in “G-Code Console” in web interface.
    2. I found weird behavior with responding when the printer is in Busy state. The app is asking every second with “M408 S0 R”. The weird part is that sometimes the printer is returning that its in Busy state, but sometimes it’s not even returning anything, just not responding (but in web interface I can see, that the printer is in Busy state). Are there some differences in Busy states?

    Thank you for answer and sorry if I missed some topics in this forum, I tried to search, but did not find anything about this.
    David


  • administrators

    have you tried using response type 2 M408 S2 - that is similar to what DWC uses as far as I know and should have more information in it.



  • Yes, I know about M408 S2. I was just wondering if there is a way to get that from S0. Because bed is working on that, so I was thinking that might be similar.


  • administrators

    AFAIR the M408 S0 response includes the temperatures of all heaters that are used as bed or chamber heaters or used by a tool. But it doesn't tell you which ones (if any) are being used as chamber heaters.



  • Ok, I don't know how to reproduce that workflow.
    I have this configuration:

    ; Heaters
    M301 H0 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
    M305 P0 T100000 B3950 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M301 H0 S0.90 ; Set heater 0 PWM limit to 90%
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C

    M305 P1 T100000 B4388 C0 R4700 ; Set thermistor + ADC parameters for heater 1
    M301 H1 S0.90 ; Set heater 1 PWM limit to 90%
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    M141 H2 ; heater 2 is the chamber heater
    M301 H2 B1 ; use bang-bang control for the chamber heater
    M305 P2 T100000 B4388 C0 R4700 ; Set thermistor + ADC parameters for heater 2
    M143 H2 S80 ; Set temperature limit for heater 2 to 80C

    When I send “M408 S2”, I get this response (which I think is ok):

    {"status":"I","coords":{"axesHomed":[0,0,0],"extr":[0.0],"xyz":[0.000,0.000,317.000]},"currentTool":0,"params":{"atxPower":0,"fanPercent":[100.00,0.00,100.00,0.00,0.00,0.00,0.00,0.00,0.00],"speedFactor":100.00,"extrFactors":[100.00],"babystep":0.000},"sensors":{"probeValue":0,"fanRPM":0},"temps":{"bed":{"current":23.1,"active":0.0,"state":0,"heater":0},"chamber":{"current":22.8,"active":0.0,"state":0,"heater":2},"current":[23.1,23.8,22.8,2000.0,2000.0,2000.0,2000.0,2000.0],"state":[0,2,0,0,0,0,0,0],"heads":{"current":[23.8],"active":[0.0],"standby":[0.0],"state":[2]},"tools":{"active":[[0.0]],"standby":[[0.0]]},"extra":[{"name":"MCU","temp":37.6}]},"time":2132.0}

    If I send “M408 S0”, I get this response:

    {"status":"I","heaters":[23.0,23.8],"active":[0.0,0.0],"standby":[0.0,0.0],"hstat":[0,2],"pos":[0.000,0.000,317.000],"sfactor":100.00,"efactor":[100.00],"babystep":0.000,"tool":0,"probe":"0","fanPercent":[100.00,0.00,100.00,0.00,0.00,0.00,0.00,0.00,0.00],"fanRPM":0,"homed":[0,0,0],"msgBox.mode":-1}

    As you can see, that S0 return only two temperatures. Does anybody can help me with that? I don’t know if there is bug in M408 or in the config.


  • administrators

    Looks like M408 S0 doesn't return the chamber heater temperature, just the bed a tool heater temperatures. I suggest you use M408 S2.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.