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

    Sending gcode for in-line monitoring and control

    Scheduled Pinned Locked Moved
    Duet Web Control
    3
    5
    1.5k
    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.
    • Shaqourundefined
      Shaqour
      last edited by

      Dear Duet3D community,
      I would appreciate if anyone could advise me about the possiblity of using Duet3D controller for in-line monitoring and control of a 3D print.
      I am planning a new project in which I will be using a Duet3D to control a 3D printer that has a camera near the nozzle.
      Printing parameters such as temepratrue and feedrate and camera feed of printed bead will be an input to an AI model that will suggest corrections to printing speed, temperature and extrusion rate.
      The AI decision making will be done on a separeate PC, however, I need to know how the communication can be set up with the Duet3D.
      Are there any Gcode commands from which the signals of temperature values can be read so I can feed it to the AI algorithm.
      Also what is the best approach to send the corrected values of temperature, speed and feedrate during the printing process. I have read about commands such as M220, M290, M104, are there any better ways or they would be sufficient.
      Also what would be the speed of communication for reading data from sensors such as temp and also for modifing printing parameters.
      Thanks a lot!

      magnets99undefined 1 Reply Last reply Reply Quote 0
      • magnets99undefined
        magnets99 @Shaqour
        last edited by

        @Shaqour
        That's an interesting project!
        Is the AI detection just for catastrophic failure like model getting knocked over, filament run out, pooping etc.
        If so, possibly all you need are basic controls which can be done with the API or telnet.

        If you are trying to adjust feed rate to reducing ringing or other subtle changes i'm not sure a camera is going to give you the best results and you'd be better of with other sensors like accelerators etc.

        anyway, there are lots of ways to achieve external control of the Printer with a duet board. I have a duet2 wifi which is a bit old but even with that, one could use:

        a plugin directly in DWC
        (this one uses a camera)
        https://github.com/Duet3D/DSF-Plugins/tree/master/MotionWebcamServerPlugin

        Rest API
        https://github.com/Duet3D/DuetSoftwareFramework/wiki/REST-API

        you could also use telnet to send commands, which is probably the simplest but is a terrible idea.
        https://forum.duet3d.com/topic/15294/communication-directly-via-tcp-without-using-http

        Newbie, but tries hard. Has a duet 2 Wifi with a Zesty nimble extruder driver on a watercooled block built into some sort ultimaker 3 chassis.

        Shaqourundefined 1 Reply Last reply Reply Quote 0
        • Shaqourundefined
          Shaqour @magnets99
          last edited by

          Hi @magnets99 and thanks for your reply to my post.

          @magnets99 said in Sending gcode for in-line monitoring and control:

          Is the AI detection just for catastrophic failure like model getting knocked over, filament run out, pooping etc.
          If so, possibly all you need are basic controls which can be done with the API or telnet.
          No, I need it for in-line monitoring of the printed bead. i.e. the camera would be adjusted to the printing nozzle and images of the 3D printing process will be continously captured.

          What I am trying to acheive is similar to what has been already done in this paper:
          "Generalisable 3D printing error detection and correction via multi-head neural networks"

          However this was done on a normal controller connected to a rasepiry pi not a Duet3D. and since Duet3D provides a direct connection to the PC and webinterface. I beleive the communication can be done directly with it.

          Another question that could be helpfull to know, does the Duet3D support line by line feeding to the printer to achieve the complete print? or we only can print by sending the whole gcode file?

          thanks

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

            @Shaqour said in Sending gcode for in-line monitoring and control:

            Another question that could be helpfull to know, does the Duet3D support line by line feeding to the printer to achieve the complete print? or we only can print by sending the whole gcode file?

            It's possible to print line-by-line but we don't recommended it, because if you do that then pausing the job and making some other changes have to wait until the move buffer is emptied; whereas if the file is printed from SD card then pausing can be much faster, because RRF can abandon moves already in the queue and rewind the file pointer when restarting.

            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

            Shaqourundefined 1 Reply Last reply Reply Quote 0
            • Shaqourundefined
              Shaqour @dc42
              last edited by

              @dc42 many thanks for your feedback.
              Can you please suggest me some resources to read in order to have more details about this technique!

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