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

Duet 3 real-time Gcode

Scheduled Pinned Locked Moved
Duet Hardware and wiring
2
5
183
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.
  • undefined
    loddie
    last edited by 25 Jan 2025, 23:12

    I'm planning on building a multiple axis CNC machine for positioning objects (rather than machining). The control software will be Grasshopper, a parametric plugin for Rhino. There are many example projects online and Grasshopper can even be configured to directly control many axis by sending step and direction signals to a driver. However, as Grasshopper runs on a PC, it is not very good at providing synchronous control. I need motion paths that are accurate, which sychronize motion between several axes so the desired paths are followed.

    The other requirement I need is real-time control. That is, a user presses a button or keyboard/mouse command and the corresponding G-code for the desired motion path is sent to a CNC controller which immediately executes the commands. In other words, the user does not save a file with G-codes, then load it into the CNC controller - instead the operation is in real-time. Grasshopper can send immediate G-Code commands via many means such as serial port, OSC commands, etc.

    1. Can Duet 3 accept real-time G-Code commands and immediately execute them or are they only executed from a saved file?

    2. Also, I'm interested in using closed loop steppers or servos. Is the closed loop function correction performed in the amplifier drive? I'm confused if I need one 1HCL per closed loop axis to take advantage of closed loop or if I can use the 6HC and 3HC and still benefit from closed loop control. The confusion stems from the descriptions of the latter two not mentioning closed loop capability, whereas the 1HCL specifically mentions it.

    Thank-you!

    undefined 1 Reply Last reply 26 Jan 2025, 07:49 Reply Quote 0
    • undefined
      jay_s_uk @loddie
      last edited by 26 Jan 2025, 07:49

      @loddie you can send commends over USB and RRF will execute them straight away. Obviously if you send more than one it'll queue them to be done in order (at least in terms of movement commands. Some gcode may get executed without being queued)

      If you're using closed loop steppers with their own drivers then they handle all the closed loop stuff without intervention from RRF. They usually have an alarm output which you can connect to the duet board so it knows that the drivers think something has gone amiss. You only need to use a 1HCL if you are driving the steppers directly without an external driver

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 1 Reply Last reply 26 Jan 2025, 14:39 Reply Quote 1
      • undefined
        loddie @jay_s_uk
        last edited by 26 Jan 2025, 14:39

        @jay_s_uk This is great news. You clued me in to what to search for. From this post, it seems no checksum is needed. So it seems it is as simple as connecting Duet board via USB, opening the serial port with corresponding baudrate on computer, and sending Gcode command such as: "G1 X100 Y100\r\n".

        As for closed loop, your explanation makes sense and was how I thought it worked. However, I now realize my #2 question was written incorrectly. If I use the integrated stepper drivers on a 6HC or 3HC directly with an encoded stepper motors (no external driver), there is no closed loop error correction option; but if I use a 1HCL directly with an encoded stepper, there can be error correction (performed on the 1HCL). However, I would need one 1HCL per axis. In other words, to have closed loop function in a Duet board (rather than an independent external stepper driver), the only option is the 1HCL (one per axis). Is this correct?

        Thank-you for you insights!

        undefined 1 Reply Last reply 26 Jan 2025, 15:19 Reply Quote 0
        • undefined
          jay_s_uk @loddie
          last edited by 26 Jan 2025, 15:19

          @loddie yes, that's correct. You'd need 1 x 1HCL per axis. Or there's always the M23CL steppers motors that have the 1HCL board included however they are a bit more expensive

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          undefined 1 Reply Last reply 26 Jan 2025, 15:36 Reply Quote 0
          • undefined
            loddie @jay_s_uk
            last edited by 26 Jan 2025, 15:36

            @jay_s_uk Makes sense now. Thank-you!

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