Professional Documents
Culture Documents
Technical Paper
a r t i c l e i n f o a b s t r a c t
Article history: Open control architectures regain relevance with the new revolution of open source electronics. This
Received 23 November 2016 paper presents the general ideas, examples of implementation and latest advances of a new, open archi-
Received in revised form 21 February 2017 tecture controller for CNC systems based on open source electronics. The multiprocessor and distributed
Accepted 3 March 2017
architecture of this controller leverages the power of platforms like Arduino or TI Launchpad to realize
Available online xxx
CNC systems of increased computational resources, closed-loop position of the tool, smoother motions
and higher feeds. Additionally, this work demonstrates the first steps in the development of virtual
Keywords:
machine as a new software component of the architecture. A “tight binding” between the real and vir-
Open architecture control
Modular control
tual machines will delineate the path for realistic, machine monitoring, remote operation and process
Open electronics planning environment.
CNC © 2017 Published by Elsevier Ltd on behalf of The Society of Manufacturing Engineers.
http://dx.doi.org/10.1016/j.jmsy.2017.04.013
0278-6125/© 2017 Published by Elsevier Ltd on behalf of The Society of Manufacturing Engineers.
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013
G Model
JMSY-563; No. of Pages 7 ARTICLE IN PRESS
2 J.E. Correa et al. / Journal of Manufacturing Systems xxx (2017) xxx–xxx
be fed as the reference to a closed-loop system. This limits the com- servo-control algorithms, thus capturing the physics of the machine
puting resources, flexibility, modularity and overall performance. and the controller. We envision that this strategy will delineate
The OAC paradigm regains relevance with the new revolution the path for realistic machine monitoring, remote operation and
in open electronics. Free from proprietary hardware implemen- process planning environment in CNC.
tation, an OAC based on open electronics would represent a step
forward in the flexibility and openness of this systems, creating an
2. Controller overview
opportunity for easy automation of new manufacturing processes
and custom-based CNC solutions. Next generation of open elec-
The open CNC architecture controller in this paper consists of
tronics in CNC should leverage the power of multiple-processing
four control programs executed independently on different pro-
units to perform tasks requiring increased computational resources
cessing units, namely, the executive program or operating system,
[10], online machine monitoring [11], better integration with CAM
the interpolation program or motion controller, the servo control
software packages [12], better control of the position of the tool
program and the PLC. The executive program is a PC-based appli-
through closed-loop configurations, smoother motions and higher
cation in charge of managing the non-real time services of the
feeds.
architecture; the interpolation program is a micro-controller pro-
This paper presents the general overview and latest advances of
gram in charge of the online coordination of the axis, feed rate
a new, open, multi-processor architecture controller for multi-axis
control, acceleration and deceleration; and the servo control, in
servo control of CNC systems, based on open electronics. Its purpose
turn, executes in a micro-controller and drives each axis indepen-
is to provide researchers and enthusiasts with a new control archi-
dently with a velocity close-loop control. The rates of execution of
tecture for the rapid design of CNC systems that will allow them to
the algorithms are adjusted according to their priority and worst-
experiment with these platforms and create special purpose appli-
case execution time [18]. For example, the maximum interpolated
cations. The four major programs of the architecture: the machine
frequency cannot exceed the execution frequency of servo-loop
executive, the motion interpolation, the programmable logic con-
interrupt. A detailed discussion on the communication protocols
troller (PLC) and the servo-controller algorithms, are coded in a
and rates of execution of the different programs is presented in our
general manner that the architecture is modular in both software
previous work [15].
and hardware. Examples of the main programs are presented in
Fig. 1. shows a diagram with the software (Fig. 1(a)) and a pos-
the Texas Launchpad [13] and Arduino development platforms
sible hardware (Fig. 1(b)) architectures of the controller to a 3-axis
[14]. Because the interpolation and servo-control algorithms have
CNC machining center. The control architecture is a component
been previously demonstrated [15], the discussion on this paper
base-approach aimed to achieve software modularity. This means
focuses on the executive program The OAC in this work offers
that each of the components has a unique Finite State Machine
increased computational resources and flexibility of reconfigura-
(FSM) that ensures the coordinated execution of the tasks in the
tion of manufacturing units. Additionally, this work is the first one
controller. When executing a NC program or a manual command
in demonstrating the first steps towards incorporating a virtual
from the graphical user interphase (GUI), the executive program
representation of the machine [16,17], to the OAC paradigm. The
calls the RS-274 interpreter service to parse the instructions into
“virtual machine” has a replica of the interpolation, the PLC and the
sequence, preparatory, dimension and feed words. The interpreter
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013
G Model
JMSY-563; No. of Pages 7 ARTICLE IN PRESS
J.E. Correa et al. / Journal of Manufacturing Systems xxx (2017) xxx–xxx 3
uses this information to generate the desired-state vector of the number “05”. The Yacc-generated parser contains the programing
machine (a C type structure with information on the position of the rules (grammar) that make syntactic sense of the RS-274 code. Each
axis, type of motion, process parameters among others) and the set of the grammar descriptions in the parser is associated with a cor-
of atomic actions (a linked list with the ordered sequence of actions responding C action aimed to the generation of the of the desired
such as “straight transverse”, “arc feed”, “tool change”) required to state vector of the machine and the set of atomic actions to bring
arrive to said state. Finally, the atomic actions are sent to the exec- the machine to that state. For example, the block “N10 G01 × 10
utive program which, in turn, send them to the interpolator and F300” corresponds to the production rule:
block : {;}
| block seq_word prep_word dim_word feed word { process_block (); }
;
seq_word : {;}
| T_N number { update_verctor(seq, $2);}
;
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013
G Model
JMSY-563; No. of Pages 7 ARTICLE IN PRESS
4 J.E. Correa et al. / Journal of Manufacturing Systems xxx (2017) xxx–xxx
along the Z-direction). The associated services are the joint model, constructor, to parse the mechanism information from a human-
joint limits, and the servo-control. readable text file (see appendix). The standard machine data file
• Mechanism: A collection of links and joints working together to (.smd) was created to load the machine geometry and assembly
produce functional motion. This object contains the graph of the information form a commercial CAD software such as Autodesk
mechanism (with the links as nodes and the joints as arcs) used Fusion 360. After loading the geometries, the program spans the
for the kinematic and rendering services. graph of machine to find the sequence of shape-joint transforms of
• Machine: A mechanism with its associated control and operation each link. This is used by the render service to populate the scene
services; e.g., the interpolation, PLC and rendering services. with machine assembly at its configuration given by the joint trans-
forms. Fig. 4 shows the openGL rendered machine with it link and
joint transforms. The interpolation service coordinates the motion
The information flows through the virtual machine services in
of the axes by updating the joint transforms and calling the render-
the exact order than it does through the physical architecture.
ing service after a number of iteration. The velocity of interpolation
The fact that these services are exact replicas of the control pro-
is modified by changing the number of iterations of the interpo-
grams, creates a tight binding between the real and the virtual
lation algorithms before rendering the scene. The virtual machine
representations of the machine. Such a binding is key aspect in the
program has been successfully tested for interpolation frequencies
implementations of a real-time monitoring application and process
higher than 40 kHz in an Intel Quad core CPU @ 2.5 GHz.
planning environment. Fig. 3(a) shows a three-axis virtual machine,
This are the first steps towards the integration of a virtual
coded inside the application user interface (API) of Autodesk
machine to the open architecture of this paper. Following steps in
Fusion 360. To demonstrate the potential of tightly-bound vir-
this area include the implementation of efficient algorithms to sim-
tual machines and controls, this implementation uses Fusion 360
ulate the material removal process that account for the dynamics
CAM trajectories and an internal reference-pulse interpolation
of the drives and the material properties of the workpiece.
algorithm (See Sec. 4), to “virtually machine” the workpiece.
Fig. 3(b) shows a rendered image with the simulation results of
a 2D-machined trajectory. The material is removed by driving the 4. Interpolator
machine along the interpolated trajectories, using the Fusion 360
joint definitions, while intersecting and subtracting the solid rep- The interpolator coordinates the motion of the axes to drive the
resentation of the tool from that of the workpiece. The simulated machine tool along the required trajectories. Fig. 2(b) shows the
surface is shown in the detailed view of Fig. 3(b). Virtual machin- finite state machine of the interpolator program. A basic interpo-
ing uses the control algorithms and physics of a specific system to lation algorithm uses the set of atomic actions (generated by the
simulate the machining processes rather than recreating them for interpreter from the part-data program) to obtain the tool path as
a general purpose CNC machine, as in traditional CAM software. For a combination of linear and circular segments. The output of the
instance, in a virtual machine, the feed, speed, material removal and interpolator is transmitted to the servo controllers in a sequence of
accelerations are kept below critical values to keep the machining reference-pulses, each equivalent to one basic length-unit (BLU) of
and inertial loads within the safety range of the machine. the machine. The total number of pulses add to the position of the
A second three-axis, virtual machine was coded in C++ and axis, and the frequency of the pulses represents their velocity. The
openGL, for higher graphics performance. This implementation interpolator in this paper is based on a software Digital Differential
required a loader method, embedded inside the machine-object Analyzer (DDA) technique, explained in detailed in reference [4].
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013
G Model
JMSY-563; No. of Pages 7 ARTICLE IN PRESS
J.E. Correa et al. / Journal of Manufacturing Systems xxx (2017) xxx–xxx 5
The servo-control algorithm was programmed on the Arduino culates the output voltage to the motor driver proportionally to
Nano with the microprocessor ATmega328 and the Texas Instru- the instantaneous error count (proportional controller in positon).
ments Launchpad C2000. Fig. 2(c) shows the finite state machine The servo-loop ISR exhibited a maximum execution time of 76 s
of the interpolator program. Here, a set-point external interrupt in the Arduino Nano and 2 s, in the TI Launchpad C2000, this
increments a counter whenever the interpolator requests a pulse allowed servo-frequencies of 10 kHz and 30 kHz respectively. Con-
while a timer interrupt controls the execution of the servo-control ventionally, the maximum interpolated frequency should be below
loops. In a single iteration of the servo-loop interrupt, the ISR cal- the execution frequency of servo loop interrupt. The output volt-
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013
G Model
JMSY-563; No. of Pages 7 ARTICLE IN PRESS
6 J.E. Correa et al. / Journal of Manufacturing Systems xxx (2017) xxx–xxx
Fig. 6. Servo-controller breakout board design. Printed Circuit Board (PCB) design (a) and circuit board assembly (b).
Fig. 7. 3-axis CNC systems as example of the proposed controller. 7. Conclusions and future work
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013
G Model
JMSY-563; No. of Pages 7 ARTICLE IN PRESS
J.E. Correa et al. / Journal of Manufacturing Systems xxx (2017) xxx–xxx 7
Fig. 8. Test trajectory of the control with the interpolated and feedback trajectories (a). A zoom view of a high curvature region in the interpolated path (b).
pad ecosystem for high performance control. We envision that an [3] Altinas Y, Munasinghe W. A hierarchical open-architecture CNC system for
architecture like this has the potential of transforming CNC in open machine tools. Ann CIRP 1994;43:349–54.
[4] Koren Y, Masory O. Reference-pulse circular interpolator for CNC systems. J
source electronics from device-oriented to systems where users Eng Ind 1981;103:131–6.
can design their controls for special purpose machines. [5] Koren Y. Reference-word interpolation for CNC systems. J Eng Ind
For the first time, this paper incorporates a virtual representa- 1982;104:400–5.
[6] Koren Y. Design of computer control for manufacturing systems. J Eng Ind
tion of the machine to the concept of open architecture control, with 1979;101.
examples of implementation in Autodesk Fusion 360 and openGL. [7] Staroveski T, Brezak D, Toma U. LinuxCNC −the enhanced machine controller:
A “tight binding” between the virtual machine and the supervi- application and overview. Tehnički vjesnik 2013;20(6):1103–10.
[8] Pritschow Gunter, Altintas Yusuf, Jovane Francesco, Koren Yoram, Mitsuishi
sory controller has been demonstrated by virtually machining a
Mamoru, Takata Shozo, van Brussel Hendrik, Weck Manfred, Yamazaki Kazuo.
2D trajectory on a virtual machine with a replica of the interpo- Open controller architecture- past present and future; 2016.
lation algorithm. The virtual-machine component can evolve to [9] Hamilton K, Hascoet J-Y, Rauch M. Implementing STEP-NC: exploring
possibilities for the future advance manufacturing. In: Modern mechanical
become a specialized tool for real-time monitoring and simulation
engineering. Springer; 2014. p. 199–239.
manufacturing processes under this architecture. [10] Han Z, Jin H, Moyue L, Fu H. An open modular architecture controller based
Future work will focus on characterizing the performance of the online chatter suppresion system for CNC milling. Math Prob Eng 2015.
architecture in a conventional machining process such as milling [11] Liu J, Fu Y, Han Z, Fu H. Design of an industrial ethemet based embedded open
architecture CNC system. International conference on estimation, detection
on three-axis machine tool. Also, more research into safety and and information fusion 2015.
reliability is necessary for commercial and industrial applications [12] Ramesh R, Jyothirmai S, Lavnaya K. Intelligent automation of design and
with rigorous conditions. Ongoing research is being conducted to manufacturing in machine tools using an open architecture controller. J
Manuf Syst 2013:248–59.
incorporate the PLC and the servo-control algorithms into the vir- ¨
[13] T̈I LaunchPad development kits,[Online]. Available: <http://www.ti.com/lsds/
tual machine object, thus capturing the convolved physics of the ti/tools-software/launchpads/launchpads.page#>.
machine and the controller. This effort will produce an enhanced [14] Arduino, [Online]. Available: <https://www.arduino.cc/>.
[15] Correa J, Toombs N, Ferreria PM. Implementation of an open-architecture
tool for the planning and simulation of manufacturing processes control for CNC systems based on open-source electronics. Proceedings of the
under this architecture. ASME 2016 IMECE 2016 2016.
[16] Zhu L, Li H, Liang W, Wang W. A web-based virtual CNC turn milling system.
Int J Adv Manuf Technol 2015;78:99–113.
Acknowledgements [17] Soori M, Arezoo B, Mohsen H. Virtual machining considering dimensional,
geometrical and tool deflection error in three-axis CNC milling machine. J
This work was supported in part by the National Science Foun- Manuf Syst 2016;33:498–507, 214.
[18] Koren Y, Pasek ZJ, Ulsoy AG. Real-time open contro architectures and system
dation under grant #1301336. Funds from the Tungchao Julia Lu
performance. Ann CIRP 1996;45:377–80.
Professorship in the Department of Mechanical Science and Engi- [19] Suh S-H, Kang S-K, Chung D-H, Stroud I. Theory and design of CNC systems,
neering also made this work possible. springer series in advance manufacturing; 2008.
[20] GNU Operating System (Flex and Bison), [Online]. Available: <https://www.
gnu.org/software/bison/>.
References [21] Inkscape, [Online]. Available: <https://inkscape.org/en/>.
Please cite this article in press as: Correa JE, et al. A modular-architecture controller for CNC systems based on open-source electronics.
J Manuf Syst (2017), http://dx.doi.org/10.1016/j.jmsy.2017.04.013