/ docs / src / user / user-intro.txt
user-intro.txt
  1  [[cha:linuxcnc-user-introduction]]
  2  
  3  = LinuxCNC User Introduction
  4  
  5  == How LinuxCNC Works
  6  
  7  LinuxCNC is a suite of highly-customisable applications for the control of a Computer Numerically
  8  Controlled (CNC) mills and lathes, 3D printers, robots, laser cutters, plasma cutters and other automated
  9  devices. It is capable of providing coordinated control of up to 9 axes of movement.
 10  
 11  At its heart, LinuxCNC consists of several key components that are integrated together to form one
 12  complete system:
 13  
 14  * a Graphical User Interface (GUI), which forms the basic interface between the operator, the software
 15  and the CNC machine itself;
 16  * the <<cha:hal-introduction,Hardware Abstraction Layer>> (HAL), which provides a method of linking all
 17  the various internal virtual signals generated and received by LinuxCNC with the outside world; and,
 18  * the high level controllers that coordinate the generation and execution of motion control of the CNC
 19  machine, namely the motion controller (EMCMOT), the discrete input/output controller (EMCIO) and the
 20  task executor (EMCTASK).
 21  
 22  The below illustration is a simple block diagram showing what a typical 3-axis, CNC mill with stepper
 23  motors might look like: 
 24  
 25  image::images/whatstep1.png[align="center", alt="Simple LinuxCNC Controlled Machine"]
 26  
 27  A computer running LinuxCNC sends a sequence of pulses via the parallel port to the stepper drives, each of
 28  which has one stepper motor connected to it. Each drive receives two independent signals; one signal to
 29  command the drive to move its associated stepper motor in a clockwise or anti-clockwise direction, and a
 30  second signal that defines the speed at which that stepper motor rotates. 
 31  
 32  While a stepper motor system under parallel port control is illustrated, a LinuxCNC system can also take
 33  advantage of a wide variety of dedicated hardware motion control interfaces for increased speed and I/O 
 34  capabilities. A full list of interfaces supported by LinuxCNC can be found on the 
 35  http://http://wiki.linuxcnc.org/cgi-bin/wiki.pl?LinuxCNC_Supported_Hardware[Supported Hardware] page of the
 36  Wiki.
 37  
 38  In most circumstances, users will create a configuration specific to their mill setup using either the
 39  <<cha:stepconf-wizard,Stepper Configuration Wizard>> (for CNC systems operating using the computers'
 40  parallel port) or the <<cha:pncconf-wizard,Mesa Hardware Wizard>> (for more advanced systems utilising a
 41  Mesa Anything I/O PCI card). Running either wizard will create several folders on the computers' hard drive
 42  containing a number of configuration files specific to that CNC machine, and an icon placed on the desktop
 43  to allow easy launching of LinuxCNC. 
 44  
 45  For example, if the Stepper Configuration Wizard was used to create a setup for the 3-axis CNC mill
 46  illustrated above entitled 'My_CNC', the folders created by the wizard would typically contain the
 47  following files:
 48  
 49  * Folder: My_CNC 
 50  ** My_CNC.ini 
 51  *** The INI file contains all the basic hardware information regarding the operation of the CNC mill such
 52  as the number of steps each stepper motor must turn to complete one full revolution, the maximum rate at
 53  which each stepper may operate at, the limits of travel of each axis or the configuration and behaviour of
 54  limit switches on each axis. 
 55  ** My_CNC.hal 
 56  *** This HAL file contains information that tells LinuxCNC how to link the internal virtual signals to
 57  physical connections beyond the computer. For example, specifying pin 4 on the parallel port to send out
 58  the Z axis step direction signal, or directing LinuxCNC to cease driving the X axis motor when a limit
 59  switch is triggered on parallel port pin 13.
 60  ** custom.HAL
 61  *** Customisations to the mill configuration beyond the scope of the wizard may be performed by including
 62  further links to other virtual points within LinuxCNC in this HAL file. When starting a LinuxCNC session,
 63  this file is read and processed before the GUI is loaded. An example may include initiating Modbus
 64  communications to the spindle motor so that it is confirmed as operational before the GUI is displayed.
 65  ** custom_postgui.hal 
 66  *** The custom_postgui HAL file allows further customisation of LinuxCNC, but differs from custom.HAL in
 67  that it is processed after the GUI is displayed. For example, after establishing Modbus communications to
 68  the spindle motor in custom.hal, LinuxCNC can use the custom_postgui file to link the spindle speed readout
 69  from the motor drive to a bargraph displayed on the GUI.
 70  ** postgui_backup.hal 
 71  *** This is provided as a backup copy of the custom_postgui.hal file to allow the user to quickly restore a
 72  previously-working postgui HAL configuration. This is especially useful if the user wants to run the
 73  Configuration Wizard again under the same 'My_CNC' name in order to modify some parameters of the mill.
 74  Saving the mill configuration in the Wizard will overwrite the existing custom_postgui file while leaving
 75  the postgui_backup file untouched.
 76  ** tool.tbl
 77  *** A tool table file contains a parameterised list of any cutting tools used by the mill. These parameters
 78  can include cutter diameter and length, and is used to provide a catalogue of data that tells LinuxCNC how
 79  to compensate its motion for different sized tools within a milling operation. 
 80  * Folder: nc_files 
 81  *** The nc_files folder is provided as a default location to store the G-code programs used to drive the
 82  mill. It also includes a number of subfolders with G-code examples.
 83  
 84  == Graphical User Interfaces
 85  
 86  A graphical user interface is the part of the LinuxCNC that the machine tool operator interacts with.
 87  LinuxCNC comes with several types of user interfaces which may be chosen from by editing certain fields
 88  contained in the <<cha:ini-configuration,INI file>>:
 89  
 90  <<cha:axis-gui,'Axis'>>, the standard keyboard GUI interface. This is also the default GUI launched when a
 91  Configuration Wizard is used to create a desktop icon launcher:
 92  
 93  image::../gui/images/axis.png[align="center", alt="Axis, the standard keyboard GUI interface"]
 94  
 95  
 96  <<cha:touchy-gui,'Touchy'>>, a touch screen GUI:
 97  
 98  image::../gui/images/touchy.png[align="center", alt="Touchy, a touch screen GUI"]
 99  
100  <<cha:gscreen,'Gscreen'>>, a user-configurable touch screen GUI:
101  
102  image::../gui/images/gscreen-mill.png[align="center", alt="Gscreen, a configurable base touch screen GUI"]
103  
104  <<cha:gmoccapy,'GMOCCAPY'>>, a touch screen GUI based on Gscreen. GMOCCAPY is also designed to work equally
105  well in applications where a keyboard and mouse are the preferred methods of controlling the GUI:
106  
107  image::../gui/images/gmoccapy_3_axis.png[align="center", alt="gmoccapy, a touch screen GUI based on Gscreen"]
108  
109  <<cha:ngcgui,'NGCGUI'>>, a subroutine GUI that provides wizard-style programming of G code. NGCGUI may be
110  run as a standalone program or embedded into another GUI as a series of tabs. The following screen shot
111  shows NGCGUI embedded into Axis:
112  
113  image::../gui/images/ngcgui.png[align="center", alt="NGCGUI, a subroutine GUI that provides wizard-style programming of G code"]
114  
115  == Virtual Control Panels
116  
117  As mentioned above, many of LinuxCNC's GUIs may be customised by the user. This may be done to add
118  indicators, readouts, switches or sliders to the basic appearance of one of the GUIs for increased
119  flexibility or functionality. Two styles of Virtual Control Panel are offered in LinuxCNC:
120  
121  <<cha:pyvcp,'PyVCP'>>, a Python-based virtual control panel that can be added to the Axis GUI. PyVCP only
122  utilises virtual signals contained within the Hardware Abstraction Layer, such as the spindle-at-speed
123  indicator or the Emergency Stop output signal, and has a simple no-frills appearance. This makes it an
124  excellent choice if the user wants to add a Virtual Control Panel with minimal fuss.
125  
126  image::../gui/images/axis-pyvcp.png[align="center", alt="PyVCP with Axis"]
127  
128  <<cha:glade-vcp,'GladeVCP'>>, a Glade-based virtual control panel that can be added to the Axis or Touchy
129  GUIs. GladeVCP has the advantage over PyVCP in that it is not limited to the display or control of HAL
130  virtual signals, but can include other external interfaces outside LinuxCNC such as window or network
131  events. GladeVCP is also more flexible in how it may be configured to appear on the GUI:
132  
133  image::../gui/images/axis-gladevcp.png[align="center", alt="GladeVCP with Axis"]
134  
135  == Languages
136  
137  LinuxCNC uses translation files to translate LinuxCNC User Interfaces into many languages including French,
138  German, Italian, Finnish, Russian, Romanian, Portuguese and Chinese.  Assuming a translation has been
139  created, LinuxCNC will automatically use whatever native language you log in with when starting the Linux
140  operating system. If your language has not been translated, contact a developer on the IRC, the mailing
141  list or the User Forum for assistance.
142  
143  == Modes of Operation
144  
145  When LinuxCNC is running, there are three different major modes used for inputting commands. These are
146  Manual, Auto, and Manual Data Input (MDI). Changing from one mode to another makes a big difference in the
147  way that the LinuxCNC control behaves. There are specific things that can be done in one mode that cannot
148  be done in another. An operator can home an axis in manual mode but not in auto or MDI modes. An operator
149  can cause the machine to execute a whole file full of G-codes in the auto mode but not in manual or MDI.
150  
151  In manual mode, each command is entered separately. In human terms a manual command might be turn on
152  coolant or jog X at 25 inches per minute. These are roughly equivalent to flipping a switch or turning the
153  hand wheel for an axis. These commands are normally handled on one of the graphical interfaces by pressing
154  a button with the mouse or holding down a key on the keyboard. In auto mode, a similar button or key press
155  might be used to load or start the running of a whole program of G-code that is stored in a file. In the
156  MDI mode the operator might type in a block of code and tell the machine to execute it by pressing the
157  <return> or <enter> key on the keyboard.
158  
159  Some motion control commands are available concurrently and will cause the same changes in motion in all
160  modes. These include Abort, Emergency Stop, and Feed Rate Override. Commands like these should be self
161  explanatory.
162  
163  The AXIS user interface hides some of the distinctions between Auto and the other modes by making
164  Auto-commands available at most times. It also blurs the distinction between Manual and MDI because some
165  Manual commands like Touch Off are actually implemented by sending MDI commands. It does this by
166  automatically changing to the mode that is needed for the action the user has requested.