Duet 3 real-time Gcode
-
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.
-
Can Duet 3 accept real-time G-Code commands and immediately execute them or are they only executed from a saved file?
-
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!
-
-
@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
-
@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!
-
@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
-
@jay_s_uk Makes sense now. Thank-you!