Week07: Computer-controlled machining¶
group assignment
- do your lab’s safety training
- test runout, alignment, fixturing, speeds, feeds, materials, and toolpaths for your machine
This article was written by Yuya Tokuyama.
Machine and software¶
As our lab, FabLab Kannai, did not have a large CNC router, Instructor Tamiya consulted with the manager of FabLab Hamamatsu and arranged for a two-day practical session to be held in Hamamatsu on Saturday 8th and Sunday 9th March.
The details of the CNC machine and software used at FabLab Hamamatsu are as follows.
Machine: CNC Router ZN1325
End Mill: Straight 6mm
Software: CUT2D (for making G-code) / Mach3 (for controlling CNC)
CNC router:「cnc router ZN1325」
Safety Training¶
For safety reasons, we were given safety clothing in the lab. The safety clothing is as follows.
- Eye protection
- Gloves
- Nose cover
- Ear cover


Before we started, the instructor gave us some safety tips to prevent accidents and injuries. Some of them are as follows.
Warning
- Keep the work area clean: Tripping over scattered tools or parts can cause accidents. Also, if a moving router accidentally touches a tool, there is a risk of damage to the blade or injury to the operator.
- Do not use gloves while working: There is a risk of the gloves getting caught in the rotating parts.
- Securely fasten blades and tools: Check that the router bit is correctly attached.
- Securely fasten the workpiece: Use screws or other means to prevent it from moving.
- Path interference: Normally, screws are drilled into the workpiece to secure it in place. These guide holes need to be positioned as close to the workpiece as possible, but the tool path for profile cutting must not interfere with these screws. If there is interference, the router bit will be damaged by the screws.
- Know the location of the emergency stop button: Check the location before starting work so that you can stop immediately
- Stay focused while working: Keep an eye on the CNC router during processing, and stop immediately if anything goes wrong.
- Check the settings: Check that the rotation speed and feed speed of the router bit are suitable for the material and processing content. If the rotation speed or feed speed is too high, there is a risk of the router bit breaking or catching fire due to heating.
- Prevention of fire and equipment damage: If wood shavings or cutting debris are left around, they may catch fire due to the friction heat of the router bit.
Workflow¶
The workflow from CAD data preparation to CNC milling at FabLab Hamamatsu is shown in the following diagram.
When saving 2D data as an AI file, please save it in the CS version.
Tip
Cut2D can import not only AI files but also SVG and DXF files, but when you import an SVG file into Cut2D, the outline of the CAD data will be different from the original size. Therefore, you need to import the SVG file into Adobe Illustrator and convert it to an AI file. Also, when saving the AI file, you need to select “CS2” as the file version.
Test cut¶
We used Cut2D to draw a 100mm x 100mm square and a 50mm x 50mm square with the same center, and then made a test cut.
Creating G-code with Cut2D¶
- Start a new project:
- Start the Cut2D software and select “New Project” or “New File”.
- Input the dimensions of the board you brought in (width: 910mm, height: 1,820mm, thickness: 12mm).
- XY Origin Position: Be sure to specify the left front corner of the board as the origin of the XY plane.
- Import or create vector designs:
- Import AI files using the “Import Vectors” button.
- Use the software’s tools to create designs for simple shapes.


- Toolpath settings:
- Open the “Toolpaths” tab and select the machining method to use (pocket, profile, or drill).
- Select the tool to use (end mill or bit), and set parameters such as rotation speed, cutting depth (cutting depth: 12mm), and tool diameter (6mm).


- Generate G-code:
- Click the “Calculate” button when you have finished setting up.
- Check the preview and make adjustments as necessary.
- Save files:
- Click the “Save Toolpath” button, select the toolpath and cutting profile for pocket drilling, and export each file individually in G-code.
Tip
By properly installing the tabs, you can maintain processing accuracy without the cut section shifting. It also prevents the parts from moving and interfering with the tool path, reducing damage to the tool blade and spindle.


Controlling a CNC router with Mach3¶
- Start Mach3:
- Start the Mach3 software on the PC connected to the CNC router.
-
Select the appropriate profile:
- Select the profile (e.g. Mill) that corresponds to the CNC router used on the Mach3 startup screen.
-
Loading a G-code file:
- Select “Load G-code” from the “File” menu.
- Specify the G-code file generated by Cut2D and load it into Mach3.
-
Check in Preview:
- Check the cutting path in the Mach3 preview window.
- Check that the path matches the intended machining content.
-
Change Router Bit:
- Change the bit as necessary.
- When changing the bit, carefully loosen the spindle collet (tool holding part) using a wrench and remove the current bit.
- After inserting the bit to be used into the spindle, secure it in place with the collet, and tighten it firmly so that it does not loosen.。



- Set Origin:
- Operate the CNC router to set the starting position (origin of X, Y, and Z axes) of the material to be processed.
- Click the “Zero X”, “Zero Y”, and “Zero Z” buttons to record the origin in Mach3.
- Using the CNC router, move the drill to the right end of the X-axis and check that the wood is parallel to the X-axis. If it is not, adjust the right end while keeping the left end fixed to make it parallel.
-
Start the CNC router:
- Start the spindle (blade) as necessary.
- Click the “Cycle Start” button to start processing.
-
Monitor processing:
- Always check that processing is progressing correctly.
- If an abnormality occurs, immediately press the “Stop” button to stop it.
- Checking after processing:
- When processing is complete, press the “Reset” button to initialize the Mach3 status.
- Remove the workpiece and check the finish.
Warning
While the CNC router is running, keep the mouse cursor over the “Stop” button on the control panel so that you can stop the operation immediately if a problem is detected. You can also press the red hardware button to shut down the operation. However, in that case, all information about the origin will be deleted, so you will need to start over from the origin settings.
Measurement¶
After completion, I used a caliper to measure the dimensions of the cut-out area. The x and y values of the 100mm x 100mm square are +0.38 and +0.53 respectively. The outer circumference of the inner square has been cut by 6.01mm (the diameter of the end mill), so I confirmed that it is approximately 12mm smaller than 50mm (twice the diameter of the end mill).

