The Enhanced Machine Controller (EMC2) is a lot more than just another CNC mill program. It can control machine tools, robots, or other automated devices. It can control servo motors, stepper motors, relays, and other devices related to machine tools.

There are four main components to the EMC2 software: a motion controller, a discrete I/O controller, a task executor which coordinates them, and graphical user interfaces. In addition there is a layer called HAL (Hardware Abstraction Layer) which allows configuration of EMC2 without the need of recompiling.

A user interface is the part of the EMC2 that the machine tool operator interacts with. The EMC2 comes with several types of user interfaces:

  • AXIS an OpenGL-based GUI (Graphical User Interface), with an interactive G-Code previewer. This interface is one of the few that are still under active development and improvement.
  • Keystick a character-based screen graphics program suitable for minimal installations (without the X server running).
  • Xemc an X Windows program
  • two Tcl/Tk-based GUIs named TkEMC and Mini
  • a HAL based user interface called halui, which allows to control emc2 using knobs and switches
  • a telnet based user interface called emcrsh, which allows commands to be sent to emc2 from remote computers




EMC2 uses translation files to translate EMC User Interfaces into many languages. You just need to log in with the language you intend to use and when you start up EMC it comes up in that language. If your language has not been translated contact a developer on the IRC or the mailing list if you can assist in the translation.


Thinking Like a Machine Operator

This book will not even pretend that it can teach you to run a mill or a lathe. Becoming a machinist takes time and hard work. An author once said, “We learn from experience, if at all.” Broken tools, gouged vices, and scars are the evidence of lessons taught. Good part finish, close tolerances, and careful work are the evidence of lessons learned. No machine, no computer program, can take the place of human experience.

As you begin to work with the EMC2 program, you will need to place yourself in the position of operator. You need to think of yourself in the role of the one in charge of a machine. It is a machine that is either waiting for your command or executing the command that you have just given it. Throughout these pages we will give information that will help you become a good operator of the EMC2 mill. You will need some information right up front here so that the following pages will make sense to you.


  • EMC is free software with open source code. Current versions of EMC are entirely licensed under the GNU General Public License and Lesser GNU General Public License (GPL and LGPL)
  • EMC provides:
  • several graphical user interfaces including one for touch screens
  • an interpreter for “G-code” (the RS-274 machine tool programming language)
  • a realtime motion planning system with look-ahead
  • operation of low-level machine electronics such as sensors and motor drives
  • an easy to use “breadboard” layer for quickly creating a unique configuration for your machine
  • a software PLC programmable with ladder diagrams
  • easy installation with .deb packages or a Live-CD

It does not provide drawing (CAD – Computer Aided Design) or G-code generation from the drawing (CAM – Computer Automated Manufacturing) functions.

  • It can simultaneously move up to 9 axes and supports a variety of interfaces.
  • The control can operate true servos (analog or PWM) with the feedback loop closed by the EMC software at the computer, or open loop with “step-servos” or stepper motors.
  • Motion control features include: cutter radius and length compensation, path deviation limited to a specified tolerance, lathe threading, synchronized axis motion, adaptive feedrate, operator feed override, and constant velocity control.
  • Support for non-Cartesian motion systems is provided via custom kinematics modules. Available architectures include hexapods (Stewart platforms and similar concepts) and systems with rotary joints to provide motion such as PUMA or SCARA robots.
  • EMC runs on Linux using real time extensions. Support currently exists for version 2.4 and 2.6 Linux kernels with real time extensions applied by RT-Linux or RTAI patches.



 Modes of Operation

When an EMC2 is running, there are three different major modes used for inputting commands. These are Manual, Auto, and MDI. Changing from one mode to another makes a big difference in the way that the EMC2 behaves. There are specific things that can be done in one mode that can not be done in another. An operator can home an axis in manual mode but not in auto or MDI modes. An operator can cause the machine to execute a whole file full of G-codes in the auto mode but not in manual or MDI.

In manual mode, each command is entered separately. In human terms a manual command might be “turn on coolant” or “jog X at 25 inches per minute”. These are roughly equivalent to flipping a switch or turning the hand wheel for an axis. These commands are normally handled on one of the graphical interfaces by pressing a button with the mouse or holding down a key on the keyboard. In auto mode, a similar button or key press might be used to load or start the running of a whole program of G-code that is stored in a file. In the MDI mode the operator might type in a block of code and tell the machine to execute it by pressing the <return> or <enter> key on the keyboard.

Some motion control commands are available and will cause the same changes in motion in all modes. These include abortestop, and feed rate override. Commands like these should be self explanatory.

The AXIS user interface hides some of the distinctions between Auto and the other modes by making Auto-commands available at most times. It also blurs the distinction between Manual and MDI because some Manual commands like Touch Off are actually implemented by sending MDI commands. It does this by automatically changing to the mode that is needed for the action the user has requested.

We'll One Over 5 Years Of Experience You Always The Best Guidance

Contact Us