G-code is a programming language that the machine understands and is a series of commands that tells the machine what actions to perform - where to move, what speed to use, what temperatures to set, and much more. Before you start CNC carving, you need to download the software Snapmaker Luban from our website and install it. And you need to generate the G-code file from a model or image.
5.1 Generate G-code Using Fusion 360
For more instructions on how to generate G-code using Fusion 360, refer to CNC Cutting with Files Exported from Fusion 360.
5.2 Generate G-code Using Snapmaker Luban
5.2.1 Generating G-code Workflow
The workflow of G-code generating is:
Select the CNC G-code Generator -> Upload model file (Or enter text by clicking T) -> Configure
the parameters in Editor -> Select the CNC bit in Process -> Configure the parameters in Process -> Generate G-code.
Note 1: Make sure you have selected the correct machine model Original in the top left corner.
Note 2: You can generate several model files into a single G-code to do carving all at once.
Note 3: Left click the image to modify the parameters, and right click it to pop up the operation menu.
Note 4: Three modes are available in the software, including:
Relief: You need to upload greyscale images, and the layering effect is based on the different shades of color on your original images. You can use Carving V-Bit in Relief mode.
Vector: This effect is used for carving vector graphics, which is applicable to pocket milling and 2D profile cutting. You can use Flat End Mill in Vector mode.
Text: You can select the font and enter the text as you need. You can also upload your own fonts. You can use Carving V-Bit, Flat End Mill, and Ball End Mill in Text mode.
Note 5: Auto Preview is enabled by default, which shows the dynamic preview after you modify the parameters. When Auto Preview is disabled, you need to click Preview to check the current status.
Note 6: You can also generate G-code by Fusion 360 if you have more requirements for the CNC functionality or want to carve your own design.
5.2.2 How to Generate G-code in Vector Mode
This section explains the steps of generating G-code in Vector mode and the meaning of each parameter. And this is an example of acrylic cutting with an SVG image.
1. Select the CNC G-code Generator .
2. Click Open File to upload an SVG image.
3. You can adjust the image size, rotate or move the image as needed. After configuring the parameters in Editor, click Process.
4. As this is an example of acrylic cutting with an SVG image, the proper CNC bit is 1.5mm Flat End Mill.
5. Select the Carve Path. 3 types of carve path are available: On the Path, Outline and Fill. We choose On the Path in this case.
On the Path: The CNC bit carves along the shape of the image. The carve path is marked in blue lines.
Outline: The CNC bit carves along the contour of the image. The carve path is marked in blue lines.
Fill: The CNC bit carves away the inner of the image. The carve path is marked in blue.
6. Set the Target Depth. To carve through the material, the target depth should be slightly larger than the thickness of the material. As the acrylic board used in this case is 3mm thick, the target depth can be set at 3.2mm, for example.
7. Set the Step Down. Each type of material has an appropriate depth of every carving step, exceeding the depth range may lead to breaking of the CNC bit or other risks. For acrylic cutting, the recommended step down is 0.4mm (Since the target depth is 3.2mm, it takes 8 steps to carve through the material).
8. Set the Jog Height. Before the machine switches among the carving routes, the CNC bit will be lifted to a certain height, which is called jog height. In this case, we set it at 2mm.
9. Set the Stop Height. It means the distance between the CNC bit and the material when the machine completes carving. In this case, we set it at 10mm.
10. Set the Tabs if necessary. Tabs refer to the connecting structure among the material and the carved objects, which help with fixing the independent parts of the carving and improving the success rate. You need to set the Tab Height, Tab Space and Tab Width.
Tab Height: Now that the material is 3mm thick, when the tab height is set at -0.5mm, the height of the connecting structure is 2.5mm.
Tab Space: The distance between any 2 tabs. In this case, the tab space is 24mm.
Tab Width: The width in this case is set at 2mm, as shown in the figure below.
11. Set the Print Order. When carving multiple images with a single G-code file, this parameter determines the order of carving. When the orders are the same, the image uploaded first will be carved first.
12. Set the Jog Speed. It determines how fast the CNC bit moves at the jog height when switching to another carving route. The jog speed for this case is 3000mm/min.
13. Set the Work Speed, i.e. the carving speed. For this case, the speed is 400mm/min.
14. Set the Plunge Speed. It refers to the lifting / sinking speed of the CNC bit, which is set at 400mm/min in this case.
15. After configuring the parameters in Process, click Generate G-code.
5.2.3 How to Generate G-code in Relief Mode
This section explains the steps of generating G-code in Relief mode and the meaning of each parameter. And this is an example of wood carving in which a relief will be made.
1. Select the CNC G-code Generator .
2. Click Open File to upload a greyscale image.
3. You can adjust the image size, rotate, move or flip the image as needed. After configuring the parameters in Editor, click Process.
Invert: You can invert the shades of color on the image, which means the primary light-colored parts will be dark-colored. The darker the color is, the more it will be carved.
4. As this is an example of wood carving in which a relief will be made, the proper CNC bit is Carving V-Bit.
5. Set the Target Depth. The target depth we set in this case is 3mm (P.S. The board is 20mm thick).
6. Set the Step Down. Each type of material has an appropriate depth of every carving step, exceeding the depth range may lead to breaking of the CNC bit or other risks. The step down here is 0.1mm.
7. Set the Jog Height. Before the machine switches among the carving routes, the CNC bit will be lifted to a certain height, which is called jog height. In this case, we set it at 3mm.
8. Set the Stop Height. It means the distance between the CNC bit and the material when the machine completes carving. In this case, we set it at 10mm.
9. Set the Density. Higher density means more carving times. We set it at 6 dot/mm here. Following is a comparison between the actual effects of 2 dot/mm and 8 dot/mm densities.
Note: The density can be set up to 10 dot/mm. To achieve the optimal carving effect, the software may recalculate the density when generating G-code.
Density: 2 dot/mm
Density: 8 dot/mm
10. Set the Print Order. When carving multiple images with a single G-code file, this parameter determines the order of carving. When the orders are the same, the image uploaded first will be carved first.
11. Set the Jog Speed. It determines how fast the CNC bit moves at the jog height when switching to another carving route. The jog speed for this case is 3000mm/min.
12. Set the Work Speed, i.e. the carving speed. For this case, the speed is 600mm/min.
13. Set the Plunge Speed. It refers to the lifting / sinking speed of the CNC bit, which is set at 400mm/min in this case.
14. After configuring the parameters in Process, click Generate G-code.