Skip to content

Instantly share code, notes, and snippets.

View robanonymous's full-sized avatar

Rob Anonymous robanonymous

View GitHub Profile
(go_home.ngc)
O <go_home> sub
G0 Z0.500
G0 X0 Y0
O <go_home> endsub
M2
(touch_plate.ngc)
O <touch_plate> sub
g91 (switch to relative coordinates)
G38.2 Z-1 F6 (down fast to get approximate)
F10 G1 Z.06 (up .08)
G38.2 Z-1 F1 (down slow to get exact)
F10 G1 Z.1 (up .1)
(version 1 set but at 0 and manually hit zero button)
@robanonymous
robanonymous / hal_manualtoolchange.py
Last active April 24, 2022 19:26
This is a custom hal_manualtoolchange file that allows you to control linuxcnc during a tool change. You can find the file in the folder /usr/bin.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os, time
import gettext
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
gettext.install("linuxcnc", localedir=os.path.join(BASE, "share", "locale"), unicode=True)
import linuxcnc, hal
@robanonymous
robanonymous / linuxcnc-sherline.cps
Last active July 4, 2023 22:30
This a custom post processor for Autodesk Fusion 360 that has more options for the Sherline mill (I'm using 5400). To add this file on Mac: Right click on Fusion360 App in Applications, Select Show Package Contents - Navigate to Contents -> Libraries -> Applications -> CAM360 -> Data -> Posts, Grab and Drop File (Authenticate)
/**
Copyright (C) 2012-2015 by Autodesk, Inc.
All rights reserved.
LinuxCNC (EMC2) Sherline post processor configuration.
$Revision: 00001 04fc0f7ff12e03d457d27cfcf3265dfc183241e5 $
$Date: 2016-10-08 13:46:56 $
FORKID {240C366F-30B2-4629-945B-8647E01614FC}