LinuxCNC

Last updated
LinuxCNC
Stable release
2.8.4
Repository https://github.com/LinuxCNC/linuxcnc
License GNU GPLv2
Website http://linuxcnc.org/

LinuxCNC (formerly Enhanced Machine Controller or EMC2) is a free, open-source Linux software system that implements numerical control capability using general purpose computers to control CNC machines. It's mainly intended to run on PC AMD x86-64 systems. Designed by various volunteer developers at linuxcnc.org, it is typically bundled as an ISO file with a modified version of Debian Linux which provides the required real-time kernel.

Contents

Due to the tight real-time operating system integration, a standard Linux desktop PC without the real-time kernel will only run the package in demo mode.

Purpose

LinuxCNC is a software system for numerical control of machines such as milling machines, lathes, plasma cutters, routers, cutting machines, robots and hexapods. It can control up to 9 axes or joints of a CNC machine using G-code (RS-274NGC) as input. It has several GUIs suited to specific kinds of usage (touch screen, interactive development).

Currently it is almost exclusively used on x86 PC platforms, but has been ported to other architectures.[ citation needed ] It makes extensive use of a real time-modified kernel, and supports both stepper- and servo-type drives.

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

History

The EMC Public Domain software system was originally developed by NIST, as the next step beyond the National Center for Manufacturing Sciences / Air Force sponsored Next Generation Controller Program[NGC 1989] /Specification for an Open Systems Architecture[SOSAS]. It was called the EMC [Enhanced Machine Controller Architecture 1993]. Government sponsored Public Domain software systems for the control of milling machines were among the first projects developed with the digital computer in the 1950s. It was to be a "vendor-neutral" reference implementation of the industry standard language for numerical control of machining operations, RS-274D (G-code).

The software included the RS274 interpreter driving the motion trajectory planner, real-time motor/actuator drivers and a user interface. It demonstrated the feasibility of an advanced numerical control system using off the shelf PC hardware running FreeBSD or Linux, interfacing to various hardware motion control systems. Additional development continues using current and additional architectures (e.g. ARM architecture devices).

The demonstration project was very successful and created a community of users and volunteer contributors. Around June 2000, NIST relocated the source code to SourceForge under the Public Domain license in order to allow external contributors to make changes. In 2003, the community rewrote some parts of it, reorganized and simplified other parts, then gave it the new name, EMC2. EMC2 is still being actively developed. Licensing is now under the GNU General Public License.

The adoption of the new name EMC2 was prompted by several major changes. Primarily, a new layer known as HAL (Hardware Abstraction layer) was introduced to interconnect functions easily without altering C code or recompiling. This split trajectory and motion planning from motion hardware, making it easier to generate control programs to support gantry machine, lathe threading and rigid tapping, SCARA robot arms and a variety of other adaptations. HAL comes with some interactive tools to examine signals and connect and remove links. It also includes a virtual oscilloscope to examine signals in real time. Another change with EMC2 is Classic Ladder, (an open-source ladder logic implementation) adapted for the real time environment to configure complex auxiliary devices like automatic tool changers.

Around 2011, the name was changed from EMC2 to LinuxCNC, due to a trademark conflict with EMC Corporation, which holds trademarks for 'EMC' and 'EMC2'. LinuxCNC received a license for the 'Linux' trademark from the Linux Foundation. [1]

Platforms

Due to the need of fine grained, precise real-time control of machines, LinuxCNC requires a platform with real-time computing capabilities. Early versions of EMC ran under a real-time version of Windows NT, but later version of Windows did not have good real-time support so Linux with real-time extensions became the preferred platform. [1] Currently LinuxCNC uses the RTAI kernel or PREEMPT-RT with LinuxCNC's 'uspace' flavour of the RTAPI.

Installing LinuxCNC and the underlying real-time kernel patches on a base Linux system can be a daunting task. Paul Corner came to the rescue with the BDI (Brain Dead Install) which was a CD from which a complete working system (Linux, real-time patches, and LinuxCNC) could be installed. [2] This made LinuxCNC accessible to a much larger user community. Today Paul's BDI has evolved into a bootable (live) ISO that can be burned to a CD or USB and run on most any PC style computer to test drive LinuxCNC without having to install the system. Bootable LinuxCNC ISOs are available for Debian wheezy (RTAI kernel) and Debian stretch (RT-PREEMPT kernel).

The policy for LinuxCNC is to build packages and offer support for Debian, but pre-built binary packages are also available for other Linux systems and architectures. [3]

Design

LinuxCNC uses the model of 'sense, plan, act' in its interactions with hardware. [4] For instance, it reads the current axis position, calculates a new target position/voltage, and then writes that to the hardware. There is no buffering of commands nor are externally initiated reads or writes allowed. This no-buffering approach gives the most freedom to adding or changing capabilities of LinuxCNC. By using relatively "dumb" external hardware and programming the capabilities in the host computer, LinuxCNC is not locked to any one piece of hardware. It also allows an interested user to easily change behaviour/capabilities/hardware.

This model tends to lend itself to specific types of external interfaces---PCI, PCIE, Parallel port (in SPP or EPP mode), ISA, and Ethernet have been used for motor control. USB and RS232 serial are not good candidates; USB having bad realtime capabilities and RS232 being too slow for motor control.

LinuxCNC has basic "realtime" requirements because of this model. The interval between reading and writing must be consistent and reasonably fast. A typical machine does realtime calculations in a 1 millisecond repeating thread. The reading and writing to hardware must be a small part of this time, e.g. 200 microseconds, otherwise the phase shift makes tuning more difficult and there is less time available for the non-realtime programs, which may make the screen controls less responsive.

LinuxCNC "employs a trapezoidal velocity profile generator." [5]

Configuration

LinuxCNC uses a software layer called HAL (Hardware Abstraction Layer). [6]

HAL allows a multitude of configurations to be built [7] while being flexible: one can mix & match various hardware control boards, output control signals through the parallel port or serial port - while driving stepper or servo motors, solenoids and other actuators.

LinuxCNC also includes a software programmable logic controller (PLC) which is usually used in extensive configurations (such as complex machining centres). The software PLC is based on the open source project Classicladder, [8] and runs within the real-time environment.

See also

Related Research Articles

<span class="mw-page-title-main">Debian</span> Linux distribution based on free and open-source software

Debian, also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software and optionally non-free firmware or software developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of Debian (0.01) was released on September 15, 1993, and its first stable version (1.1) was released on June 17, 1996. The Debian Stable branch is the most popular edition for personal computers and servers. Debian is also the basis for many other distributions that have different purposes, like Proxmox for servers, Ubuntu or Linux Mint for desktops, Kali for penetration testing, and Pardus and Astra for government use.

<span class="mw-page-title-main">Device driver</span> Software interface to attached devices

In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know precise details about the hardware being used.

<span class="mw-page-title-main">Linux distribution</span> Operating system based on the Linux kernel

A Linux distribution is an operating system made from a software collection that includes the Linux kernel and often a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to powerful supercomputers.

<span class="mw-page-title-main">Operating system</span> Software that manages computer hardware resources

An operating system (OS) is system software that manages computer hardware and software resources, and provides common services for computer programs.

<span class="mw-page-title-main">Embedded system</span> Computer system with a dedicated function

An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is embedded as part of a complete device often including electrical or electronic hardware and mechanical parts. Because an embedded system typically controls physical operations of the machine that it is embedded within, it often has real-time computing constraints. Embedded systems control many devices in common use. In 2009, it was estimated that ninety-eight percent of all microprocessors manufactured were used in embedded systems.

EMC may refer to:

RTLinux is a hard realtime real-time operating system (RTOS) microkernel that runs the entire Linux operating system as a fully preemptive process. The hard real-time property makes it possible to control robots, data acquisition systems, manufacturing plants, and other time-sensitive instruments and machines from RTLinux applications. The design was patented. Despite the similar name, it is not related to the Real-Time Linux project of the Linux Foundation.

G-code is the most widely used computer numerical control (CNC) and 3D printing programming language. It is used mainly in computer-aided manufacturing to control automated machine tools, as well as for 3D-printer slicer applications. The G stands for geometry. G-code has many variants.

Computer operating systems based on the Linux kernel are used in embedded systems such as consumer electronics, in-vehicle infotainment (IVI), networking equipment, machine control, industrial automation, navigation equipment, spacecraft flight software, and medical instruments in general.

<span class="mw-page-title-main">QEMU</span> Free virtualization and emulation software

QEMU is a free and open-source emulator. It emulates a computer's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems. It can interoperate with Kernel-based Virtual Machine (KVM) to run virtual machines at near-native speed. QEMU can also do emulation for user-level processes, allowing applications compiled for one architecture to run on another.

In Linux systems, initrd is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted.

System Management Mode is an operating mode of x86 central processor units (CPUs) in which all normal execution, including the operating system, is suspended. An alternate software system which usually resides in the computer's firmware, or a hardware-assisted debugger, is then executed with high privileges.

In the context of free and open-source software, proprietary software only available as a binary executable is referred to as a blob or binary blob. The term usually refers to a device driver module loaded into the kernel of an open-source operating system, and is sometimes also applied to code running outside the kernel, such as system firmware images, microcode updates, or userland programs. The term blob was first used in database management systems to describe a collection of binary data stored as a single entity.

<span class="mw-page-title-main">Linux</span> Family of Unix-like operating systems

Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution (distro), which includes the kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses and recommends the name "GNU/Linux" to emphasize the use and importance of GNU software in many distributions, causing some controversy.

In computing, network virtualization is the process of combining hardware and software network resources and network functionality into a single, software-based administrative entity, a virtual network. Network virtualization involves platform virtualization, often combined with resource virtualization.

<span class="mw-page-title-main">Real-time Control System Software</span>

The Real-time Control System (RCS) is a software system developed by NIST based on the Real-time Control System Reference Model Architecture, that implements a generic Hierarchical control system. The RCS Software Library is an archive of free C++, Java and Ada code, scripts, tools, makefiles, and documentation developed to aid programmers of software to be used in real-time control systems.

<span class="mw-page-title-main">STEP-NC</span> Machine tool control language

STEP-NC is a machine tool control language that extends the ISO 10303 STEP standards with the machining model in ISO 14649, adding geometric dimension and tolerance data for inspection, and the STEP PDM model for integration into the wider enterprise. The combined result has been standardized as ISO 10303-238.

perf is a performance analyzing tool in Linux, available from Linux kernel version 2.6.31 in 2009. Userspace controlling utility, named perf, is accessed from the command line and provides a number of subcommands; it is capable of statistical profiling of the entire system.

EMC2 may refer to:

Bare Machine Computing (BMC) is a computer architecture based on bare machines. In the BMC paradigm, applications run without the support of any operating system (OS) or centralized kernel i.e., no intermediary software is loaded on the bare machine prior to running applications. The applications, which are called bare machine applications or simply BMC applications, do not use any persistent storage or a hard disk, and instead are stored on detachable mass storage such as a USB flash drive. A BMC program consists of a single application or a small set of applications that runs as a single executable within one address space. BMC applications have direct access to the necessary hardware resources. They are self-contained, self-managed and self-controlled entities that boot, load and run without using any other software components or external software. BMC applications have inherent security due to their design. There are no OS-related vulnerabilities, and each application only contains the necessary (minimal) functionality. There is no privileged mode in a BMC system since applications only run in user mode. Also, application code is statically compiled-there is no means to dynamically alter BMC program flow during execution.

References

Notes
  1. 1 2 "EMC History". Linuxcnc Board of Directors. September 12, 2018. Retrieved 2018-09-14.
  2. "EMC History". Linuxcnc Board of Directors. September 12, 2018. Retrieved 2018-09-14.
  3. "Getting LinuxCNC". linuxcnc.org. February 19, 2018. Retrieved 2018-09-14.
  4. "Linuxcnc hardware design requirements".
  5. "Simple Tp Notes".
  6. "EMC2's Hardware Abstraction Layer". Linuxcnc Board of Directors. Retrieved 2010-09-30.
  7. "A couple case studies" . Retrieved 2010-09-30.
  8. "ClassicLadder" . Retrieved 2014-03-06.
Bibliography