|
From: <ray...@us...> - 2003-07-16 19:47:25
|
Update of /cvsroot/emc/documents/lyx In directory sc8-pr-cvs1:/tmp/cvs-serv5439 Modified Files: User_Whatis_EMC.lyx Log Message: added some history and how it works Index: User_Whatis_EMC.lyx =================================================================== RCS file: /cvsroot/emc/documents/lyx/User_Whatis_EMC.lyx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** User_Whatis_EMC.lyx 5 Jul 2003 01:44:29 -0000 1.1 --- User_Whatis_EMC.lyx 16 Jul 2003 19:47:20 -0000 1.2 *************** *** 54,57 **** --- 54,94 ---- these topics are covered in greater detail. + \layout Standard + + The EMC code was started by the Intelligent Systems Division at the National + Institute of Standards and Technology in the United States. + The quotation below, taken from the NIST web presence some time back, should + lend some understanding of the essential reasons for the existence of this + software and of the NIST involvement in it. + \layout Quotation + + As part of our (NIST) collaboration with the OMAC User's Group, we have + written software which implements real-time control of equipment such as + machine tools, robots, and coordinate measuring machines. + The goal of this software development is twofold: first, to provide complete + software implementations of all OMAC modules for the purpose of validating + application programming interfaces; and second, to provide a vehicle for + the transfer of control technology to small- and medium-sized manufacturers + via the NIST Manufacturing Extension Partnership. + The EMC software is based on the NIST Real-time Control System (RCS) Methodolog + y, and is programmed using the NIST RCS Library. + The RCS Library eases the porting of controller code to a variety of Unix + and Microsoft platforms, providing a neutral application programming interface + (API) to operating system resources such as shared memory, semaphores, + and timers. + The RCS Library also implements a communication model, the Neutral Manufacturin + g Language, which allows control processes to read and write C++ data structures + throughout a single homogeneous environment or a heterogeneous networked + environment. + The EMC software is written in C and C++, and has been ported to the PC + Linux, Windows NT, and Sun Solaris operating systems. + When running actual equipment, a real-time version of Linux is used to + achieve the deterministic computation rates required (200 microseconds + is typical). + The software can also be run entirely in simulation, down to simulations + of the machine motors. + This enables entire factories of EMC machines to be set up and run in a + computer integrated manufacturing environment. + \layout Section *************** *** 59,77 **** \layout Standard ! The Enhanced Machine Controller is a multipurpose motion control program ! that was started by the National Institute of Standards and Technology ! in the United States. Most of it has been written by employees of the Departmen ! t of Commerce and is therefore public domain code. \layout Standard ! (more history here) \layout Standard ! The files that make up the computer code are kept in a repository on www.sourcefo ! rge.net. ! They are available for anyone to download and use as they see fit. Most ! of these files are copyrighted under the GPL or GPLD license. These files ! require that you make your source of them available to your users. GPL copyright also requires that if you modify the code in that file and make a public release of your revisions, you must return your modifications --- 96,154 ---- \layout Standard ! EMCs have been installed on many machines, both with servo motors and stepper ! motors. ! Here is a sampling of the earliest applications. ! ! \layout Itemize ! ! 3-axis Bridgeport knee mill at Shaver Engineering. ! The machine uses DC brush servo motors and encoders for motion control, ! and OPTO-22 compatible I/O interfaced to the PC parallel port for digital ! I/O to the spindle, coolant, lube, and estop systems. ! ! \layout Itemize ! ! 3-axis desktop milling machine used for prototype development. ! The machine uses DC brush servo motors and encoders. ! Spindle control is accomplished using the 4th motion control axis. ! The machine cuts wax parts. ! ! \layout Itemize ! ! 4-axis Kearney & Trecker horizontal machining center at General Motors Powertrai ! n in Pontiac, MI. ! This machine ran a precursor to the full-software EMC which used a hardware ! motion control board. \layout Standard ! After these early tests, Jon Elson found the Shaver Engineering notes and ! replaced a refrigerator sized Allen Bradley 7300 control on his Bridgeport ! with the EMC running on a Red Hat 5.2 distribution of Linux. ! He was so pleased with the result that he advertised the software on several ! news groups. ! He continues to use that installation and has produced several boards that ! are supported by the software. ! \layout Standard ! From these early applications news of the software spread around the world. ! It is now used to control many different kinds of machines. ! More recently the Sherline company ! \begin_inset LatexCommand \url{http://www.sherline.com} ! ! \end_inset ! ! has released their first CNC mill. ! It uses a standard release of the EMC. ! ! \layout Standard ! ! The source code files that make up the controller are kept in a repository ! on www.sourceforge.net. ! They are available for anyone to download and use as they see fit. Some ! of the files are public domain while others carry a GPL or GPLD copyright. ! These files require that you make your source of them available to your ! users. GPL copyright also requires that if you modify the code in that file and make a public release of your revisions, you must return your modifications *************** *** 86,109 **** common is some variant of real time extensions for the Linux OS. In addition to the raw code, some binary distributions are available. ! Most of these are a part of the Brain Dead Install or BDI as most of us ! call them. The BDI is a complete distribution. ! They contain compatable versions of Linux, the Real-Time extensions, and pre-compiled EMC files. \layout Standard ! The EMC will not run under a normal MicroSoft (tm) operating system. The reason for this is that the EMC requires a real-time environment for ! the proper opertion of its motion planning and stepper pulse outputs. It is possible to purchase additional software that will compile the EMC code and other software that creates the real-time environment so that ! it will run with a MicroSoft (tm) operating system. The cost of these make using these operating systems difficult. \layout Standard ! It would be more cost effective to use of the the commercial CNC programs ! that have been losely based around or use parts of the EMC software or ! one of programs that are available for a DOS computer. \layout Section --- 163,187 ---- common is some variant of real time extensions for the Linux OS. In addition to the raw code, some binary distributions are available. ! Most of these are a part of the Brain Dead Install or BDI. The BDI is a complete distribution. ! They contain compatible versions of Linux, the Real-Time extensions, and pre-compiled EMC files. \layout Standard ! The EMC will not run under a normal Microsoft (TM) operating system. The reason for this is that the EMC requires a real-time environment for ! the proper operation of its motion planning and stepper pulse outputs. It is possible to purchase additional software that will compile the EMC code and other software that creates the real-time environment so that ! it will run with a Microsoft (TM) operating system. The cost of these make using these operating systems difficult. \layout Standard ! Rather than purchasing a real time component for one of the other operating ! systems, it would be more cost effective to use of the the commercial CNC ! programs that have been loosely based around or use parts of the EMC software ! or one of programs that are available for a computer that runs a DOS operating ! system. \layout Section *************** *** 111,131 **** \layout Standard ! Here is part of the official NIST ! \begin_inset LatexCommand \index{NIST} ! ! \end_inset ! ! definition: "The Enhanced Machine Controller (EMC) program is a NIST effort ! to develop and validate a specification for interfaces to open architecture ! controllers."In simpler terms, EMC is a free and open source CNC controller ! 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. \layout Standard \begin_float fig \layout Standard ! \added_space_top smallskip \added_space_bottom smallskip \align center \begin_inset Figure size 357 268 --- 189,205 ---- \layout Standard ! The Enhanced Machine Controller (EMC) 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. + In this handbook we focus on only a small part of that awesome capability, + the minimill. \layout Standard \begin_float fig \layout Standard ! \added_space_top smallskip \added_space_bottom smallskip \align center \pextra_type 3 \pextra_widthp 65 ! \begin_inset Figure size 357 268 *************** *** 146,149 **** --- 220,229 ---- Typical EMC Controlled Machine \end_float + There are four main components to the EMC software: a motion controller + (EMCMOT), a discrete I/O controller (EMCIO), a task executor which coordinates + them (EMCTASK), and a collection of text-based or graphical user interfaces. + An EMC capable of running a minimill must start some version of all four + of these components in order to completely control it. + Each component is briefly described below \layout Standard *************** *** 161,164 **** --- 241,267 ---- The EMC 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 EMC we will remind + the reader of this typical machine. + \layout Subsection + + Graphical User Interfaces + \layout Standard + + The EMC comes with several types of user interfaces: + \layout Itemize + + an interactive command-line program named emcpanel + \layout Itemize + + a character-based screen graphics program named keystick + \layout Itemize + + X Windows programs named xemc and yemc + \layout Itemize + + a Java-based GUI, emcgui + \layout Itemize + + two Tcl/Tk-based GUIs named tkemc and mini. \layout Standard *************** *** 166,175 **** \begin_float fig \layout Standard ! \added_space_top smallskip \added_space_bottom smallskip \pextra_type 3 \pextra_widthp 50 ! \begin_inset Figure size 238 223 file ../images/whatpc.eps ! width 3 40 flags 15 --- 269,349 ---- \begin_float fig \layout Standard ! \added_space_top smallskip \added_space_bottom smallskip \align center ! ! \begin_inset Figure size 416 375 ! file ../images/whaty4.eps ! width 3 70 ! flags 11 + \end_inset ! ! \layout Caption ! ! ! \begin_inset LatexCommand \label{fig:Graphical_Interface} ! ! \end_inset ! ! A Graphical Interface ! \end_float ! Tkemc and Mini are most commonly used operator interfaces. ! They will run on Linux, Mac, and Microsoft Windows if the Tcl/Tk programming ! language has been installed. ! The Mac and Microsoft Windows version can connect to a real-time EMC running ! on a Linux machine via a network connection, allowing the monitoring of ! the machine from a remote location. ! Instructions for installing and configuring the Microsoft version can be ! found in the integrators handbook. ! \layout Subsection ! ! Motion Controller EMCMOT ! \layout Standard ! ! Motion control includes sampling the position of the axes to be controlled, ! computing the next point on the trajectory, interpolating between these ! trajectory points, and computing an output to the motors. ! For servo systems, the output is based on a PID compensation algorithm. ! For stepper systems, the calculations run open-loop, and pulses are sent ! to the steppers based on whether their accumulated position is more than ! a pulse away from where their commanded position should be. ! The motion controller includes programmable software limits, interfaces ! to hardware limit and home switches. ! \layout Standard ! ! The motion controller is written to be fairly generic. ! Initialization files (with the same syntax as Microsoft Windows INI files) ! are used to configure parameters such as number and type of axes (e.g., linear ! or rotary), scale factors between feedback devices (e.g., encoder counts) ! and axis units (e.g., millimeters), servo gains, servo and trajectory planning ! cycle times, and other system parameters. ! Complex kinematics for robots can be coded in C according to a prescribed ! function interface and linked in to replace the default 3-axis Cartesian ! machine kinematics routines. ! ! \layout Subsection ! ! Discrete I/O Controller EMCIO ! \layout Standard ! ! Discrete I/O controllers are highly machine-specific, and are not customizable ! in general using the INI file technique used to configure the more generic ! motion controller. ! The INI file can be used with an aupiliary parallel port to control some ! machine actions like lube, coolant, and spindle direction and speed. ! ! \layout Subsection ! ! Task Executor EMCTASK ! \layout Standard ! ! \begin_float fig ! \layout Standard ! \added_space_top smallskip \added_space_bottom smallskip \align center \pextra_type 3 \pextra_widthp 70 ! ! ! \begin_inset Figure size 357 334 file ../images/whatpc.eps ! width 3 60 flags 15 *************** *** 186,189 **** --- 360,386 ---- Emc Process Diagram \end_float + The Task Executor is responsible for interpreting G and M code programs + whose behavior does not vary appreciably between machines. + G-code programming is designed to work like a machinist might work. + The motion or turns of a handwheel are coded into blocks. + If a machinist wanted his mill to move an inch in the +X direction at some + feedrate, he might slowly turn the handwheel five turns clockwise in 20 + seconds. + The same machinist programming that same move in the language of CNC's + might write the following block of code. + \layout Standard + + + \emph on + G1 F3 X1.000 + \layout Standard + + G1 means that the machine is supposed to run at a programmed feedrate rather + than at the fastest speed that it can. + (G0) The F3 means that it should travel at 3 inches a minute or 3 milimeters + a minute if it is working in metric mode. + The X1.000 assumes that the machine started at zero and is supposed to go + one inch in the positive direction. + You will read quite a bit more about G-code in the programming chapters. \layout Standard *************** *** 201,205 **** . The actual G-code can be sent using the MDI (Machine Device Interface) ! mode or it can be sent as a file when the macine is in Auto mode. These choices are made by the operator and entered using one of the Graphical User Interfaces available with the software. --- 398,402 ---- . The actual G-code can be sent using the MDI (Machine Device Interface) ! mode or it can be sent as a file when the machine is in Auto mode. These choices are made by the operator and entered using one of the Graphical User Interfaces available with the software. *************** *** 212,252 **** input or output systems and sends blocks of canonical commands to the task and motion planning programs. ! \layout Standard ! \begin_float fig \layout Standard - \added_space_top smallskip \added_space_bottom smallskip \align center ! \begin_inset Figure size 357 322 ! file ../images/whaty4.eps ! width 3 60 ! flags 11 \end_inset ! \layout Caption ! \begin_inset LatexCommand \label{fig:Graphical_Interface} \end_inset ! A Graphical Interface ! \end_float ! \layout Standard ! \align left ! The GUI for EMC (see figure ! \begin_inset LatexCommand \ref{fig:Graphical_Interface} ! \end_inset ! ) comes in many variations, text based, X Windows ! \begin_inset LatexCommand \index{Windows} \end_inset ! , Tcl/Tk, Java, etc... ! The user interface for EMC can easily be customized by users. \the_end --- 409,599 ---- input or output systems and sends blocks of canonical commands to the task and motion planning programs. ! \layout Section ! Thinking Like a Machine Operator \layout Standard ! 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, ! \begin_inset Quotes eld ! \end_inset + We learn from experience, if at all. + \begin_inset Quotes erd \end_inset + Broken tools, gouged vices, and scars are the evidence of lessons taught. + Good part finish and close tolerances are the evidence of lessons learned. + No machine, no computer program, can take the place of human experience. + \layout Standard ! As you begin to work with the EMC 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. ! ! \layout Subsection + Modes of Operation + \layout Standard ! When an EMC is running, there are three different major modes used for inputting ! commands, manual, auto, and mdi. ! Changing from one mode to another makes a big difference in the way that ! the EMC 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. ! ! \layout Standard + In manual mode, each command is entered as a separate command. + In human terms a manual command might be + \begin_inset Quotes eld \end_inset ! turn on coolant ! \begin_inset Quotes erd \end_inset ! or ! \begin_inset Quotes eld ! \end_inset + jog X at 25 inches per minute. + \begin_inset Quotes erd \end_inset ! These commands are normally handled on the graphical interface by pressing ! a button with the mouse or holding down a key on the keyboard. ! In auto mode, a similar button or keypress 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. ! \layout Standard ! ! Some motion control commands are available and will cause the same changes ! in motion in all modes. ! These include abort, estop, and feedrate override. ! \layout Subsection ! ! Information Display ! \layout Standard ! ! While an EMC is running, each of the modules keeps up a dialog with each ! other and with the graphical display. ! It is up to the display to select from that stream of information what ! the operator needs to see and to arrange it on the screen in a way that ! makes it easy for the operator to understand. ! Perhaps the most important display is the mode the EMC is running in. ! You will want to keep your eye on the mode display. ! \layout Standard ! ! Right up there with mode is consistent display of the position of each axis. ! Most of the interfaces will allow the operator to read position based upon ! actual or commanded position as well as machine or relative position. ! ! \layout Description ! \pextra_type 1 \pextra_widthp 5 ! ! Machine This is the position of an axis relative to the place where it started ! or was homed. ! \layout Description ! \pextra_type 1 \pextra_widthp 5 ! ! Relative This is the position of an axis after work or tool or other offsets ! have been applied ! \layout Description ! \pextra_type 1 \pextra_widthp 5 ! ! Actual This is the real position of the axis within the machine or relative ! system. ! \layout Description ! \pextra_type 1 \pextra_widthp 5 ! ! Commanded This is where the axis is commanded to be. ! \layout Standard ! ! These may all be exactly the same if no offsets have been applied and there ! is no deadband set in the INI file. ! Deadband is a small distance which is assumed to be close enough -- perhaps ! one stepper pulse or one encoder pulse. ! ! \layout Standard ! ! It is also important to see any messages or error codes sent by the EMC. ! These are used by operators if they need to be reminded to change a tool, ! to clear up problems in G-code programs, or to find out why the machine ! stopped running. ! \layout Standard ! ! As you work your way through this text, you will be learning, bit by bit ! how to setup and run a machine with your copy of the EMC software. ! While you are learning about setting up and running a minimill here, you ! will be thinking of other applications and other capabilities. ! These are the topics of the other LinuxCNC.org handbooks. ! \layout Section ! ! Thinking Like An Integrator ! \layout Standard ! ! The biggest task of a machine integrator is figuring out how to connect ! a PC running the EMC to a machine. ! Most of this is not the topic of this book but there are a few things that ! you will have to understand in order to make our little minimill work for ! us. ! ! \layout Subsection ! ! Some things we may not want to change. ! \layout Standard ! ! Within the EMC code are a few things that are not easily changed. ! We call these defaults. ! There are pins on the parallel port that have dedicated functions. ! There are connections that have been made between the running components ! of the EMC that we can not easily change. ! We'll see that there are displays and buttons and keyboard keys that are ! not easily shifted about. ! We'll learn about and get used to these in the chapters ahead. ! \layout Subsection ! ! Some things we will need to change. ! ! \layout Standard ! ! The EMC is configured with files that are read at startup and used to override ! the compiled defaults. ! No real controller will likely use the compiled defaults, so you will certainly ! need to edit at least some of these files to reflect the specifics of your ! machine. ! ! \layout Standard ! ! There are four kinds of configuration files: INI, NML, TBL, VAR. ! These are reflected in lower case file extensions. ! They may be named emc.tbl or generic.tbl but they do the same thing when ! they are read by the EMC as it starts up. ! ! \layout Standard ! ! The first, emc.ini, contains all the machine parameters such as servo gains, ! scale factors, cycle times, units, etc. ! and will certainly need to be edited. ! emc.nml contains communication settings for shared memory and network ports ! you may need to override on your system, although it is likely that you ! can leave these settings alone. ! tool.tbl contains the tool information such as which pocket contains which ! tool, and the length and diameter for each tool. ! rs274ngc.var contains variables specific to the RS-274-NGC dialect of NC ! code, notably for setting the persistent numeric variables for the nine ! work coordinate systems. ! We will get into some of the details of these files as we begin to hook ! up and operate our little machine. \the_end |