Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Filament monitor - how it notifies filament runout ?

    Scheduled Pinned Locked Moved
    Firmware developers
    2
    4
    561
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan_55undefined
      Dan_55
      last edited by

      Hello,

      I am designing an expansion board for my printer to use custom TFT screen. I want to use Atmega2560 to communicate using UART with Duet just like the original PanelDue.
      How can I tell the Atmega that the filament has run out or jammed ? I've done some tests and it seems like no info is passed to the UART as there is no info in the log, and as far as I know there is no way to run custom macro when event is detected.
      I figured that when filament event is detected, monitor pauses print and information about this is sent to the log. So, I could use M591 Dx to check whether the filament event occurred every time the pause is detected, but I wonder if there is more elegant way to do this ? I'm using the rotary encoder sensor, so setting up a trigger for endstop will not work for me.
      How it is done on PanelDue ?

      Thanks,
      Daniel

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by dc42

        When the filament runs out and pauses the print, the firmware will send a message to PanelDue to notify the user, assuming that PanelDue or whatever is emulating it sends the correct M408 status poll commands.

        RepRapFirmware 3 will include the filament monitor status in the object model, so it will be possible to query it directly.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • Dan_55undefined
          Dan_55
          last edited by Dan_55

          @dc42 Got it working thanks ! Another problem emerged though.
          While the UART seems to be working fine, some of the commands are not working. I cannot check the network status with M552 or list SD files with M20 even though M20 S2 command works fine and reports JSON style info.
          Is there any setting that prevents Duet from executing some of the commands or is it some kind of bug in either of the firmwares? Everything works fine when sent through USB or Web Interface.
          I'm running firmware version 2.02 on Duet Ethernet v1.05.

          Edit : When enabling debug mode with M111 S1 P3, it seems that duet receives all the commands, but doesn't care at all. I'm pretty sure there is no bug in my firmware since it's just a few lines of code that pass data from Serial1 to Serial0 and the other way round, and most of the gcodes work without any problem.

          Here is my current code, I'm sending gcodes manually from PC terminal :

          void setup() {
            
            Serial.begin(57600);
            Serial1.begin(57600);
          }
          
          void loop() {
            if (Serial1.available()) {
              
              char inChar = Serial1.read();
              Serial.write(inChar);
             
            }
          
            if (Serial.available()) {
                 
              char inChar = Serial.read();
              Serial1.write(inChar);
             
            }
          }
          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            You need to send M408 commands to retrieve the responses from commands such as M552.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA