This documentation is no longer maintained. For documentation of the current version of emc2, please see http://www.linuxcnc.org/docview/html

Table of Contents

1 G-Code Examples

After you install EMC2 several sample files are placed in the /nc_files folder. Make sure the sample file is appropriate for your machine before running.

1.1 Mill Examples

1.1.1 Helical Hole Milling

File Name: useful-subroutines.ngc

Description: Subroutine for milling a hole using parameters.

1.1.2 Slotting

File Name: useful-subroutines.ngc

Decription: Subroutine for milling a slot using parameters.

1.1.3 Grid Probe

File Name: gridprobe.ngc

Description: Rectangular Probing

This program repeatedly probes in a regular XY grid and writes the probed location to the file 'probe-results.txt' in the same directory as the .ini file.

1.1.4 Smart Probe

File Name: smartprobe.ngc

Description: Rectangular Probing

This program repeatedly probes in a regular XY grid and writes the probed location to the file 'probe-results.txt' in the same directory as the .ini file. This is improved from the grid probe file.

1.1.5 Tool Length Probe

File Name: tool-lenght-probe.ngc

Description: Tool Length Probing

This program shows an example of how to measure tool lengths automatically using a switch hooked to the probe input. This is useful for machines without tool holders, where the length of a tool is different every time it is inserted.

1.1.6 Hole Probe

File Name: probe-hole.ngc

Description: Finding the Center and Diameter of a hole.

The program demonstrates how to find the center of a hole, measure the hole diameter and record the results.

1.1.7 Cutter Compensation

To be added

1.2 Lathe Examples

1.2.1 Threading

File Name lathe-g76.ngc

Description: Facing, threading and parting off.

This file shows an example of threading on a lathe using parameters.