-
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 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 can successfully load and run any G-code make sure you have done the following:
- Powered on and checked the machine's electronics system
- Secured your workpiece to the spoilboard
- Logged on to the host machine PC
- Use desktop icon to launch LinuxCNC (AXIS) pre-configured with all the settings for our machine
- Load your G-code file using File > Open
- Use the mouse to fly around the toolpaths 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.
- The red dotted lines indicate the work envelope of the machine. Make sure your job is within it
- 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.
-
Start with Z axis to make sure spindle is up and out of the way of any clamps and workpieces.
- Use the keyboard arrow keys to move the spindle to wherever you want the origin to be on your workpiece. Left/right for X axis, up/down for Y axis. Don't mess with Z just yet.
- 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 coordinate 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 to start our job at our current location we need to use a command to tell it to treat our current location as the new 0,0 for now. This command is the G54 work offset command, and LinuxCNC provides us with a nice, visual way of doing it through the UI.
In the Machine control (F3) tab on the left, make sure that the X axis is selected, then 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. Do the same process for the Y axis. 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.
If running your job in the air look 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 on 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!