In the production of a part where is LinuxCNC?

More
25 Dec 2020 18:33 #193186 by dmac257
I am almost a newbie and in reading the forum most of the questions and answers include LOTS of terms that I don't understand. There are LOTS of "features" of CNC software that I don't understand. Where I am confused is exactly where LinuxCNC does its job. Design is done on CAD software .. the file is saved somehow for further refinements .. the file is exported somehow to CAM software to convert the 3D "image" into g-codes so the machine knows what to do .. this g-code file is saved for use on the CNC machine .. the CNC machine either has a computer directly controlling the movement or a built in controller that takes the g-code file directly and makes the item.

I intend to build my own CNC router .. I might want to add Laser engraving/cutting of thin materials in the future .. I have built a 3D printer before from scratch so somewhat familiar with basics, but I am not sure where LinuxCNC fits in the process. I intend to do the design work on my desktop (windows) .. save the file to a thumb drive to take to the wood shop laptop. So does LinuxCNC take the file from the thumb drive and convert it to g-code or does it need g-code and control the machine or does it do both?

dmac257

Please Log in or Create an account to join the conversation.

More
25 Dec 2020 19:52 #193188 by tommylight

the CNC machine either has a computer directly controlling the movement or a built in controller that takes the g-code file directly and makes the item

That is LinuxCNC, it takes gcode and turns it into machine movements, is a machine controller.

Please Log in or Create an account to join the conversation.

More
29 Dec 2020 16:12 #193431 by BruceCharlesDesigns
Maybe a high level overview would help?

Both your 3d printer and your future router will be told what to do with gcode. Gcode covers an entire language of commands that can instruct machines to move to coordinates, turn spindles on and off, change extruder temperatures, etc. Everything that either of those machines does can be commanded via the correct code.

Where did the gcode come from? Well, you can write it yourself. As an example, a G0 is a rapid movement, an example being G0 X0 Y0, which is commanding a rapid movement of the X and Y axis to 0. This would probably position your 3d printer in whichever corner of the build surface it considered to be the home position. Not guaranteed, but likely.

But you probably never wrote your own gcode for the printer. You used a slicer. So let's move up a couple of levels and work back down to the slicer. At the top level you have a design. This is your CAD. Fusion 360 is an example of a great way to create a 3d model of what you are wanting to create. But there are many ways to create 3d models so slicers work with a simplified 3d model that most CAD packages can export to, an STL file. This file doesn't contain any of the information about how you created your model, it is merely a representation of your models surface broken down into a mesh of very small triangles.

The slicer then slices this into layers and creates gcode to command the printer to move to spots along those layers, extruding plastic at the appropriate time. The printer creates a 3d plastic version of the STL file the slicer was given, but all of the instructions to do so are given in gcode. You take the gcode file, copy it to an sd card perhaps, and load it on your 3d printer. The 3d printer itself has controlling software that interprets the gcode and acts accordingly. Perhaps you have heard of Marlin, which is an example of this type of control software.

Now, if you had wanted to machine this file instead of 3d print, there is no slicing and no STL file. Instead, you would go through a process of CAM (computer aided manufacturing) and you would decide what tools you would use in your router to remove the material from a piece of raw stock to leave behind the part you have designed. Fusion 360 includes both CAD and CAM and it is easy to switch from one to the other.

You would define the tools and toolpaths using high level ideas, such as instructing the CAM to move the tool along the contour of a part, or perhaps specify points to be drilled, the drill to use, and the depth to drill. You would also need to decide RPM, movement speeds etc. It is similar to choosing extrusion temperatures and layer heights for 3d printing, but there is much more for you to decide. Choosing the tools for the job and the toolpaths to accomplish the job will be something you'll work on understanding for a bit, and then work on getting really good at for a long time. Like as long as you are doing it. :)

And when you have your CAM done, you would then instruct the CAM software to process this into gcode. You did the work of the slicer, in essence, deciding how to create your part in CAM, then allowing the CAM package to create the gcode to instruct your router.

And finally, just like the 3d printer needs something like Marlin to interpret the gcode, your router needs a similar controller. That controller can be (should be?) LinuxCNC. LinuxCNC will be what you load the gcode file into, and it will be the layer between your gcode and the machine. This means that LinuxCNC will need to know how to interface with the hardware on your machine in order to command the movements and operations needed. In the case of your router, it will need to know things such as how to talk to the stepper motors so that a command of G0 X0 can move the stepper motor(s) responsible for moving the X axis. It will need to know how to home the machine, how to turn spindle motors on and off and command specific RPM, etc.

A very common scenario for entry level machines is a parallel port on the PC is connected to a breakout board that allows you to wire specific pins from the parallel port to the hardware on your router. In this case, a working configuration can be created with the stepconf wizard of LinuxCNC in which you will configure the pins of the port to the hardware (stepper drivers, relays, switches) to which you have connected them. Later you can look at the .hal and .ini files created by stepconf and modify them further to get exactly what you're wanting. You can get lots of help with that here on the forum.

I have thoroughly enjoyed my LinuxCNC experience, even though the learning curve has been steep. I knew nothing of Linux and barely knew what I was doing with CNC two years ago. I started with an arduino running another controller, GRBL, but it lacked features I wanted so LinuxCNC was next and I've never looked back.

If you are new to this I highly recommend you get an old PC with a parallel port, a breakout board (search this forum) a cheap steper driver and a cheap stepper motor and make a test bed. Just get LinuxCNC driving a stepper motor via a parallel port and the rest will all click. Since you can usually get an old pc with windows from a friend who hasn't thrown it away yet, your total investment can be under $100. And if you go on with the router, you can probably use the pc you used for this testbed.

Hope that helps. Good luck!
The following user(s) said Thank You: tommylight, rodw, JohnnyCNC, thefabricator03

Please Log in or Create an account to join the conversation.

More
30 Dec 2020 00:05 #193468 by JohnnyCNC
BruceCharlesDesigns your post is the kind that should be put is a special place labeled "Beginners start here". Very good post.

Please Log in or Create an account to join the conversation.

More
30 Dec 2020 13:06 #193527 by BruceCharlesDesigns
Thanks for those kind words!

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum