T. Staroveški, D. Brezak, T. Udiljak LinuxCNC – Napredni sustav CNC upravljanja: primjena i kritički osvrt

ISSN 1330-3651(Print), ISSN 1848-6339 (Online) UDC/UDK 004.451.2:621.914.3-52

LINUXCNC – THE ENHANCED MACHINE CONTROLLER: APPLICATION AND AN OVERVIEW

Tomislav Staroveški, Danko Brezak, Toma Udiljak

Subject review This paper presents an application and a critical overview of the Enhanced Machine Controller (EMC2), a based CNC open architecture control system (OAC) implemented in an industrial testbed platform. The development of such a machine tool was motivated by educational and research requirements, especially in the field of design and analysis of machining process monitoring and control algorithms. The EMC2 was analysed in view of compatible hardware components and software interfaces, configuration abilities and industrial applicability. Also, characteristics of the developed testbed together with the basic implementation details are depicted.

Keywords: Computer (CNC), enhanced machine controller, LinuxCNC, open architecture controller, machine tool retrofitting, milling machine testbed

LinuxCNC – Napredni sustav CNC upravljanja: primjena i kritički osvrt

Pregledni članak Ovaj rad prikazuje osvrt na implementaciju upravljačkog sustava otvorene arhitekture, tzv. Enhanced Machine Controller-a (EMC2), koji je primijenjen na glodalici kao ispitnom postavu. Razvoj ispitnog postava motiviran je edukacijskim i istraživačkim potrebama, osobito u području razvoja i analize algoritama za nadzor i upravljanje procesima obrade odvajanjem. EMC2 sustav je razmatran s obzirom na kompatibilne hardverske komponente i mogućnosti prilagodbe specifičnostima obradnog stroja, kao i mogućnostima za industrijsku primjenu. U radu su također prikazane tehničke karakteristike ispitnog postava i upravljačkog sustava.

Ključne riječi: numerički upravljani alatni strojevi (CNC), LinuxCNC, upravljački sustavi otvorene arhitekture, revitalizacija alatnih strojeva, ispitni postav za glodanje

1 Introduction ordinary PC hardware running FreeBSD or Linux. After this first initiative, several other projects have been In the past two decades, considerable effort has been launched in Europe, the USA and Japan, among which the put in the development of open control systems for most important are [5]: machine tools. Machine tool manufacturers recognized • OSACA (Open System Architecture for Controls these systems as a solution to the problem of how to within Automation System), define common concepts, develop basic technologies and • OMAC (Open Modular Architecture Controllers), produce basic components together in order to fulfill • OSEC (Open System Environment for Controller), constant demands for higher machine tool functionality • JOP (Japanese Open Promotion Group). and flexibility, product quality and cost reduction [1]. According to the IEEE standards (1003.0), "an open These projects were set up and supported by different system provides capabilities that enable properly machine tool makers, control and software vendors, implemented applications to run on a variety of platforms system integrators, end users and academics. Besides the from multiple vendors, to interoperate with other system aforementioned, university research activities in hardware applications and present a consistent style of interaction and software area of open architecture CNC systems have with the user". This means that an Open Architecture also resulted in different manufacturing systems presented Controller (OAC) has to be flexible in hardware and in [6 ÷ 14]. Also, several commercial systems such as software for all control levels, i.e. it has to be Delta Tau PMAC-NC, IBH PA 8000, Galil DMC 1000 standardized with respect to integration with other control and others have been developed [15]. systems and has to permit the integration of independent However, despite all these efforts, applications of application program modules, control algorithms, sensors open CNC architecture systems are still substantially and computer software/hardware developed by different limited to the research and development area because of manufacturers [2]. With the ability of implementation and the liability and standardization issues [15]. Moreover, integration of customer-specific controls by means of according to [5], some open control systems generally open interfaces and configuration methods, the offer a possibility for modifications in the non-real-time implementation of OAC is particularly important in the environment in a fixed software topology. Authors of that development of reconfigurable manufacturing systems [3] survey paper also emphasized that they lack the necessary and in the development of advanced manufacturing flexibility and are not based on vendor-neutral standards. systems with higher degree of autonomous operation This paper presents an overview of the application of accomplished by process monitoring and control modules. the second, more advanced version of the EMC software The first OAC solution was proposed by the US (EMC2) which was used as a CNC solution for a National Institute of Standards and Technology (NIST) redesigned three-axis milling testbed machine. The and was named Enhanced Machine Controller (EMC) [4]. machine was developed on the basis of technologically It had all necessary features of an advanced numerical outdated industrial planning machine, which was control system which can be implemented using an retrofitted for the purpose of the project for intelligent

Tehnički vjesnik 20, 6(2013), 1103-1110 1103 LinuxCNC – the enhanced machine controller: application and an overview T. Staroveški, D. Brezak, T. Udiljak monitoring of a machine tool main spindle. Its aim was to develop an industry-applicable advanced motor spindle unit with monitoring and diagnostic characteristics which could identify or predict motor spindle failures and tool breakage locally and remotely (WAN/LAN). Additionally, the development of this machine tool was also fostered by a need for an open-controlled platform which could be used in the analysis of different control algorithms and process monitoring techniques. The EMC2 software, which runs on Linux-based operating systems (OS) with real-time extensions, was chosen because of its free open source modular structure, code maturity, high stability and quality performance. Considerable potential for commercial EMC2 implementation has been shown by several retrofitted/ developed prototype machines, including systems with complex kinematics. Currently, there are also several didactic EMC-based machines available on the market [16]. In this work, version V2.3 of the EMC2 software was chosen because it was the last and the most comprehensive version at the time. In the meantime, this version was replaced by newer, somewhat improved versions with fewer bugs and with several new features. Furthermore, the name of the software was also changed into the project name – LinuxCNC. Characteristics of machine tool elements and their design, of the control system hardware and of the EMC2 system, together with implementation details and remarks, are given in the following sections.

2 EMC Overview

The first version of EMC was originally developed by Figure 1 EMC2 architecture the Intelligent Systems Division at the NIST. The work resulting from efforts to produce a motion control Among the four modules of EMC2, only EMCMOT package as a test platform for concepts and standards is a real-time module. The communications between non- remained in the public domain and the EMC quickly real-time modules are implemented by Neutral Messaging received attention among open source community which Language (NML) channels [20], and the communications continued to maintain the software. In 2003, the EMC2 between the real-time module (EMCMOT) and the non- version was introduced comprising several important real-time module (EMCTASK) is implemented either by features that simplified, organized and extended the shared memory or RT-Linux FIFO mechanisms [21]. original version [17]. The most significant advances of the EMC2 were the introduction of Hardware Abstraction 2.1 Hardware Abstraction Layer (HAL) Layer (HAL) module, which greatly simplifies the interface to the control hardware. Major code As mentioned previously, in order to further expand optimizations have also been done as well as an extended EMC reconfiguration characteristics, Hardware support for implementation in a variety of different Abstraction Layer (HAL), which is hierarchically placed machines with complex kinematic structures. between the EMCMOT/EMCIO modules and hardware Real-time extensions to Linux kernel are required for drivers (Fig. 1), is introduced. HAL is a dynamic end-user normal EMC2 operation, although it is possible to run the reconfigurable mechanism which allows real-time data EMC2 in a non-real-time environment for simulation transfer between the EMC2 modules and from the EMC2 purposes without interfacing the actual hardware. Support to the control hardware or other lower-level software currently exists for Linux kernel versions 2.4 and 2.6 with modules. It also provides a framework for the real-time extensions applied by either RTAI [18] or RT- development of hardware drivers and software modules Linux [19] patches. Experimental versions of EMC2 are that can be implemented in the EMC2 and executed in also built for 64-bit kernels. real time [22]. EMC2 consists of four main components (Fig. 1): Modules can be dynamically loaded, unloaded and • Motion controller (EMCMOT), interconnected within the HAL space while the EMC2 is • Discrete I/O controller (EMCIO), running. Each instantiated module is visible within the • Task coordinating module (EMCTASK), HAL space as a black box consisting of corresponding • Text-based and graphical user interfaces (GUI). pins that serve as inputs and/or outputs. Connections

1104 Technical Gazette 20, 6(2013), 1103-1110 T. Staroveški, D. Brezak, T. Udiljak LinuxCNC – Napredni sustav CNC upravljanja: primjena i kritički osvrt between the HAL modules are established by creating implementation of different compensation algorithms. corresponding HAL signals which must be of the same type as the module pins they interconnect (float, 2.3 Discrete I/O controller (EMCIO) signed/unsigned integer or Boolean). The development of customized real-time HAL The EMCIO module handles all I/O functions, which modules is supported by two utilities: Comp and are not directly related to the actual motion of machine Classicladder. Comp is used as a versatile utility intended axis. It is implemented as an I/O controller consisting of a for facilitating the development, compilation and hierarchy of subordinate controllers for the main spindle, installation of more complex user modules written in the automatic tool change, the coolant, auxiliary functions (E- C language. Classicladder is used for the ladder logic- STOP chain, lubrication, etc.) and other user-defined based module development. Support libraries are also subsystems. provided for the Python language, which can be used for the coding of modules not intended for the execution in the real-time environment.

2.2 Motion controller (EMCMOT)

EMCMOT executes cyclically in real time and performs trajectory planning, direct and inverse kinematic calculations and computation of a desired output to the ith motor control subsystem. This process includes the sampling of controlled axis positions, computation of the next trajectory point and interpolation between these trajectory points. Programmable software limits are also supported, as well as interfaces to hardware limit and home switches. Fig. 2 shows EMCMOT structure in greater detail. Supported modes of operation are individual axis jogging (continuous, incremental, absolute), queued blended moves for linear and generalized circular motion, as well as programmable forward and inverse kinematics. Complex kinematics for robots can be coded in C language, according to a prescribed function interface and linked in to replace the default 3-axis Cartesian machine kinematics routines. Parameters, such as number and type of axes (linear or rotary), scale factors between feedback devices

(encoder counts), maximal velocity and acceleration Figure 2 EMCMOT structure values, axis units and trajectory planning cycle times are obtained from configuration file during system Since discrete I/O controller design is typically highly initialization phase. machine-specific, customization in general is not intended Shared memory or FIFO mechanisms are used to using single configuration file used to configure the more receive commands or send status, error, or logging generic EMCMOT. Instead, configuration is written in the information to user space modules. NML is not used form of single or multiple HAL files, each describing directly by the motion controller since NML requires C++ required application I/O interface or particular subsystem. and the motion controller coding was limited to C in order These configuration files contain declarations of various to provide generic structure and maximize portability to HAL modules to be used, as well as HAL signals, by other real-time operating systems. means of which module interconnections are described. EMCMOT interacts with subordinate real-time Module interconnections are defined using signals of modules, such as PID compensation algorithms and other same type as corresponding module pins (binary, float, hardware drivers using HAL signals. Using the provided signed or unsigned integer). References to HAL application-programming interface (API) for EMCMOT, configuration files are then included in main a specific hardware support can be integrated into the configuration file to be read during system startup. EMC2 in the form of HAL modules, without modifying Most of previously mentioned subsystems are already any of the core control codes. preconfigured in EMC2, but can easily be adapted or left For servo systems, the output is typically based on a unutilized, leaving only a subset that fits application PID compensation algorithm, provided in the form of needs. In addition, support for writing custom user- separate HAL module. PID controller structures include defined subsystems is provided either by means of zero, first, and second order feed-forward gains as well as integrated Programmable Logic Controller module (PLC) maximum following error output. For stepper systems, the [23], or by utilizing specialized tool for writing HAL calculations typically run open-loop, and step generator, modules (Comp). PLC is configured during system setup, also written as HAL module, is used to send pulses to the using ladder logic diagrams within specialized GUI stepper motor drives. This modular structure allows (ClassicLadder), while Comp is used to build, compile

Tehnički vjesnik 20, 6(2013), 1103-1110 1105 LinuxCNC – the enhanced machine controller: application and an overview T. Staroveški, D. Brezak, T. Udiljak and install HAL modules from source code. configuration and tuning during machine setup in real- time. ClassicLadder is used for graphical editing of ladder 2.4 Task executor (EMCTASK) logic diagrams, HALConfig is a tool for testing and parameterization of machine configuration, HALScope is EMCTASK is a task level command handler and a software oscilloscope for monitoring HAL signals and program interpreter for the RS-274 NGC machine tool HALMeter is a simple tool for monitoring individual HAL programming language [24], commonly referred to as G signals. Additional GUI packages are also being code. It monitors the status of subordinate modules developed, and will provide support for graphical building (EMCMOT and EMCIO) and coordinates them. It also of HAL configurations and machine motion visualization. receives and analyzes commands, either from the operator through GUI or from another process (locally or remotely 2.6 Compatible hardware interfaces in both cases), interprets them as NML messages and dispatches to EMCMOT, EMCIO or EMCTASK itself at As previously discussed, hardware interfaces which appropriate times. connect the EMC2 with feed drives must execute in real The actual commands, written in the form of G and time, while the remaining interfaces can execute in the M code programs, can be sent to EMCTASK using the non-real-time environment. Many existing interface cards Machine Device Interface (MDI) mode or as a file when available on the market lack the necessary drivers and/or the machine is in Auto mode. As interpreter for G and M documentation, which limit their integration into the code programs, whose coding does not vary significantly EMC2. between machines, it is less machine specific than the Available hardware interfaces for the EMC2 are EMCIO. mostly ISA / PCI / PCI Express bus-based cards, with a few low-end solutions available for the LPT port. This 2.5 User interfaces currently limits the installation of the EMC2 to desktop computers with such buses. In this project, only PCI/PCI Several user interfaces have been developed for Express interfaces, for which suitable motherboards can EMC2: keystick, xemc, tkemc, mini and AXIS. All of these be obtained on the market, are considered. programs natively run under a Linux-based OS and all run Presently, support for absolute encoder (EnDat) or in the X11 environment (X Window System), with the FieldBus interfaces (ProfiBUS, CANOpen, DeviceNET) exception of keystick, which is text-based. AXIS is the is still not implemented in the EMC2, which further limits most advanced GUI, featuring an interactive G-code its application possibilities to modern feed and main previewer. GUI-based programs can be expanded and spindle drives. Recent user contributions, however, adapted to match specific application needs by means of provide some limited support for MODBUS and virtual control panels (VCP), which is supported with EtherCAT, which is also not yet integrated into the EMC2 pyVCP package. Besides the above-mentioned user source tree. RTAI Linux drivers for the CAN PCI interfaces, a telnet-based program emcrsh is also provided interface card produced by Peak System GmbH, as well for running remote sessions. Multiple GUIs can be run as non-real-time community drivers for acquisition cards simultaneously, either locally or remotely, across multiple produced by National Instruments and Measurement networked computers. Several possibilities are presented Computing, could easily be integrated into the EMC2. for remote connection: utilization of X11 protocol, VNC Available interface support is currently limited to connection, or running GUIs natively on a remote general purpose analogue/digital I/O circuitry, which can computer. be used for a simple interfacing stepper, variable In the first case, GUI runs on the main PC, and the frequency drives or servo systems with incremental keyboard, mouse and GUI window are forwarded to the encoders. These interfaces can be used to transmit remote PC. Installation of X server software on remote speed/position reference signals to the feed or the main computer is required for X11 connection such as Xming spindle drives in one of common forms (Step + Direction, for Microsoft Windows™ operating systems. VNC PWM + direction, and ± 10 V) and to receive encoder connection is remote desktop system, transferring control feedback signals. Such interface PCI cards, which have of main PC to remote PC. X11 and VNC connections can been used in this project, include a Motenc-lite card be tunneled over Secure Sockets Layer (SSL), in order to manufactured by Vital system Co. and Anything IO cards provide network security during sessions (X11 over SSL, manufactured by Mesa Electronics Co. VNC over SSL). In the third case, GUI programs run With all breakout boards installed, the single Motenc- natively on remote PCs and communicate with main PC lite card features 8 analogue outputs (Range ±10 V, 13- by exchanging NML messages over the network. This Bit Resolution), 8 analogue inputs (Range ±5 V, 14-bit configuration requires modification of configuration files Resolution), 4 Differential Quadrature Encoder Inputs on the main PC (adding appropriate remote IP addresses (DQEI), as well as 16 digital outputs (24VDC) and 32 fields in NML configuration files). digital inputs (24VDC). The DQEI interface is mapped to All of above-mentioned GUIs will work in this internal 32-bit up/down counter with maximum update configuration under Linux-based operating systems. frequency of 2 MHz. Multiple installations (up to four) of Tkemc and mini can be run under Mac OS-X™ or this card are possible in order to further expand the Microsoft Windows™ platforms, if Tcl/Tk programming configuration. language, in which these GUIs are coded, has been All Anything IO card models are based on the Field installed. Programmable Gate Array (FPGA) hardware, which is Several GUIs are also provided as tools for end-user accessible through the available open source

1106 Technical Gazette 20, 6(2013), 1103-1110 T. Staroveški, D. Brezak, T. Udiljak LinuxCNC – Napredni sustav CNC upravljanja: primjena i kritički osvrt driver software, allowing versatile configurations and interfaces. Depending on the available model and corresponding daughter boards, anything I/O card configurations may vary from the generic digital I/O to the multi-channel analogue servo interface, consisting of DQEI and DAC output per channel. Configuration of up to 16 analogue servo interfaces is possible with a single anything I/O card model 5i22. Compatibility with the EMC2 software is provided through the HostMot2 firmware [19]. The EMC2 support for the HostMot2 is split into a generic driver for configuring the card and low-level I/O drivers for accessing anything I/O boards from the bus side.

3 Experimental machine tool

A large outdated planning machine, manufactured by "KovositHoloubkov" company in 1959, was used in the development of a milling testbed platform (Fig. 3). The selected machine was considered to be a suitable base because its support elements and guides provide sufficient rigidity for the medium and light machining conditions. However, extensive redesign of the most of remaining parts was mandatory in order to achieve an open CNC machine tool (Fig. 4). Figure 4 Experimental machine tool

Figure 5 Assembly of control cabinet - front and side view

Presently, it is capable of controlling up to six servo axes and two main spindles. A matching set of connectors for motor power, encoder and limit switches is installed for each feed drive allowing their fast reconfiguration. In addition, a set of I/O connectors is also installed to Figure 3 Planning machine used as a base for experimental machine provide: tool development • Torque output signals from feed drives and main

spindle, The redesign approach was aimed at providing a • General purpose analogue and digital I/O, basic 3-axis Cartesian kinematic structure, with an • Firewire/USB/Ethernet/RS-232 connections. upgrade possibility to a 5-axis machine.

3.2 Feed Drives and Main Spindle Unit 3.1 Control cabinet

Basic technical information on the machine feed The design of control cabinet was focused on a drive configuration is presented in Tab. 1. solution that would be as generic as possible (Fig. 5). This Design and assembly of X-axis involved replacement approach was used in order to provide a control system of a hydraulic cylinder with a 2500 mm long ball screw suitable for a future prototype development of machine assembly attached to machine table (2200 × 800 mm). tools with various configurations.

Tehnički vjesnik 20, 6(2013), 1103-1110 1107 LinuxCNC – the enhanced machine controller: application and an overview T. Staroveški, D. Brezak, T. Udiljak

Suitable bearing support elements also had to be made main spindle unit, type HSM105SE-V01-FK719-11 (28 and facing of matching areas in the machine bed had to be kW, 63 N∙m, 12.000 rpm), and its control system were performed so that they could be mounted. Existing guides designed and produced separately by HSTec Co. The were originally designed for translational main motion control system is also connected through HAL pins with velocities up to 25 m/min. They were in a good condition the EMC2. with no visible signs of wear. Fig. 6 illustrates detailed configuration of HAL for presented machine tool, as well as essential wiring Table 1 Technical characteristics of feed drives schematics for feed drives and main spindle. Each Axis Parameters controlled axis with corresponding drive and HAL signals X Y Z Z' is denoted by i, where i = [X, Y, Z]. Allocated hardware Travel (mm) 2200 750 200 600 I/O ports are denoted as DI (digital inputs), DO (digital Rapid traverse (m/min) 20 7 7 - outputs), ADC (A/D converters) and DQEI. Max. feedrate (m/min) 12 7 7 - Resolution (μm) 0,5 0,5 0,5 -

Regarding the Y- and Z-axis, existing drives were both replaced with suitable ball screw assemblies and corresponding belt transmissions. Dovetail guides were left unchanged, in order to preserve axis rigidity, even though minor wear was locally present and guide design allowed relatively low velocities of up to 7 m/min. Belt transmission was necessary for both axes in order to fully utilize available feed motors. Original machine design also featured auxiliary vertical support drive (Z'-axis) used for rough tool height adjustment in case of higher workpieces. At present, this drive, consisting of AC induction motor with worm gear and trapezoidal screw assembly, is left intact. The control of feed drives is based on a closed-loop servo system, using permanent magnet synchronous motors (PMSM) with integrated incremental encoders and corresponding motor controllers. Digital servo controllers, type DPCANIE-030A400, are used for driving the Y- and Z-axis motors, while DPCANIE-060A400 is used for driving the X-axis motor. Three additional controllers, type DPCANIE-015A400, were installed in order to provide a possibility for the feed drive upgrade. The selected drives provide multiple modes of operation (closed-loop control of position, velocity or torque, as well as encoder following for electronic gearing), a variety of common industrial interfaces for the acquisition of reference signals (±10 V, PWM+Direction, STEP+Direction), a CAN-bus interface with a CANOpen protocol for fieldbus connections, as well as multiple general purpose analogue and digital I/O ports. Diverse interface possibilities make these drives a practical choice for both industrial and research purposes. Interface to the feed and main spindle drives from the PC side is done via a suitable set of both the Motenc-lite and the 5i20 and 5i22 anything I/O PCI cards. Any IO PCI cards are mostly used for interfacing servo drives with ±10 V speed reference analogue signal and DQEI as Figure 6 Essential HAL configuration for feed drives and main spindle velocity/position feedback. Remaining I/O resources of all cards are used for the real-time data acquisition and the The main spindle unit is partly reconfigured so that it general purpose I/O. can be upgraded with the spindle monitoring system In the current setup, feed drives are configured as (Dittel Messtechnik Gmbh). The measuring system has a closed-loop velocity controllers because the position loop sensor for the shaft displacement detection, temperature for each axis is implemented within HAL by instantiating and vibration sensors in the front bearing, a temperature the real-time PID modules. Controller gain factors for sensor in stator windings, a crash sensor, a tool clamping both the current and velocity loops are obtained manually, sensor and a data logger, which connects monitoring using a royalty-free DriveWare configuration software system with the control unit or external PC using RS485 package. Gain factors for position loops are also obtained connection. by manual tuning using the EMC2 tuning utilities. The

1108 Technical Gazette 20, 6(2013), 1103-1110 T. Staroveški, D. Brezak, T. Udiljak LinuxCNC – Napredni sustav CNC upravljanja: primjena i kritički osvrt

3.3 Auxiliary systems and operator panel Overrides for angular and linear feed rates, rapid traverse and spindle speed are available through BCD coded rotary Existing lubrication system, originally used for the switches. Control of up to six axes by jogging or by main drive, was not adequate for numerically controlled manual pulse generators (MPG) can be done directly from X-axis guides because continuous (back and forth) full NC panel or through attached remote control unit. All guide travel motion was required for its proper operation. pushbutton/rotary switch controls are connected to the PC Remaining guides were cord lubricated, supplied by small running EMC2 by set of four 7i64 isolated I/O cards, oil pools placed in corresponding locations. Circulating produced by Mesa Electronics Ltd, over the USB port. oil with constant flow of 2 l/min, invariant of axis travel, Customized non-real-time HAL module was specifically was required for lubrication of X-axis guides. developed to provide support for those cards by providing Impulse lubrication, cycle-dependent on travel necessary HAL pins. distance in given period of time, was required for other axis. Centralized lubrication system was designed to 4 Conclusions specifically match described lubrication requirements for retrofitted feed drives. For this purpose, customized non- Implementation of the EMC2 (V2.3), a Linux-based real-time HAL module was developed, which monitors OAC system, in a three-axis industrial milling machine, each axis travel distance over HAL signals connected to together with the characteristics of its redesigned structure DQEI channels and triggers lubrication cycles and operational capabilities has been presented in this accordingly. paper. Although the current machine tool setup used in Proper operation of the main spindle unit required the this study cannot be used to present the full potential of design of two additional subsystems – spindle cooling the EMC2 system, some key features are emphasized. system and tool/workpiece clamping aggregate. Cooling The EMC2 software fulfils important research and system was designed to automatically maintain constant educational requirements due to the benefits of robust temperature of the main spindle unit with respect to rated open source real-time OS, including expansion power output. Hydraulic clamping aggregate, in addition possibilities with other open-source programs. The lack of to tool clamping, supports up to three cylinders for device driver support from most hardware vendors, workpiece clamping. Customized non-real-time HAL especially in the area of fieldbus interfaces, still remains module was also developed to control tool change and the main limitation of this system. This support would clamping system using an existing generic EMC2 tool allow advanced interfacing of EMC2 with various up-to- change interface. date drive and PLC systems. However, the development Design of NC operator panel aimed to provide of EtherCAT support, which relies on a common on- versatile practical solution for industrial, research and board network interface, shows promise and could easily educational purposes (Fig. 7). remove this limitation. Besides the aforementioned, there are already compatible hardware interfaces, developed by several manufacturers, for both servo and stepper drive systems. The EMC2 configuration can be easily adapted to match any common machine structure with a standard set of auxiliary functions (e.g. lubrication, mist/flood, etc.). However, apart from a proper understanding of the EMC2 system itself, the implementation of such system may also require multidisciplinary knowledge in the field of machine tool design, hardware interfaces, CNC control, Linux OS, versatile programming skills which include certain OS modifications, C/C++, Python and other skills required for realization of the desired machine tool characteristics. For more complex multi-axis machinery with advanced auxiliary systems, the extensive coding of machine specific modules in the EMC2 is mandatory.

5 References

[1] Pritschow, G.; Daniel, Ch.; Junghans, G.; Sperling W. Figure 7 Operator panel Open System Controllers - A Challenge for the Future of the Machine Tool Industry. // CIRP Annals - Dual touch screens provide convenient human- Manufacturing Technology. 42, 1(1993), pp. 449-452. machine interface (HMI), allowing visualization of [2] Asato, O. L.; Kato, E. R. R.; Inamasu, R. Y.; Porto, A. J. process variables in real time and user interaction through V. Analysis of Open CNC Architecture for Machine virtual control panels (VCP). In addition, industrial (IP67) Tools. // Journal of the Brazilian Society of Mechanical Sciences. 24, 3(2002), pp. 208-212. PC keyboard with trackball mouse was installed for easier [3] Koren, Y.; Jovane, F.; Heisel, U.; Moriwaki, T.; data input. Standard industrial pushbuttons were installed Pritschow, G.; Ulsoy, A. G.; van Brussel, H. for control of the main spindle, clamping system, Reconfigurable Manufacturing Systems. // CIRP Annals – flood/mist, chip conveyer, vertical support drive, etc. Manufacturing Technology. 48, 2(1999), pp. 527-540.

Tehnički vjesnik 20, 6(2013), 1103-1110 1109 LinuxCNC – the enhanced machine controller: application and an overview T. Staroveški, D. Brezak, T. Udiljak

[4] Proctor, F. M.; Michaloski, J. L. Enhanced Machine (SOSAS). Technical report - National Center for Controller Architecture Overview, 1993, from Manufacturing Sciences, Denver, USA, 1994, from ftp://ftp.isd.mel.nist.gov/pub/NISTIR_5331.pdf, accessed ftp://ftp.isd.mel.nist.gov/pub/NGC_document.pdf, on 2012-12-16. accessed on 2012-12-16. [5] Pritschow, G.; Altintas, Y.; Jovane, F.; Koren, Y.; Mitsuishi, M.; Takata, S.; van Brussel, H.; Weck, M.; Yamazaki, K. Open Controller Architecture – Past, Authors’ addresses Present and Future. // CIRP Annals – Manufacturing Technology. 50, 2(2001), pp. 463-470. Tomislav Staroveški, assistant [6] Erol, N. A.; Altintas, Y.; Ito, M. R. Open system Department of Technology architecture modular tool kit for motion and machining Faculty of Mechanical Engineering and Naval Architecture, University of Zagreb process control. // IEEE/ASME Transactions on Ivana Lučića 5, 10000 Zagreb, Croatia Mechatronics. 5, 3(2000), pp. 281-291, DOI: E-mail: [email protected] 10.1109/3516.868920. [7] Hecker, R. L.; Liang, S. Y. Power Feedback Control in Danko Brezak, assistant professor Cylindrical Grinding Process. // Proc. ASME International Department of Robotics and Production System Automation Mechanical Engineering Congress and Exhibition, 2000, Faculty of Mechanical Engineering and Naval Architecture, pp. 713-718. University of Zagreb [8] Schofield, S.; Wright, P. Open Architecture Controllers Ivana Lučića 5, 10000 Zagreb, Croatia E-mail: [email protected] for Machine Tools, Part 1: Design Principles. // ASME Journal of Manufacturing Science and Engineering. 120, Toma Udiljak, professor 2(1998), pp. 417-424. Department of Technology [9] Wright, P. K.; Dornfeld, D. A. Agent-Based Faculty of Mechanical Engineering and Naval Architecture, Manufacturing Systems. // Trans. of North American University of Zagreb Manufacturing Research Institute – SME. 24, (1996), pp. Ivana Lučića 5, 10000 Zagreb, Croatia 241-246. E-mail: [email protected] [10] Park, J.; Pasek, Z. J.; Birla, S.; Yansong, S.; Koren, Y.; Shin, K. G.; Ulsoy, A. G. An Open Architecture Testbed for Real-Time Monitoring and Control of Machining Processes. // Proc. of American Control Conference, 1995, pp. 200-204. [11] Rober, S. J.; Shin, Y. C. Modeling and Control of CNC Machining Using a PC-Based Open Architecture Controller. // Mechatronics. 5, 4(1995), pp. 401-420.

[12] Altintas, Y.; Munasingh, W. K. Modular CNC Design for Intelligent Machining, Part 2: Modular Integration of Sensor Based Milling Process Monitoring and Control Tasks. // ASME Journal of Manufacturing Science and Engineering. 118, 4(1996), pp. 514-521. [13] Koren, Y.; Pasek, Z. J.; Ulsoy, A. G.; Benchetri, U. Real- Time Control Architectures for System Performance. // Annals of the CIRP. 45, 1(1996), pp. 377-380. [14] Suh, S-H.; Kang, S-K.; Chung, D-H.; Stroud, I. Theory and Design of CNC Systems, Springer-Verlag, London,

UK, 2008. [15] Liang, S.; Hecker, R. L.; Landers, R. G. Machining Process Monitoring and Control: The State–of–the–Art. // ASME Journal of Manufacturing Science and Engineering. 126, 2(2004), pp. 297-310. [16] EMC applications, from wiki.linuxcnc.org, accessed on 2012-12-16. [17] EMC User Manual, from http://www. linuxcnc.org, accessed on 2012-12-16. [18] RTAI - the Real Time Application Interface for Linux,

from http://www.rtai.org, accessed on 2012-12-16. [19] RT Linux, from www.rtlinuxfree.com, accessed on 2012- 12-16. [20] Proctor, F. M.; Shackleford, W. P.; Michaloski J. L. The Neutral Message Language: A Model and Method for Message Passing in Heterogeneous Environments, 2000, from http://www.isd.mel. nist.gov, accessed on 2012-12- 16. [21] EMC Components, from http://wiki. linuxcnc.org,

accessed on 2012-12-16.

[22] HAL User Manual, from http://www.linuxcnc.org,

accessed on 2012-12-16. [23] EMC Integrator Manual, from http://wiki.linuxcnc.org. [24] Marietta, M. Next generation controller (NGC) specifications for an open system architecture standard

1110 Technical Gazette 20, 6(2013), 1103-1110