A little back story. I purchased the Longmill 30X30 about a year ago and am only now getting it put together. The workshop for all my woodworking tools that was supposed to be built last fall got put on hold. Good news is that the foundation is finally finished and construction of the building will begin in a week or two.
I was holding off on assembling the Longmill as I really don’t have a place to use it in the house. Now that the shop is actually under construction I decided that it was time to get this thing together and get it working and learn the basics so it would be ready for move in day.
My first project is a wooden gear clock that I am building from plans out of an old issue of “Scroll Saw Woodworking and Crafts” magazine. I am using FreeCad 0.19 to design the gears and create the G-Code and gSender 1.0.7 to run the Longmill.
After importing the file into gSender I can see a wire frame outline of the gear I want to cut. (I’m not actually cutting the part just trying to send the file to the machine and watch it move around.)
When I click on ‘outline’ the machine moves in a roughly circular path making some cool SciFi sounds and then comes to rest at the zero point. The trouble starts when I attempt to do the test run. It runs for a second then two error boxes show up, Error 20 on line 24 - Unsupported Command and Error 20 on line 25 - Unsupported Command. There’s still a green box in the upper right corner stating ‘Checking G-Code file’ and a red box in the lower left corner stating ‘Stop Job’. The progress is stuck at 3% with 1045 lines remaining. Nothing happens after several minutes so I think gSender didn’t like my file. I can press the red box to stop and it does stop so gSender doesn’t seem to be locked up.
I have attempted to upload the file so maybe someone can give it a glance and see what might be hanging it up.
FreeCad doesn’t seem to want me to save the file as a .gcode. It looks like plane text without a file extension. I have added .gcode to the end of the file to get it to upload to the forum.
edit: can’t upload to the forum as a new user.
I don’t know if the ; headed lines are counted or not.
If they do count then these are the 24th and 25th lines:
G81 X0.0000 Y0.0000 Z0.0000 F381.0 R13.7000
G80
If not then these are the 24th and 25th lines:
G0 X44.9128 Y44.8823
G0 Z15.7000
A very quick look at the code that you posted shows that you are using a centroid post processor. I suggest that a first step in your working this out would be to select grbl as your post. I just looked on the freecad site and it appears that grbl is an option. I don’t know if you can then choose inch or mm. If you can, either one will work.
OK. So I tried to just run the job and it stopped at line 23 and 24 again but I was able to press ‘Resume job’ and it then went on and crashed at line 27, then again at 30 then for the last time at 38. I think it has something to do with the drilling operation. I am attempting to drill 1/8" holes with a 1/8" bit. Once the gcode gets past the drilling the machine runs the rest of the job with no problem. It is a 3 spoked gear with a hole in the center and one hole in each spoke. It doesn’t do the holes but after it actually starts to run it cuts the 3 large holes in between each of the spokes (4 passes) and then it cuts the perimeter of the gear (also 3 passes) and then stops.
@StuartG I am/was unfamiliar with the G80 and G81 codes. I did some searching and found this:
G81 is a canned drill cycle.
The memory in the chip that runs GRBL is too small to do canned cycles internally.
That is why only bCNC will run the G81, it converts it to a series of commands that GRBL does support.
and that is why all the other GUI’s will give an error on G81, they don’t translate it and GRBL considers it an error.
Again, I plead ignorance, but I’m thinking that this may be the cause of your errors. That said, there was no context in this thread for the statement that the chip that runs grbl is too small to do canned cycle internally. I have idea what “chip” this is a reference to.
Then, I found this video, which seems to bear out the previous statement that grbl cannot run freecad drilling code. However, there is a work around.
I am now officially way beyond my level of competence, so if this video does not address your problem, with luck someone much more knowledgeable than me will jump in.
OK. I seem to recall something about FreeCad having an issue drilling, but I thought it was drilling a hole with a bit the same size as the hole. It seemed to work OK in the preview in FreeCad so I thought it was fixed. Anyway, thanks for the video, I’ll watch it and see if we can get it going.
It’s fun to watch the machine move around and the sounds it makes are pretty cool. Seriously, like something out of a Science Fiction movie.
@StuartG Notice in his console view that there are no G80 or G81 codes and he makes a point of saying that you must remove the G99 codes so that grbl can run this. Your files has G99 codes, too.
It’s a pretty simple fix. Only took about 20 minutes to solve. I added the ‘–translate_drill’ under the job edit-output section and removed the G99, also changed the drilling operation to peck.
A quick recalculation of gcode, upload to gSender and clicked on test run and it worked perfectly.
gwilki, thanks so much for your help. I’m sure I’ll be back for more help.
@StuartG I’m glad that it worked out and we both get to learn something - bonus.
As the original issue has been addressed, I’m closing this topic. If anyone else has a similar concern, feel free to start a new topic, which will ensure that it is addressed promptly.