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

    Milling CNC with DuetWifi ?

    Scheduled Pinned Locked Moved
    CNC
    12
    51
    17.8k
    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.
    • jgrouseundefined
      jgrouse
      last edited by

      Hi dc42, worked that out last night and managed to get a regular mach3 gcode file working on the axis. I'll probably create a generic config.g and run a macro to add in all the odds and sods required for each specific setup, i.e. CNC_Route.g/Laser.g/3DPrint.g before running a job (assuming the g code in config.g can be run after the fact as a macro?).

      1 Reply Last reply Reply Quote 0
      • jgrouseundefined
        jgrouse
        last edited by

        @dc42, is there something specific in the ending gcode you look for to know when the job is finished? I was comparing a regular Simplify3D gcode file with the one I have from Vetric Cut2D and apart from the ";" comments I cannot see anything different that you could be looking for? With the Cut2D job, even though the job is finished and the last move has been completed, the web interface does not refresh to show that the job is finished. If I manually refresh the page it shows that there are no jobs printing. Is there a gcode I can throw in at the end to refresh the web page status? Is it the lack of E axis movements?

        1 Reply Last reply Reply Quote 0
        • jmjcokeundefined
          jmjcoke
          last edited by

          I have a mill/3d printer and after trying several 3d printer based controllers my thoughts are that if you are going to use this as a CNC router in it's primary function then there are many things you will need that printer controllers do not do.

          Offsets G54(25-100), plane rotation, digitizing with a probe, good spindle control, the list is long. I wired all my motors and home/limit switches with plugs, I setup the machine using two control cards so I change 10 plugs when I switch between systems. I leave the spindle and hotend/extruder wired to the separate systems. I find myself switching less and less because wood chips and dust do not play well with 3d printing. Having a hand-wheel to move the bigger machine is a must.

          Here is a machine I might be working on that will print and mill with a Siemens control so we will see how that goes. Even then this machine will only mill the part after it is printed, not other materials. I worked at Ingersoll Milling for many years and after I found out they are building this I started the phone calls to get back there.

          https://3dprint.com/149303/ornl-ingersoll-wham/

          Joshua Coke

          Trick Laser Metal Max with Smart Effector
          Duet Wifi
          Zesty Nimble
          Mosaic Pallette+
          At work
          Renishaw AM250/400/ RenAM500M/500Q Powder Bed Fusion (Metal 3D Printers)

          1 Reply Last reply Reply Quote 0
          • jgrouseundefined
            jgrouse
            last edited by

            @jmjcoke:

            I have a mill/3d printer and after trying several 3d printer based controllers my thoughts are that if you are going to use this as a CNC router in it's primary function then there are many things you will need that printer controllers do not do.

            Offsets G54(25-100), plane rotation, digitizing with a probe, good spindle control, the list is long. I wired all my motors and home/limit switches with plugs, I setup the machine using two control cards so I change 10 plugs when I switch between systems. I leave the spindle and hotend/extruder wired to the separate systems. I find myself switching less and less because wood chips and dust do not play well with 3d printing. Having a hand-wheel to move the bigger machine is a must.

            Here is a machine I might be working on that will print and mill with a Siemens control so we will see how that goes. Even then this machine will only mill the part after it is printed, not other materials. I worked at Ingersoll Milling for many years and after I found out they are building this I started the phone calls to get back there.

            https://3dprint.com/149303/ornl-ingersoll-wham/

            OMG, that is a very large 3D printer!

            Just in the process of designing the enclosure for my new machine with extreme dust collection in mind. The detachable spindle/z axis head will have a vacuum tube taking all dust from the source and it will be sitting on a vacuum table. The middle of the vacuum table will have a removable square in the middle that when removed exposes the 400x400 3d printer heat bed that lowers down into a cavity under the vacuum table. When the block is in place no dust can get down there. When it comes time to do 3D printing I just detach the spindle head and put the 3D printer head on (once all residual dust is vacuumed up). Also the entire top plate of the vacuum table will be easy to remove to allow build up in the cavity to be cleaned up (the entire XY frame attaches to this plate). The laser unit just drops into the spindle clamp on the Z axis head and maintains the same cut origin as the spindle.

            There will also be a switch to throw the two Z outputs from the Duet between one stepper on the spindle/laser head and two steppers driving the heat bed table. Still looking for a 2 position 8 pole switch though.

            So far the Duet Wifi has worked just fine with the XYZ frame I have already made, apart from this annoying inability for the web page to update at the end of the job. Actually looks like the web interface locks up as I cannot do any thing with it till I refresh the page.

            As for probing, this is and has been part of the code for bed levelling for quite a while and I cannot foresee any other use for probing for what I will be doing. I also believe there is a gcode call to probe any point you want, although a serial interface may be in order to issue the probe and record the point to file.

            As for spindle control, the PWM based spindle controller and 48V DC spindle I have work really well with the Fan0 PWM output (set to 5V jumper). I just defined a new postprocessor file in Cut2D to use the M106 S0-255 call rather than M03. Ditto for the 7W diode laser work and the PWM controller for that.

            I still have my 6040 CNC being driven by a Gekko G540 and USB Smoothstepper from Mach3 for the more complex work and tougher materials. This new machine really is just for routing ply/mdf from 3mm up to 12mm and laser cutting up to 3mm ply. The ability to 3D print is just a secondary thought to deal with bigger print sizes. Also think the way the axis are being driven is going to be more accurate than the Duplicator i3 knockoff I have. GT2 belt teeth are pressed into a matching track in the 4040 T Slot profile so all stretching and bounce associated with using long belts is negated. Have had the y axis shoot along at 44000 mm/min without missing any steps and comes to a stop with zero bounce. And the new stepper drivers are configured to 160 steps / mm rather than the usual 80 for GT2/pully setups. Plenty of resolution for a nice clean 3d printed part.

            Just wish dc42 could add arc support with the G2 G3 calls when I'm doing router jobs for more fluid moves on all arcs? All the other 8 bit printer firmware supports this so it really should be supported on this high end board. Fairly sure Simplify3D only uses short lines to make up rounded edges as this is how the STL/OBJ models are constructed. Perhaps down the track 3D slicers will support poly models as well as mesh objects and then 3D printers will be able to do smooth arcs. As it is even high vector mesh objects seem to print curves with visible flat areas.

            1 Reply Last reply Reply Quote 0
            • T3P3Tonyundefined
              T3P3Tony administrators
              last edited by

              Regarding arcs, I think all the slicers still output arcs as segments. It's a bit chicken and egg regarding firmware support for arcs and slicer support. Support for CNC milling gcode generation that already generates arc commands is a good reason to add G2/G3 to RepRapFirmware.

              @Jgrouse Can you add a firmware wishlist request for this support, and other CNC specific functionality that is currently not implemented.

              Once we have firmware that properly supports arcs we are one step closer to 3d printing with arcs rather than lots of straight lines. That said there is a lot more that would need to be done as far as a model file that represents arcs properly and slicers that support them

              www.duet3d.com

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

                @jgrouse:

                @dc42, is there something specific in the ending gcode you look for to know when the job is finished? I was comparing a regular Simplify3D gcode file with the one I have from Vetric Cut2D and apart from the ";" comments I cannot see anything different that you could be looking for? With the Cut2D job, even though the job is finished and the last move has been completed, the web interface does not refresh to show that the job is finished. If I manually refresh the page it shows that there are no jobs printing. Is there a gcode I can throw in at the end to refresh the web page status? Is it the lack of E axis movements?

                M0 or M1 says the job is finished. Reaching the end of the SD card file should have the same effect.

                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
                • dc42undefined
                  dc42 administrators
                  last edited by

                  I'll add CNC support to the firmware work list. Is it just G2 G3 and M3 that you need?

                  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
                  • jgrouseundefined
                    jgrouse
                    last edited by

                    @dc42:

                    M0 or M1 says the job is finished. Reaching the end of the SD card file should have the same effect.

                    Gave that a shot as well without success. It just seems as though the web interface locks up after I start the print even though the axis are all doing their thing. Forcing a web page refresh then shows that the status is back to idle rather than just staying on a status of printing.

                    Must be something else in the gcode it is expecting? I even slapped on a copy of all the preamble comments from a Simplify3D gcode file to see if that made any difference. Might need to pm the test file I have and the config.g I currently use to see what you make of it?

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

                      Can you make the gcode file available?

                      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
                      • jgrouseundefined
                        jgrouse
                        last edited by

                        @dc42:

                        I'll add CNC support to the firmware work list. Is it just G2 G3 and M3 that you need?

                        G2/G3 would be great for routing work. As I mentioned in my post it really was just for the sake of routing work as all the slicers still do not output arcs due to regular mesh objects for input.

                        No real need in my case for the M3/M5 to drive a VFD as the spindle controller I have takes 5V PWM from one of the fan outputs anyhow. Others might want it though if they want to run with conventional spindle stop/start gcode? Guess you would also have to add a means of specifying which outputs drive the CW/CCW start/stop and speed control (usually analogue 0-10V into the VFD)? Personally I would leave it up to the user to find a way to map PWM out to an analogue voltage.

                        Greatly appreciate the work you've already put into this fantastic firmware!

                        1 Reply Last reply Reply Quote 0
                        • jgrouseundefined
                          jgrouse
                          last edited by

                          @T3P3Tony:

                          Regarding arcs, I think all the slicers still output arcs as segments. It's a bit chicken and egg regarding firmware support for arcs and slicer support. Support for CNC milling gcode generation that already generates arc commands is a good reason to add G2/G3 to RepRapFirmware.

                          @Jgrouse Can you add a firmware wishlist request for this support, and other CNC specific functionality that is currently not implemented.

                          Once we have firmware that properly supports arcs we are one step closer to 3d printing with arcs rather than lots of straight lines. That said there is a lot more that would need to be done as far as a model file that represents arcs properly and slicers that support them

                          Fairly sure the G2/G3 support was in DC42's wishlist already? I'll double check…

                          1 Reply Last reply Reply Quote 0
                          • jgrouseundefined
                            jgrouse
                            last edited by

                            @dc42:

                            Can you make the gcode file available?

                            can do - https://app.box.com/s/kg2fn2stiia79w0r6noinav0zh4n12sg

                            1 Reply Last reply Reply Quote 0
                            • jmjcokeundefined
                              jmjcoke
                              last edited by

                              As for probing, this is and has been part of the code for bed levelling for quite a while and I cannot foresee any other use for probing for what I will be doing. I also believe there is a gcode call to probe any point you want, although a serial interface may be in order to issue the probe and record the point to file.

                              This is the probing I was referring to.
                              https://www.youtube.com/watch?v=ZYJU1kwtzV4

                              Joshua Coke

                              Trick Laser Metal Max with Smart Effector
                              Duet Wifi
                              Zesty Nimble
                              Mosaic Pallette+
                              At work
                              Renishaw AM250/400/ RenAM500M/500Q Powder Bed Fusion (Metal 3D Printers)

                              1 Reply Last reply Reply Quote 0
                              • ianlee74undefined
                                ianlee74
                                last edited by

                                I'm excited to read this. My next project is also going to be a CNC and I was hoping to be able to run a Duet WiFi on it.

                                Thanks,
                                Ian

                                1 Reply Last reply Reply Quote 0
                                • jgrouseundefined
                                  jgrouse
                                  last edited by

                                  I'm now on 1.16 with the 1.13 Web code and I still get the web interface locking up when I start a job which does not extrude or use hot ends/beds. I now get the following as soon as the job is started:
                                  Communication Error
                                  An AJAX error has been reported, so the current session has been terminated.
                                  Please check if your printer is still on and try to connect again.
                                  Error reason: SyntaxError: Unexpected token ] in JSON at position 446

                                  I can only reconnect to the web interface when the job is complete. Interestingly the emergency stop button still works, however I would like to get some form of feed back as well as the ability to press pause and adjust feedrates.

                                  Here is a very simple gcode file set up to laser cut a square using the first PWM port on the Duex5 board (M42 P3 S255) to set the Laser driver power - https://app.box.com/s/7h697i7c9qghmhw13rqwjwc34iun59f0

                                  Happy to add whatever is needed to the gcode to allow the web interface to give me some feedback and control over the job.

                                  Thanks Dave/Christian in advance if either of you can help me out?

                                  1 Reply Last reply Reply Quote 0
                                  • jgrouseundefined
                                    jgrouse
                                    last edited by

                                    Also, the M42 call is not in sync with the way the Duet is buffering the lines. When I run the job the laser switches off just before it starts the second last edge of the square. Is there any way to get the M42 to issue at the point in the gcode it is supposed to change?

                                    1 Reply Last reply Reply Quote 0
                                    • jgrouseundefined
                                      jgrouse
                                      last edited by

                                      Looks like inserting M400 just before the laser needs to switch off, do a rapid move and then start the next cut seems to resolve the sequencing issue in the buffer for M42.

                                      Oddly the laser driver requires an inverted PWM. What puzzles me though is that even though I issue M42 P3 S0 I1 just before the rapid moves it seems to still be getting a small amount of voltage leaving the laser in low power as it moves rather than completely switching off? At the end of the file the same command does in fact switch off the laser completely.

                                      1 Reply Last reply Reply Quote 0
                                      • Russ Griesundefined
                                        Russ Gries
                                        last edited by

                                        yeah, i have been doing similar, but using a servo control for a brushless control.

                                        https://www.youtube.com/watch?v=5nrd81MXiQE

                                        In that video i was using a controller but later got it working with the Servo outputs.
                                        https://www.youtube.com/watch?v=50i_HihgNto

                                        Next Up Laser!

                                        ill need to figure that one out, its just straight up 12VDc so i'm hoping i can use a Fan PWM output to drive a SSR of some kind…

                                        or i may be able to use a heater channel, will test the laser when i get it, 2.5W 80$, ebay, cheep so will see how well it works lol

                                        ~Russ

                                        One Day At A Time…
                                        My Main Research Page:
                                        http://rwgresearch.com/open-projects/3d-printing-research/

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

                                          One way to drive a laser cutter would be to set up the gcode to command extrusion where you want the laser on, then use the M571 command to set PWM on a pin whenever extrusion is taking place. This would keep it in sync. Currently the M571 command always uses the Fan0 pin but in the forthcoming 1.17dev8 release the pin is selectable.

                                          Does anyone know whether there is a standard way of using gcode to drive a laser cutter?

                                          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
                                          • jgrouseundefined
                                            jgrouse
                                            last edited by

                                            @dc42:

                                            One way to drive a laser cutter would be to set up the gcode to command extrusion where you want the laser on, then use the M571 command to set PWM on a pin whenever extrusion is taking place. This would keep it in sync. Currently the M571 command always uses the Fan0 pin but in the forthcoming 1.17dev8 release the pin is selectable.

                                            Does anyone know whether there is a standard way of using gcode to drive a laser cutter?

                                            In 1.16 this code is driving the laser rather well with perfect cutouts and no dwell with the laser on (not that the PWM needs to be inverted for my Simpledrive board) -

                                            ;laser off
                                            M42 P3 S0 I1
                                            ;go home
                                            G0 Z30.000 F1500
                                            G0 X0.000 Y0.000 F9000
                                            ;move to first cut
                                            G0 X32.092 Y123.544 Z2.100 F9000
                                            ;first cut depth
                                            G1 Z0.000 F1500.0
                                            ;laser on
                                            M42 P3 S255 I1
                                            G1 X31.690 Y123.540 F900.0
                                            G1 X31.286 Y123.531
                                            …
                                            G1 X32.092 Y123.544
                                            ;complete buffer before commencing next line
                                            M400
                                            ;laser off
                                            M42 P3 S0 I1
                                            ;move to next outline
                                            G0 Z2.100 F9000
                                            G0 X78.278 Y94.219 F9000
                                            ;first cut depth
                                            G1 Z0.000 F1500.0
                                            etc.

                                            Have not tried using this method for pixel engraving and I suspect the need to issue the M400 is going to slow things down for each scanline pass.

                                            Reading up on M571 it does sound better suited to running the laser with 1.17. Will upgrade and test it out. Just a bit of a pain as Cut2D doesn't natively output E values. I can however customise a post-processor to put E values out on the G1 cut moves. Please note that my config.g does not have any defined extruders at the moment. Do I need to add the extruder setup back into the config to make M571 behave as intended?

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