Getting Started
-
So I built my own machine that was going to be a multifunction machine but I am really thinking it is going to be a CNC machine. I have the duet wifi 2 running I believe 3.3. Right now I am controlling spindle start and stop and speed manually. The axes are run with nema 23 motors driven by TB6600 external drivers.
I am just a little overwhelmed as to how to configure purely for CNC. I see the M453 to set CNC mode. What does this do. It looks like it just allows for spindle control. Does it change the way Gcode is handled.
I have had some success with doing some projects with the code generated from Easel and the Basic Gcode post processor. But I tried Carbide Create and the code it generated did not have the G1 in front of each controlled move so it wouldn't run. Is their a post processor that works with Carbide Creator.
I saw some mention of a post processor for fusion 360. Does the RepRap firmware require the G1 on every line even in CNC mode?
Lastly I saw a mention of a software version that has a DWC for CNC mode. Does this change occur if you put the M453 in the config?I know this is a little all over the place. Is there a place to start for someone trying to get started in CNC with the Duet?
Thanks in advance for any advice.
-
@tomartig for answers to most of you questions see https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_CNC
Ian
-
@droftarts Awesome! thank you very much.
-
@droftarts Thanks for your reply. So I added the M453 Command in the config.g in the General section and then tried to run a .nc file from Carbide Create. Initially it just said finished and did nothing. I deleted the Spindle M Command as I control the spindle manually. it then ran but only the commands beginning in G0 or G1 ran which was the first move onto the piece and then all of the z moves. The X and Y moves never happened. No errors it just ignored them as they do not have a G0 or G1. According to the Document that you linked it should handle this in CNC mode.
"In CNC mode, if a line of GCode does not begin with G or M (after skipping N and the line number, if present) but the previous command was G0 or G1, then the line is taken to be another G0 or G1 command."
Is it possible that I am not in CNC mode? Should the DWC have looked different?
I have attached the .nc file I ran and my config.g. Can you take a look and offer some advice? Thanks in advance.
-
I am having the exact same issue with similar gcode on firmware version 3.3. It only does the z commands and no xy commands.
Also running in cnc mode seemingly successfully, but it is not playing nicely here.
Anyone have any ideas?
-
@timothyz It's a little hard to tell what you both are experiencing. I'd split this into a few questions/comments.
It's not a big deal if you run in CNC or printer mode. I wouldn't, for now, worry about it too much. Mainly it affects some G code interpretation.
First, does the CNC work as is? Ignoring if it can run jobs does it move the axes the way you expect and find the limit switches etc? If so, then you're pretty much in great shape and you just need to get jobs running well. If not, then your config is probably not set up right.
If everything seems to be working on the CNC the first thing is to get homing going. These are macro files that you can write and my preference is to make them work independent of CNC/non-CNC mode - which is pretty easy. Until the machine is homed the motors won't move (see G0,G1 doc about bypassing homing).
Once you have it homing then it's a matter of getting your application to work correctly with it. I don't know carbide create at all, but given that it's intended for carbide3d machines I'd worry about using it elsewhere.
On my milling machine I use Fusion360, which you can run a free license for. The free license is very useful albeit annoying because it won't rapid. It has a huge startup cost (it's hard to figure out) but once you learn a few tricks it is a great manufacturing app.
On my CNC I run VCarve Pro for sheet goods. VCarve pro is not expensive and is easy to use. I use Fusion360 for 3d carving.
So I'd probably start with a known entity (such as fusion with a working postprocessor), get it running, then worry about Carbide Create.
MPCNC.cps - fusion postprocessor
duet3d_rrf_arc_mm.pp.txt - vcarve postprocessor with txt suffix
-
I think this is isolated to the specific software we used, other programs have been just fine that put in normal G-Code commands the beginning of every line.
Everything about my machine works, I was just seeing if carbide create got better results. The path looks good but the gcode it pukes out doesn't look great to reprap firmware.
Again, everything works when the gcode is normal but with gcode missing the command (G1) it ignores the line even in cnc mode.
It may be that the code generated is missing even more traits required for rrf to read it. Not sure.
I will copy and paste some test gcode a little later
-
Tom's gcode looks the same as mine, starts off with a G0 or G1, then on the following lines has the individual X, Y or both X and Y on one line. Reprap firmware seems to be ignoring all lines without the G1 or G0 preceding it. See below:
G90 G21 G0X145.682Y79.693Z12.700 G1Z-1.270F203.2 Y91.765F508.0 X146.122 Y79.693 X145.682 X144.094Y78.105 Y93.352
Now, even in CNC mode this is not getting parsed properly, @dc42 Would you be able to take a look at this, or should I put it this in as an issue on github? I can confirm this is not parsed on both 3.3 and 3.4RC2.
Thanks,
Tim -
@timothyz have you sent M450 to check that the machine really is in CNC mode?
-
@dc42 It shows the CNC view in DWC, I can try sending an M450 to confirm.
I also have no M451 in my config, and there is an M453.
Is there any other prerequisite to read this style gcode?
-
@timothyz there does appear to be a problem when the commands are in a job file, but not when they are sent line-by-line from DWC. I will investigate.
-
@timothyz @tomartig I found the problem. When you omit the G0 or G1 command, only parameters in the line that were also in the previous G0 or G1 line are recognised. In the snippet osted by @timothyz the only axis listed was Z, so X and Y are ignored.
The fix will be in RRF 3.4.0 stable, which we hope to release tomorrow or Thursday.
-
@dc42 Glad we caught it before the stable release, thanks man! Excellent work as always