Virtual Manufacturing Work Systems - Springer Link

2 downloads 38872 Views 225KB Size Report
In the case study the virtual model of a desktop CNC engraving machine LAKOS 150 is ... Several other applications of a virtual model of a machine tool.
Virtual Manufacturing Work Systems 1

Peter Butala , Ivan Vengust 1

1, 2

1

1

, Rok Vrabi , Lovro Kušer

Department of Control and Manufacturing Systems, University of Ljubljana, Ljubljana, Slovenia 2

PS d.o.o., Logatec, Slovenia

Abstract Contemporary computer and information technologies enable digitalization and virtualization of real systems and their exploration in a virtual space. In the paper, a virtual CNC machine tool is presented. It is build up to support development of CNC controllers and control algorithms on the basis of the Hardware-in-the-Loop principle, where the object of control is substituted with a virtual one. The developed digital model of a machine tool may serve also as a model of a digital factory. In the case study the virtual model of a desktop CNC engraving machine LAKOS 150 is described. The model is integrated in the control loop with a real CNC controller via the CNC2VML interface, which converts the controller's signal into digital information and vice versa. This enables communications between the CNC controller and the virtual machine tool model in real-time. The model is visualized in a 3D graphical environment. The applied programming techniques are generic and based on the open architecture principle and standard graphic library. Keywords: Digital model, CNC machine tool, Mechatronic system design, Hardware-in-the-loop, Virtualization

1

BACKGROUND AND MOTIVATION

design of new manufacturing systems and planning of production for new products [3]. In the future, production of any new product will be examined through simulations before its realization in a real environment. This will significantly contribute to better decisions in the development process, increased quality of solutions, accelerated development and decreased development costs. In order to build up an integrated digital model of a real factory, digital models of individual work systems are needed.

Digitalization and virtualization of work systems open new perspectives for development and operations of complex manufacturing work systems. A virtual work system model is an effective tool for demonstration of complex work structures and their control and operational principles. The virtual model embeds explicit knowledge, which can be explored and reused. For example, users can investigate and make experiments with the virtual model by themselves and thus can gain better understanding and can learn much more naturally and effectively.

1.2

The contribution reveals development of a virtual CNC machine tool. The objective of the research is to develop a digital model (1) as a building block of a digital factory for simulation of machine operations and (2) for visualization of machine tool behavior for remote control, educational purposes and, last but not least (3) for development of a real CNC controller based on the hardware-in-the-loop principle. Several other applications of a virtual model of a machine tool are possible [1, 2].

In design and development of a new work system, the object of control as well as the controller hardware and software have to be developed concurrently and then integrated in a prototype. In early development phases, neither the object of control nor the controller elements are available. The problem that arises from this fact is that the control software has to be developed on the basis of a conceptual solution and its specification, which is as a rule incomplete and a matter of change. The software also cannot be tested on the target hardware during the development. Hence, inadequate solutions and bugs in the software are common and have to be resolved in the integration phase.

The virtual model of a desktop CNC engraving machine LAKOS 150 is described as an example. 1.1

Hardware-in-the-loop principle

A typical manufacturing work system is a mechatronic system, which is composed of a complex electro-mechanical structure, i.e. an object of control, and a controller. The controller is composed of control hardware elements and highly specialized control software.

Digital factory

Manufacturing nowadays relies on computer controlled work systems and computer aided technologies, which are more or less integrated in a complex cybernetic structure – a factory. Development and operations of such structures open challenging engineering and managerial issues, which have to be addressed with adequate methods based on knowledge.

The Hardware-in-the-Loop (HiL) principle enables much more effective concurrent development of a mechatronic system. The principle is based on substitution of a real object of control in a control loop with its software model [4].

The digital factory represents an approach to explicit formulation of manufacturing knowledge and it’s coding into software. The objective here is to efficiently support design, development and operations of a real factory. The digital factory is a set of digital models and computer aided tools for

Figure 1 shows a typical HiL system structure. The object of control is substituted by its digital object. If one introduces prototype hardware, the control loop can be closed already at the very beginning of its development.

The 41st CIRP Conference on Manufacturing Systems, 2008

129

P. Butala, I. Vengust, R. Vrabi, L. Kušer

Figure 1: Block diagram of the HiL system. Software development configuration. Algorithms verified in the loop. HiL system development. The significantly improved and is straighter.

can start effectively on this can be developed, tested and may benefit to better and faster quality of the source code can be final integration with real elements Figure 2: Block diagram of the HiL system.

The HiL principle can be applied in development of different mechatronic systems, such as machine tools, robots, devices, storage/retrieval systems, energy systems, etc. In this paper the object of control is a computer numerically controlled (CNC) machining system. 2

3

VIRTUALIZATION OF OBJECTS

A virtual image of an object can be produced with adequate programming tools on a computer and presented on a display or screen. Several tools for visualization of virtual worlds are available today. First standardization of virtual object description provided the Open Source VRML standard (1997). Later, it was extended into X3D description. A powerful tool for computer graphics and visualization is the open source program VTK. It is based on an open source C++ object library and includes several algorithms for visualization of 3D objects. It enables stereoscopic visualization but does not enable interaction. A high-end virtual environment is the Cave VR environment, which enables interactive simulation of the virtual world. The Cave system is composed of a spatial projector, which project images on all five view surfaces around a user, and sensors indicating user motions. The images are adopted according to the position of the user. The user can explore the virtual world by walking and/or moving objects by hand. The mentioned systems are highly specialized and expensive.

DIGITAL MODEL OF A WORK SYSTEM

In order to obtain a virtual model of an entire CNC work system, several subsystem models have to be developed and integrated. According to Peklenik [5] such an elementary work system is composed of a process (e.g. cutting), a process implementation device (machine tool), and a logic controller (CNC). For the implementation in the HiL concept where the real controller is implemented, the digital machine tool model is needed in the first step. The cutting process model is not indispensable while there is no direct interaction between the process and the controller. In the process there are interactions between a workpiece and a tool on a machine tool. Simulation and visualization of these interactions would benefit to better understanding of the entire CNC system but need a lot of efforts to be accomplished.

For own development of digital object models, the graphic library OpenGL [6] can be used. OpenGL is a graphic standard which was introduced in 1992. The library includes building blocks for building and visualization of 3D graphical objects. It is composed of application interfaces (API), which can be implemented by different programming languages, such as C, C++, C#, FORTRAN, Ada and Java. Its main advantages are stability, reliability and ease of use. The library is permanently improved and is well documented [7].

The machine tool digital model is composed of several submodels as shown in Figure 2. The geometric and kinematic model simulates the geometry and kinematic movements of the machine. The dynamic model simulates dynamic responses of the machine to input signals and disturbances. The virtual reality model visualizes the model behaviors. The machine tool digital model has to be interfaced with the real controller on its input and output sides as shown in Figure 2. The key issue here is to convert the controller signals into digital information on the input side and vice versa on the output side for feeding signals back to the controller. These transformations must be accomplished in real-time with no delay.

In computer graphics, the basic element is a point, described with a unique 4-dimenzional vector named ‘quaternion’. An object is described with a set of points organized in a matrix. All transformations are performed on matrices. For example, if an object is moved, the model matrix is multiplied with a position vector in order to obtain new positions of points. A group of points is joined in a polygon, which define a surface. A 3D object is composed of several surfaces. In order to obtain the final image of an object, one can define model illumination, surface textures, edge smoothing, etc.

The digital model of a machine tool requires appropriate hardware to become a virtual model. A standard or an industrial PC is a suitable choice for the hardware. Different input/output and communication interfaces and drivers can be added for control of digital and analog signals and communication. The operation system has to support realtime (RT) operations. RT extensions of MS Windows or Linux can be implemented. For realization of digital model software different modeling environments, such as Matlab/Simulink and LabView, are available. The software can be also developed with own solutions programmed in the universal programming language C/C++.

4

VIRTUAL MACHINE-TOOL VML 150

The principles of modeling of virtual objects are applied in the development of a virtual CNC machine tool. The virtualized object is the 3-axes machine tool LAKOS 150, which is a desktop CNC engraving machine developed mainly for educational purposes. The real instance of the machine with

130

Virtual manufacturing work systems

the CNC controller is shown in Figure 3. Three positioning drives are carried out with stepping motors and spindles. The CNC controller is implemented on a PC with Linux RT operation system. The controller software is based on the open source software EMC [8]. The structure of the HIL system with the virtual model in the loop is shown in Figure 4. The control loop consists of a real CNC controller – the same or similar as in the case of the real system LAKOS 150 - and the virtual model VML 150. Input is a NC-program in form of the standardized G-code – the same as in the case of the real system. Output here is, of course, virtual – in terms of visualization of the machine tool and its movements displayed on a screen. In this setting, the main question is how to connect the virtual model with the real controller. Electric signals generated by the controller have to be converted into corresponding information, which is feed as a reference into the virtual model. The virtual model also generates feedback information, which in turn has to be converted into corresponding electric signals and fed back into the controller in order to close the loop.

Figure 4: Interconnection of a CNC controller with a virtual machine tool model. The ‘step’ signals are of pulse type with frequency up to 10 kHz. The CNC2VML interface has to count each pulse and to register each direction change for three machine drives simultaneously. Any missing signal would result in inadequate functioning of the virtual model. This fact sets high requirements for signal processing in CNC2VML. The CNC2VML software is based on an interrupt routine. The controller signals are connected over a keyboard interface with eight input pins. Six of them are used for ‘step/dir’ signals for the machine drives and are treated as independent interrupt sources. Each state change of any signal triggers the interrupt routine, which registers the pulse in an interrupt vector. The interrupt source is than recognized and interpreted in by the CNC2VML software.

In order to solve the problem of the interconnection the CNC controller with the virtual model, an appropriate interface for the main and feedback loops is developed. Let us look in the solution of the interface. 4.1

The CNC2VML communicates over the standard RS232 serial interface with the PC platform where the VML 150 model is running. This is a bi-directional communication which enables sending of interpreted signals data from the interface to the VML and data describing logical states (0/1) of the VML switches in the opposite direction.

CNC2VML interface between a real CNC controller and a machine-tool virtual model

The CNC controller generates two control signals of the ‘step/dir’ type for each machine axis drive. The ‘step’ signal defines the number and the frequency of steps to be performed by a stepping motor and the ‘dir’ signal defines direction of rotation of the stepping motor. Direct implementation of these signals in the MS Windows XP environment without modules for real-time control is not possible. Therefore, the CNC2VML interface for signal processing is developed and implemented on the microcontroller RD2, which is based on the Atmel microprocessor AT89C51RD2 [9]. The role of the interface is to convert input signals into digital information which is fed to the PC where the machine tool digital model is running over the RS232 serial communication. Feedback information is realized by virtual limit and home-position switches implemented in the VML 150. When triggered, switch state (0/1) information is fed to the microcontroller, which converts it into an electrical signal for the CNC controller.

4.2

Digital machine-tool model VML 150

The digital model VML 150 is computer software, which represents the virtual version of the LAKOS 150 machine tool. It interprets control signals in a corresponding state and/or movement of the machine drives and visualizes them on-line in a corresponding image displayed on a screen. The VML 150 software is based on the ‘C# OpenGL Framework’, which is a graphic engine for the OpenGL library. The .net programming environment, the universal programming tool C# and the standardized graphic library OpenGL are the key enabler for efficient and effective model development due to their availability and performance. The program manipulates geometrical object and communicates with the CNC2VML interface in order to provide visualization of machine movements according to the input signals and dynamic image refreshing. An important part of the VML 150 software is a graphical user interface. It is composed of two windows, as shown in Figure 5. The left OpenGLControl window displays the 3D model image as a composition of geometrical objects which perform relative motions according to the reference commands form the CNC controller. The OpenGL commands enable turning and zooming of the model so that the model can be observed from different viewpoints. The right Control Window displays current positions of the machine-tool axes and enables user interactions. The final result is the integration of the VML 150 virtual model with the real CNC controller over the CNC2VML interface in the hybrid hardware-in-the-loop system, as shown in Figure 6. The system elements are interconnected according to the HiL conceptual scheme (Figure 4).

Figure 3: CNC engraving machine LAKOS 150.

131

P. Butala, I. Vengust, R. Vrabi, L. Kušer

Figure 6: Integrated hardware-in-the-loop system in operation. Figure 5: VML 150 graphic user interface. 6

The system can be operated on the basis of manual commands set directly on the CNC controller or by any NCprogram in the G-code serving as a reference for the CNC controller. The VML 150 model exhibits the same kinematic behaviour as it would be realized by a real machine-tool. Thus, the full functionality of the hybrid real/virtual HIL system is achieved.

7 5

ACKNOWLEGEMENT

This work was partially supported by the Slovene Ministry of Higher Education, Science and Technology, Grant No. 40017/2004 and inspired by the EU FP 6 project NOE VRL KCiP, Contract No. FP6-507487-2.

CONCLUSION

Digitalization and virtualization set new frontiers in design, simulation and testing of complex manufacturing work systems. Digital work systems models are building blocks of future digital factories, which will serve as test-beds for investigations of design solutions in different design and operation stages of the next generation manufacturing systems. The digital models also represent knowledge coded in software, which can easily be re-used, adapted, upgraded or recycled. The presented example describes development of a virtual digital model where the virtual instance of the existing real machine-tool LAKOS 150 is realized. The objective of the model is to support development of CNC controllers with a virtual object of control in the loop. Thus, the development can be accelerated and improved while the entire loop is available already in the early design phases. The virtual model also enables testing of NC-programs. Besides, visualization of the virtual model enables better understanding of machine tool behavior, and surveillance and diagnostics of remote operations, etc. The applied approach is generic, while it is based on an open architecture and standard or open source programming tools. This makes the solution independent from commercial applications. The proposed concept and solutions enable development of digital models of other manufacturing work systems.

132

REFERENCES

[1]

Altintas Y., Brecher C., Weck M., Witt S., 2005, Virtual Machine Tool; Annals of the CIRP Vol. 54/2

[2]

Erkorkmaz K., Altintas Y., Yeung C.-H., 2006, Virtual Computer Numerical Control System; Annals of the CIRP Vol. 55/1, 399-402

[3]

Bracht U., Masurat T., 2005, The Digital Factory between vision and reality, Computers in Industry, Vol. 56, 325-333

[4]

Brendecke, T., & Kucukay, F., 2002, Virtual real-time environment for automatic-transmission control units in the form of hardware-in-the-loop. International Journal of Vehicle Design, 28, 84–102.

[5]

Peklenik J., 1998, Fertigungskybernetik – eine neue wissenschaftliche Disziplin für die Produktionstechnik, Sonderdruck der TU Berlin, Berlin, 1-25.

[6]

OpenGL Library Documentation: http://www.opengl.org/ documentation/

[7]

C# OpenGL Framework www.csharpopenglframework. com

[8]

EMC: http://www.linuxcnc.org/

[9]

AT89C51RD2 Hardware Manual: http://www.atmel. com/dyn/resources/prod_documents/doc4235.pdf