-
Notifications
You must be signed in to change notification settings - Fork 4
Running a job (#3): loading, preparing and running Gcode with LinuxCNC
Quick links:
- Launch LinuxCNC with Mesa 4x4 configuration
- Load and view your G-code
- Unlock and enable the machine
- Home all axes
- Jog machine to desired origin on workpiece
- Align machine coordinates to workpiece
- Jog the machine around your job to check travel
- Run your job in the air to check travel
- Touch off Z axis to top of workpiece
- Run your job
- Monitoring, pausing and stopping your job
IMPORTANT! Before you load and run any G-code make sure you have done the following:
- Checked the machine for any significant mechanical problems and cleared debris
- Properly installed an appropriate end mill or router bit into the spindle
- Powered on and checked the machine's electronics system
- Logged on to the host machine PC
- Secured your workpiece to the spoilboard
Use the "Mesa 4x4" desktop icon to launch LinuxCNC pre-configured with all the settings for our machine.
Load your G-code file using File > Open.
Once loaded, use the mouse to fly the camera around and orient the screen in a way that makes sense to you. You can also use the X/Y/Z view buttons to snap to standard views.
Note the cube marked by the red dotted lines. This indicates the work envelope of the machine, and no toolpaths or movements are allowed outside of this box (they will be stopped by "soft" limits).
- For safety reasons the machine is locked until you manually enable it.
- Click the red X button to disable Emergency Stop (or hit F1), which should enable other buttons on the toolbar.
- One of these buttons is the Machine Power button directly next to the Emergency Stop button. Click it or hit F2 to power up the system. You may notice the machine jump slightly and start to hum - that means its alive!
Before the machine can understand where you want it to move to, it needs to first understand where it is. We do this with a process called homing, which involves slowly moving each axis until it hits it's respective minimum endstop, at which point the machine knows for sure that the axis is at the 0 position.
Although we have the ability to home all axes at once, I recommend homing each axis individually so that you can carefully watch the movement of each axis from start to finish at your own pace.
Follow this process for each axis, starting with the Z axis:
- In the Machine control (F3) tab on the left, make sure that the axis you want to home is selected
- Click the Home button
You can hit the Emergency Stop button at any time during the homing process if you needed.
Use the keyboard arrow keys to move the spindle to wherever you want the origin to be on your workpiece.
- Move the X axis with left/right arrow keys.
- Move the Y axis with up/down arrow keys.
- Leave the Z axis all the way up for now.
If the machine is running too fast or too slow for you, check the movement increment in LinuxCNC. Be careful not to go too fast though!
Although we've physically moved the spindle to where we want our job to start, right now LinuxCNC still thinks that the origin (0,0) is at the very bottom left of the spoilboard. This means that if you were to hit the "Start" button to run your G-code, the machine would run all the way back there to cut out your part!
To tell the machine that we want it to consider the current position to be the new origin we need to touch off each axis using the following process:
- In the Machine control (F3) tab on the left, make sure that the X axis is selected
- Click the "Touch off" button.
- Hit OK on the dialog box that pops up, and you should see the screen on the right update to shift the machine's coordinate system (in red) to line up with your job.
- Repeat this process for the Y axis, but leave the Z axis alone for now.
With the Z axis still all the way up, use the keyboard arrow keys to carefully jog the machine all the way around your toolpath, checking to make sure that the movement is smooth and even and that there is no risk of the end mill, collet or dust shoe running into any clamps once they are lowered.
With the Z axis still all the way up, let's go ahead and do a test run of your job in the air to make extra sure that no problems will happen when the Z axis is lowered.
If your G-code has any retraction movements (negative Z values) in it, for example to cut out multiple, separate shapes, you may lower the Z axis an inch or so to give it some room. Just like the X and Y axes, use the keyboard page up/down buttons to move the Z axis to where you want it, then use the Z axis "Touch off" button to set the new 0 coordinate.
Hit the "Play" button to run your job, and get ready to hit the "Stop" button at any moment should anything go wrong.
NOTE: In order to preserve the spoilboard and extend it's life as long as possible, this step is critical to get right! If you measured your workpiece thickness accurately enough during your CAM setup, the spindle should not even touch the spoilboard (or just make very, very shallow indentations in it) when cutting all the way through.
If running your job in the air looked good, you can now align the Z axis to your workpiece by using the keyboard page up/down keys. Use a relatively large movement increment when you're far away from the workpiece, then use a much smaller increment (like 0.1in) when you are getting close.
If you need to get it really accurate, try putting a piece of paper on the workpiece and moving the Z axis downward until you can just barely move the paper between the end mill and spoilboard.
In the near future we will have a more precise automatic Z height probe, but for now just get as close as you can!
IMPORTANT! Put on safety glasses and hearing protection before running your job!
Check one last time for the following:
- Blue coolant should be flowing in and out of the spindle. If not, go back to the Machine setup step.
- The X, Y and Z axes should all be "touched off" so that the machine knows where your workpiece is.
If things look good, hit the "Play" button and be ready to hit the "Stop" or "Emergency Stop" button at any moment.
The spindle should spin up right away, then the machine will follow all of the toolpaths.
If you are a member of TC Maker and would like to help improve this documentation, please shoot me a message and I'll get you added as a collaborator!