Linux cnc и emc2

1 EMC2

The focus of this manual is on using EMC. It is intended to be used once EMC is installed and configured. For standard installations see the Getting Started Guide for step by step instructions to get you up and going. For detailed information on installation and configuration of EMC see the Integrator Manual.

1.2 How EMC2 Works

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.

Figure [.] shows a simple block diagram showing what a typical 3-axis EMC2 system might look like. This diagram shows a stepper motor system. The PC, running Linux as its operating system, is actually controlling the stepper motor drives by sending signals through the printer port. These signals (pulses) make the stepper drives move the stepper motors. The EMC2 can also run servo motors via servo interface cards or by using an extended parallel port to connect with external control boards. As we examine each of the components that make up an EMC2 system we will remind the reader of this typical machine.

1.3 User Interfaces

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

1.4 Languages

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.

1.5 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.

1.6 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 or key on the keyboard.

Some motion control commands are available and will cause the same changes in motion in all modes. These include abort , estop , 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.

Источник

1 Installing the EMC2 software

One of the problems users often complained about EMC was installing the software itself. They were forced to get sources, and compile themselves, and try to set up a RT-patched Linux, etc. The developers of EMC2 chose to go with a standard distribution called Ubuntu 1 .

Ubuntu has been chosen, because it fits perfectly into the Open Source views of EMC2:

  • Ubuntu will always be free of charge, and there is no extra fee for the «enterprise edition», we make our very best work available to everyone on the same Free terms.
  • Ubuntu comes with full professional support on commercial terms from hundreds of companies around the world, if you need those services. Each new version of Ubuntu receives free security updates for 18 months after release, some versions are supported for even longer.
  • Ubuntu uses the very best in translations and accessibility infrastructure that the Free Software community has to offer, to make Ubuntu usable for as many people as possible.
  • Ubuntu is released regularly and predictably; a new release is made every six months. You can use the current stable release or help improve the current development release.
  • The Ubuntu community is entirely committed to the principles of free software development; we encourage people to use open source software, improve it and pass it on.

1.2 EMC2 Live CD

The EMC2 team now has a custom Live-CD based on Ubuntu 6.06 and 8.04 that will let you try out EMC2 before installing, and it’s also the easiest way to install Ubuntu and EMC2 together.

Just download the ISO from www.linuxcnc.org and burn it to a CD.

When you boot the CD on your machine, you can see and experiment with the exact environment and EMC2 software that you will have if you choose to install it.

If you like what you see, just click the Install icon on the desktop, answer a few questions (your name, timezone, password) and the install completes in a few minutes.

This install gives you all the benefits of the community-supported Ubuntu distribution as well as being automatically configured for EMC2. As new Ubuntu updates or EMC2 releases are made, the Update manager will let you know and allow you to easily upgrade.

1.3 Other Methods

You will find information about other install methods on the following web sites.

http://www.linuxcnc.org (Home of EMC2)

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl (User maintained Wiki EMC2 site)

1.4 EMC2 install script

We also provide a simple script to install EMC2 on Ubuntu for users with an existing installation of Ubuntu. It runs the commands explained in [.].

  • Download the script from http://linuxcnc.org/dapper/emc2-install.sh (For Ubuntu 6.06)
  • Save it on your Desktop. Right-click the icon, select Properties. Go to the Permissions tab and check the box for Owner: Execute. Close the Properties window.
  • Now double-click the emc2-install.sh icon, and select «Run in Terminal». A terminal will appear and you will be asked for your password.
  • When the installation asks if you are sure you want to install the EMC2 packages, hit Enter to accept. Now just allow the install to finish.
  • When it is done, you must reboot (System > Log Out > Restart the Computer), and when you log in again you can run EMC2 by selecting it on the Applications > CNC Menu.
  • If you aren’t ready to set up a machine configuration, try the sim-AXIS configuration; it runs a «simulated machine» that requires no attached hardware.
  • Now that the initial installation is done, Ubuntu will prompt you when updates of EMC2 or its supporting files are available. When they are, you can update them easily and automatically with the Update Manager.

1.5 Manual installing using apt commands.

The following few section will describe how to install EMC2 on Ubuntu 6.06 “Dapper Drake” using a console and apt-commands. If you know a bit about Linux and Debian-flavored distributions this might be trivial. If not, you might consider reading [.].

First add the repository to /etc/apt/sources.list:

$ sudo sh -c ‘echo «deb http://www.linuxcnc.org/emc2/ dapper emc2.2» >>/etc/apt/sources.list;’
$ sudo sh -c ‘echo «deb-src http://www.linuxcnc.org/emc2/ dapper emc2.2» >>/etc/apt/sources.list’

$ sudo apt-get update
$ sudo apt-get install emc2

This command will install the EMC2 package along with all dependencies 2 .

You might get warnings that the packages are from an untrusted source (this means your computer doesn’t recognize the GPG signature on the packages). To correct that issue the following commands:

$ gpg —keyserver pgpkeys.mit.edu —recv-key BC92B87F
$ gpg -a —export BC92B87F | sudo apt-key add —

Index


Footnotes

1 “Ubuntu” is an ancient African word, meaning “humanity to others”. Ubuntu also means “I am what I am because of who we all are”. The Ubuntu Linux distribution brings the spirit of Ubuntu to the software world. You can read more about it at http://www.ubuntu.com back

2 The dependencies are one of the nicest thing in Debian based distributions. They assure you have everything installed that you need. In the case of EMC2 it’s even a RT-patched kernel, and all needed libraries. back

Источник

Читайте также:  Linux mdadm vs lvm
Оцените статью
Adblock
detector