Web-Based Virtual Operating of CNC Machine Tools

download Web-Based Virtual Operating of CNC Machine Tools

of 12

Transcript of Web-Based Virtual Operating of CNC Machine Tools

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    1/12

    Web-based virtual operating of CNC milling machine tools

    He Hanwu *, Wu Yueming

    Faculty of Electromechanical Engineering, Guangdong University of Technology, Guangzhou 510090, China

    1. Introduction

    The international market place is becoming more dynamic and

    fast changing, whilst the trends in manufacturing have been

    shifting from mass-scale production to single (customized) or

    small-scale production runs. These challenges call for the

    manufacturing companies that want to succeed in the interna-

    tional market, to respond to market agilely and shorten the lead-

    time [1]. Virtual reality (VR) technology has many advantages such

    as excellent interaction, high verisimilitude for 3D display and

    offers opportunities for manufacturing firms to meet the above

    challenges [2,3]. VR technology had been widely used in

    manufacture simulation, especially, the web-based virtual

    machining simulation system that has become the popular due

    to its cooperation facility, good platform independence [46].

    The Virtual Reality Modeling Language (VRML) is a file format

    for describing interactive 3D objects, having the character of being

    simple to use, open, interactive and web-based which make it a

    powerful tool for setting up the web-based CNC machine

    simulation systems [6,7]. The virtual operating of NC machineincludes various manual operations similar to practical manipula-

    tion. To realize all these virtual manipulations, it is crucial to solve

    information generated by mouse, keyboard and files between the

    operator and the visualized virtual machine. Although VRML has

    strong ability for graphics display and good web running, it lacks

    the functions forfile reading and writing, as well as its inferior two-

    dimensional word display effect. This means that make VRML

    cannot meet the special demand of virtual operation of a CNC

    machine. For these reasons, we propose combination of VRML,

    JavaApplet and JavaScript to solve this problem.

    This paper describes a VRML and web-based NC machine tool

    operation and attempts to propose a virtual operating system that

    can be applied to operation training of the manufacturing facility

    and manufacturing process simulation. The rest of paper is

    organized as follows. In Section 2, related research to virtual

    machining simulation is discussed. Then, virtual operating defini-

    tion is given in Section 3. This is followed by the realization of

    interaction between operator and virtual machine in Section 4.

    Development of CNC machine tools virtual operating system and its

    implementations is described in Section 5. Finally, we drew some

    conclusions in Section 6.

    2. Recently related research

    2.1. Virtual reality

    The term VR was coined by Jaron Lanier in the early 1980s.

    Initially, VR referred to an immersive system that allowed the user

    to use natural head and hand movements to interact with the

    computer-generated environment [8]. With the development of

    VR technology, the meaning of VR has been broadened. Nowadays,

    the semi-immersive systems like large screen projections, and

    even the non-immersive system like monitor-based viewing of

    three-dimensional objects are also called VR systems [9].

    2.2. Web-based virtual reality

    In the era of the Internet, great changes have taken place in the

    research of virtual reality. The web, which is one of the most

    Computers in Industry 60 (2009) 686697

    A R T I C L E I N F O

    Article history:

    Received 15 July 2007

    Received in revised form 21 March 2009

    Accepted 18 May 2009

    Available online 9 July 2009

    Keywords:

    CNC machine tools

    Virtual operating

    VRML

    Training

    Machining simulation

    A B S T R A C T

    This paper attempts to propose a virtual operating system applied to operation training of

    manufacturing facility and manufacturing process simulation. The system is based on VRML and

    browser/server structure, so user only needs to install a free plug-in, and run the package normally via

    Microsoft Internet Explorer. Initially this paper studies the system framework, structure models andconceptmodels. Then, a communicationapproach based on VRML, Java andHTML, which is keyto realize

    the virtual operating of CNC machines, has been presented. The algorithm of material removed

    simulation based on VRML Z-map is also presented in this paper. It has the advantages such as a lower

    memory requirement, and a faster computation speed. Finally, in order to validate the feasibility of the

    proposed approach, the CNC millingmachine has beentaken as an illustrative example for the prototype

    development.

    2009 Elsevier B.V. All rights reserved.

    * Corresponding author.

    E-mail address: [email protected] (H. Hanwu).

    Contents lists available at ScienceDirect

    Computers in Industry

    j o u r n a l h o m e p a g e : w w w . e l s e v i e r . c o m / l o c a t e / c o m p i n d

    0166-3615/$ see front matter 2009 Elsevier B.V. All rights reserved.

    doi:10.1016/j.compind.2009.05.009

    mailto:[email protected]://www.sciencedirect.com/science/journal/01663615http://dx.doi.org/10.1016/j.compind.2009.05.009http://dx.doi.org/10.1016/j.compind.2009.05.009http://www.sciencedirect.com/science/journal/01663615mailto:[email protected]
  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    2/12

    popularly used Internettools, aims to provide a light-weight, easily

    deployed and system-independent platform for users to search,

    browse, retrieve, disseminate and share the information remotely

    [10,11]. Based on the web, cooperative design, remote teaching,

    remote training and remote meeting can be easily achieved. For

    these reasons, more and more web-based virtual reality applica-

    tions have been developed and they play a more and more

    important role in every walk of life.

    In the design and manufacturing area, there has been a lot of

    research and development and a numbers of software tools have

    been developed in this area. Li [12] developed an Internet-based

    integrated system which enabled designers to design products

    collaboratively, supported product preview and evaluation of

    design parts using web-based virtual reality technology. Kan et al.

    [13] developed an Internet-based virtual reality collaborative

    environment (VRCE) using VNet, Java, andVRML. As it is a platform

    independent, VRCE can be run using inexpensive computer

    hardware and software and is composed of a set of comprehensive

    functionality with customizability which makes VRCE more

    attractive than many existing VCS systems. Choi and Chan [14]

    presented a virtual prototype system (VP) for rapid product

    development. This VP system incorporates the dexel-based and the

    layer-based fabrication approaches to simulate the powder-based

    and laminated sheet-based RP process, respectively. The virtualprototypes of this system can be transmitted, via the Internet to

    customers to facilitate global manufacturing.

    In the teaching and training area, enormous interest has been

    provoked by VR. Brodlie et al. [15] studied a cost-effective web-

    basedvirtual reality system for surgery trainingusing VRML. Wang

    et al. [16] proposed a methodology that enabled people with

    acquired brain injury (ABI) to receive rehabilitation training at

    home and in their own time to relearn activities of daily living

    (ADL) at a low cost with the help of the Internet and desktop VR

    applications. Waller and Foster [17] developed a web-basedvirtual

    trainingapplication in chemistry. Students can learn to operate the

    virtual instrument using this application.

    There also has been considerable interest in the medical area

    employing Internet technology and VR technology. Liang andOGrady [18] proposed a methodology using VR technology to

    realize the medical collaboration via the Internet. A virtual surgical

    telesimulation application for micrographic dermatologic surgery

    (MOHS) has been presented by Velez et al. [19]. This application

    can provide educational telesimulation in the dermatologic

    surgery technique known as Mohs micrographic surgery.

    In the Internet commerce, increasingly more e-commercial

    applications are using virtual reality technology [20]. Lee and

    Chung [21] developed an intelligent Internet shopping mall by

    integrating virtual reality and avatar. This application can offer the

    customer a far more interesting way to shop effectively.

    2.3. Virtual machining simulation

    Virtual machining simulation is receiving a lot of attention in

    the field of virtual manufacture [1,22]. Suh and Lee [23] studied an

    algorithm which was used to evaluate the NC controller error and

    developed a software program for extracting the error patterns of

    NC controller. Suh et al. [4] presented methods to represent the

    motion paths andoperation of CNC machine tools on the Web. Ong

    etal. [5] developed an Internet-based virtual CNC Milling system to

    evaluate and optimize the machining process on the Internet. The

    MTS company in German developed a virtual CNC machining

    simulation system which can provide realistic 2D and 3D

    machining simulation result [24]. Yeung et al. [25] presented a

    comprehensive virtual simulation model of realistic and modular

    CNC system which can be used to predict realistic CNC system

    performance. These research papers focused on CNC program

    verification, machining process simulation and machining error

    evaluation, but ignored the virtual operating of CNC machine tools.

    Since virtual operation of CNC machine tools can mimic the

    realistic operation of CNC machine, it is very helpful for the

    operational training of the companys staff. Ong and Mannan [26]

    presented a web-based teaching package that provided a dynamic

    and interactive environment for a module on automatic machine

    tools, but it still cannot provide a realistic virtual environment for

    the student to practice how to operate a CNC machine tool.

    3. Virtual operation definition

    3.1. Virtual machine model

    A key factor for developing a virtual operating of CNC machine

    tools system is how to represent the CNC machine tools precisely

    and effectively in the virtual environment. In this paper, we only

    focused on the key motion components of CNC machine tools and

    ignore the physical status, such as the driving system of CNC

    machine. The main components of CNC machine are as shown in

    Fig. 1.

    Based on the design method described in Ref. [4], those

    components are defined as the follows (Node, SFVec3f, SFRotation,

    MFFloat are the types of data defined in VRML):(1) Bed Definition

    Object Bed

    Importing data types Node, SFVec3f

    Attributes

    (A1) Shape: Node

    (A2) Position: SFVec3f

    (A3) Color: SFVec3f

    End

    Fig. 1. Main components of the CNC machine.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697 687

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    3/12

    (2) Workbench Definition

    Object Workbench

    Importing data types Node, SFVec3f, boolean

    Methods

    add-children(Node), set-position(SFVec3f)

    Attributes

    (A1) Shape: Node

    (A2) Position: SFVec3f

    (A3) Color: SFVec3f

    (A4) Children: Node

    (A5) children-added? : boolean

    Valuation B: Node, P: Position

    (V1) [add-children(B)]children-added? = true;

    (V2) [add-children(B)]Children = B;

    (V3) [set-position(P)]Position = P

    Safety B: Node

    (S1) Per(add-children(B))! children-added? = true

    End

    (3) Saddle Definition

    Object Saddle

    Importing data types Node, SFVec3f

    Methods

    set-position (SFVec3f)

    Attributes

    (A1) Shape: Node

    (A2) Position: SFVec3f

    (A3) Color: SFVec3f

    Valuation P: SFVec3f

    (V1) [set-position(P)] Position = P

    End

    (4) Lifting Table Definition

    Object Lifting Table

    Importing data types Node, SFVec3f

    Methods

    set-position(SFVec3f)

    Attributes

    (A1) Shape: Node

    (A2) Position: SFVec3f

    (A3) Color: SFVec3f

    Valuation P: SFVec3f

    (V1) [set-position(P)] Position = P

    End

    (5) Spindle Definition

    Object Spindle

    Importing data types

    Node, SFVec3f, Boolean, SFRotation

    Methods

    (M1) Add-children(Node)

    (M2) Set-rotation(SFRotation)

    (M3) Set-position(SFVec3f)

    (M4) Remove-children(Node)

    Attributes

    (A1) Shape: Node

    (A2) Color: SFVec3f

    (A3) Position: SFVec3f

    (A4) Rotation: SFRotation

    (A5) Children: Node

    (A6) children-added? : Boolean

    Valuation B: Node, R: SFRotation, P: SFVec3f

    (V1) [add-children(B)] children-added? = true;

    (V2) [add-children(B)] Children = B;

    (V3) [set-rotation(R)] Rotation = R;

    (V4) [set-position(P)] Position = P

    (V5) [remove-children(B)]Children = NULL

    (V6) [remove-children(B)]children-added? = false

    Safety B: Node

    (S1) Per(add-children(B))! children-added? = false

    (S2) Per(remove-children(B)) ! children-added? = true

    End

    (6) Fixture Definition

    Object Fixture

    Importing data types

    Node, SFVec3f

    Methods

    (M1) add-children(Node)

    Attributes

    (A1) Shape: Node

    (A2) Position: SFVec3f

    (A3) Color: SFVec3f

    Valuation B: Node

    (V1) [add-children(B)] children-added? = true

    Safety B: Node

    (S1) Per(add-children(B))! children-added? = false

    End

    The Objective model of CNC machine tools can be represented

    as Fig. 2.

    3.2. Operation command description

    Although for the different CNC systems, its control panel,

    operation methods are different, the final goal of a certain

    operation among different CNC system is the same. Therefore,

    classification and definition of each operating of the CNC machine

    is advantageous to realize the rapid configurability of virtual

    operating system and meet the requests for compatibility with

    different CNC system.

    In general, these operating of CNC machine tools can be

    classified as follows:

    (1) Manual Movement Control

    The manual mode of a CNC control causes the machine tool

    to react identically to a standard machine tool. It includes

    continuous moving control, pointing control and hand-wheel

    moving control.

    (2) Spindle Control

    It includes spindle rotation control and stop control.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697688

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    4/12

    (3) CNC Programming

    CNC Programming includes CNC code entering, modifica-

    tion, exporting and management.

    (4) CNC Program Performance

    It includes program selection, program performance,

    program pause, program reset, and parameter settings.

    (5) Reference Point Return and Machine Zero Point Return

    3.3. Virtual control panel model

    CNC control panel is an independent unit with control and

    display elements. According to the operationcommand mentioned

    above, a standard CNC control panel should combine with seven

    elements as Fig. 3 shown.

    In these seven elements, theLCD Screens is thedisplay elementof

    the CNC control panel, whilst the others are control elements. Thus,

    the virtual control panel model mimicks the counterpart in the real

    world. Since a command translator is used to extract the valid

    information from the operation command that the user inputs via

    virtual control panel andsendsthe informationto thecentral control

    moduleof thewholesystem to createthe virtual operation,it should

    be populated in the virtual control panel mode either.

    The architecture of the virtual control panel model is shown in

    Fig. 4, it includes the following three main components:

    (1) Virtual LCD Screen

    The LCD screen in the virtual control panel model is created

    by using HTML and JavaScript code. Each display format is

    defined in a layer because of different display format of each

    screen. In default status, the visibility attributions of layers are

    all set to hiding. When a particular screen needs to be

    displayed, the visibility attribution of that layer is set to show

    andthe contents of that layer arerefreshed. The principle of the

    virtual LCD screen is shown in Fig. 5.

    (2) Control Elements

    The control elements in the virtual control panel model are

    achieved by using VRML. A TouchSensor node is situated in

    each control element, and it will send the information to the

    operation command translator when the user clicks the control

    element. Fig. 6 indicates the principle of control elements.

    Fig. 2. Objective model of the numerical control machine.

    Fig. 3. Virtual CNC control panel.

    Fig. 4. Architecture of control panel model.

    Fig. 5. Virtual LCD.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697 689

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    5/12

    (3) Operation Command Translator

    In the CNC control panel, a particular operation is accom-

    plished by one or more buttons with a certain logical relations

    and mutually restrains instead of only one isolative button. The

    operation command translator model cannot guarantee versa-

    tility if these relations are defined in its methods or its attributes

    when themodelis being defined. Therefore,in order tocreatethe

    versatility of the operation command translator model, a rule

    library (called jRuleLib_IDj) is defined to store these restraint

    relations. Different CNC systems have a different rule library.

    The concept model of the command translator in the virtual

    control panel is described as follows:

    Object CommandTranslator

    Importing data types

    boolean, jRuleLib_IDj, int, cmddata

    Constant

    //the button clicked by user

    (C1) jButtonKeyj: bk

    Methods

    (M1) Get-buttonkey;

    //Search the rule in jRuleLib_IDj

    (M2) Check-lib(buttonkey, jRuleLib_IDj);(M3) SendCommand;

    Attributes

    (A1) Buttonkey: int;

    (A2) Rule-checked?: Boolean

    (A3) Command: cmddata

    Valuation

    (V1) [get-buttonkey] buttonkey = bk

    (V2) [check-lib(buttonkey,jRuleLib_IDj)]

    rule-checked? =true or =false

    Safety

    (S1) Per(SendCommand)! rule-checked? = true

    End

    4. Interaction between operator and virtual machine

    Virtual operations witha CNC machine includes various manual

    operations similar to practical manipulation, such as selecting

    work piece or tools, tool sitting, rectifying tools, input NC code and

    setting the parameters of NC machine from virtual control panel.

    So the virtual operating system should also has the ability to

    display the text and other non-graphic status (such as feed speed,

    rotation speed of the main shaft), and the ability of file reading and

    writing by which the operator can import/export the work piece

    model or NC code into/from the system. VRML is weak in the 2D

    text display area, although it is strongin the3D graphic display. On

    the other hand, JavaApplet is strong in the calculation and 2D text

    display, but it does not have the capability of reading or writing

    local files due to the security problem. To achieve the reading or

    writing ability, it must draw support from the JavaScript that isembedded in the Hyper Text Mark-up Language (HTML) file.

    The prototype system in this paper is an integrated system

    which embeds JavaScript, Java applets and VRML plug-ins by using

    HTML. In this system, VRML is used to create the virtual NC

    machining environment, JavaScript and Java applets are used to

    provide simulations and handle all the information inputted from

    the operator. To create the prototype system, the following issues

    have to be solved:

    (1) Information transfer among JavaScript, JavaApplet and VRML;

    (2) Information transfer among multi-VRML windows;

    (3) Information transfer among JavaApplet in different pages.

    4.1. Information transfer between JavaScript, JavaApplet and VRML

    JavaScript and JavaApplet can communicate by using their

    internal interface and JavaApplet can communicate with VRML by

    using the External Authoring Interface (EAI). JavaScript cannot

    make a communication with VRML directly. It has to communicate

    with VRML through JavaApplet which plays the role of commu-

    nication bridge. The principle is as shown in Fig. 7.

    (1) Communication between JavaScript and JavaApplet

    (a) Method of JavaScript accessing the function of JavaApplet

    JavaScript can access the public function which is defined

    in JavaApplet by the following code:

    window. document. .

    Here the name of the applet is the name given to it in

    the applet tag in HTML code as the follows:

    (b) Method of JavaApplet accessing the function of JavaScript

    JavaApplet can access the function of JavaScript via the

    imported class named netscape.javascript.JSObject.

    The methods of JSObject class shown in Table 1.

    The following steps indicate how to let JavaApplet

    access the function of JavaScript:

    Step 1: Add a new attribute called MAYSCRIPT into

    applet tag in HTML code;

    Fig. 6. Users operating information reception in manual operation area.

    Fig. 7. Communication of HTML (JavaScript)JavaAppletVRML.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697690

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    6/12

    Step 2: Create the instance object of JSObject class;

    Step 3: Use JSObject method named call to evoke the

    function of JavaScript.

    (2) Communication between JavaApplet and VRML

    The communication between JavaApplet and VRML is created

    by external authoring interface of VRML plug-in. JavaApplet

    can access the following three control types via EAI:

    (a) Access any node in VRML environment;

    (b) Send data to any node in VRML environment by EventIn

    interface;

    (c) Get data from any node in VRML environment by

    EventOut interface.

    To realize the Communication between JavaApplet and VRML

    should be done as the following steps:

    Step1: Get the environment information by creating the

    instance of Browser Class.

    Code: Browser [Instance name of Browser]

    For example:

    Browser browser = Browser.getBrowser(this);

    Step2: Get a certain node by creating the instance of Nodeclass.

    Code: Node [Instance name of Node]

    For example:

    Node theBall = browser.getNode(Ball);

    Step3: Make the Communication between JavaApplet and

    the EventIn or EventOut interface of Node.

    (1) Make the Communication between JavaApplet and

    EventIn interface of node:

    [Variable Name] = (EventIn[Variable Type])[Instance

    Name of Node].getEventIn([EventIn interface name])

    For example:

    Scalesize = (EventInSFVec3f)theBall.getEventIn(set_scale);

    (2) Make the Communication between JavaApplet and

    EventOut or exposedField interface of node:

    [Variable Name] = (EventOut[Variable Type])[Instance

    Name of Node].getEventIn([EventIn interface name])

    For example:

    Scalesize = (EventOutSFVec3f)theBall.getEventOut

    (set_scale);

    Step4: Send data to EventIn interface or get data from

    EventOut or exposedField interface.

    (a) Send data to EventIn interface by setValue method;

    For example: scalesize.setValue(val);

    (b) Get data from EventOut interface by getValue method.

    For example: thescale[i] = Scalesize.getValue()[i];

    4.2. Communication among multi-VRML windows

    Virtual machine tools and control panels model are placed in

    the two independence VRML windows, respectively. In order to

    transfer the information between the control panel and the virtual

    machine tools, the communication among the two or more VRML

    windows should be setup.

    As there is no interface to allow a VRMLwindow to communicate

    with other VRML windows, we have to make a communication link

    between multi-VRML windows by using JavaApplet as a commu-

    nication bridge.

    Fig. 8 shows the principle of communication between two

    VRML windows. These two VRML windows, one is virtual machine

    tool, the other is virtual control panel. A JavaApplet monitors the

    EventOut interface of all buttons in the virtual control panel. Once

    it gets the EventOut information from the virtual buttons, it will

    activate the callback() function to handle the EventOut informa-

    tion and send the information to the virtual machine tool in

    another VRML window.

    4.3. Information transfer among JavaApplet in different pages

    In prototype system,different humancomputerinterfaces (such

    as virtual the control panel, Tool installation interface, import/

    outputworkpiecemodelinterface, etc.) areplaced in differentHTMLpages. As Fig.9 shows,the virtual operation in this prototype system

    is achieved by coordinating the work between different function

    pages.

    As the functional screens are mutually independent, the

    communication between them is achieved by JavaApplets in the

    different functional screens. Therefore, a reliable information

    transmission method between JavaApplets must be found.

    Traditionally, the mutual communication between JavaApplets

    is achieved by using the AppletContext getApplet method or the

    AppletContext getApplets method. Both methods must run with

    the following security restrictions [27]:

    (1) The applets originate from the same directory on the server

    (the same code base);(2) The applets are running on the same page, in the same browser

    window.

    Clearly, Fig. 9 indicates that the screens of the prototype system

    are in different pages. Thus, the methods mentioned will not work

    in this form. To achieve this, we must letthe applets share thesame

    operational environment and the same static domain [28,29]. As

    long as we canestablish a common sharedstatic JavaApplet as data

    sharing pool for other applets in other pages to share the

    information, communication among JavaApplets in different pages

    can be achieved. In this prototype system, the static data sharing

    pool is created by a JavaApplet (called main JavaApplet)at first, and

    then, this main JavaApplet evokes all other JavaApplets in different

    pages (called sub JavaApplet). After the above steps, all sub

    JavaApplets can communicate with each others by the static datasharing pool. The principle of communication among JavaApplets

    in different pages is shown in Fig. 10.

    5. Implementation

    The specification for the CNC machine tools virtual operating

    prototype systems hardware and software environment is

    described in the following sections.

    5.1. Environment

    5.1.1. Hardware environment

    The hardware runs the supporting system and creates the

    computerhuman interaction and determines the performance

    Table 1

    JSObject Methods.

    Method Description

    call(String functionName,

    JSObject args[])

    Call function of Javascript

    eval( St ring expr ess ion) Call a J avaScript cod e

    get Slot ( int ind ex ) G et a ind ex object fr om a cert ain cont ainer

    getWindow(Applet applet) Get a JavaApplet window

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697 691

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    7/12

    of the virtual CNC machine (i.e. the precision degree of the3D model, the calculation capacity of the computer and the

    realities of the computerhuman interactive interface). The

    hardware programming environment for the prototype system

    is as follows:

    Personal computer: CPU, P4 2.0G; Memory, 512 M.

    Graphic card: GeForce FX5200 128 M DDR Memory.

    Output device: 1700 CRT.Input device: keyboard and mouse.

    5.1.2. Software environment

    The prototype system is required to be network-oriented,

    operating system independent with a high 3D render quality.

    According to these requirements and the development

    languages used, the software environment we chose is as

    follows:

    (1) Support platform: Windows, IE5.0 or above, and Cortona VRML

    Client 4.0;

    (2) VRML edit tools: VRMLPad;

    (3) Java Development Platform: Visual J++ 6;

    (4) Web page design Tools: Dreamweaver MX.

    5.1.3. Performance test

    As our prototype application only needs to communicate with

    the server host to download key files, it requires only a low-

    bandwidth network connection to the server. The VRML model

    files have been optimized and zipped, the download time is 1 or

    2 min even with 56Kbandwidth speed.The amount of RAM is more

    important when the prototype application runs on client

    computer. Table 2 shows the detail information in terms of

    memory requirement, frame rate per second (FPS) and CPU usages

    at client. As shown in Table 2, the key factor which affects the

    performance is the size of work piece which needs more memory

    and slows the frame rate.

    Fig. 9. Coordinated working between function pages.

    Fig. 8. Information interfaces between VRML windows.

    Fig. 10. Communication among JavaApplets in different pages.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697692

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    8/12

    5.2. Operation interface

    Operation interface of this prototype system includes the

    following screen mainly:

    (1) Main operation interface (Fig. 11);

    (2) Work piece set up or removal screen (Fig. 12);

    (3) Cutting tool addition or removal screen (Fig. 13);

    (4) Reference tools addition or removal screen (Fig. 14);

    (5) CNC machining process (Fig. 15);

    (6) The machining simulation result (Fig. 16);

    (7) G-Code Editor Interface.

    As shown in Fig. 17, user can enter the G-Code via the virtual

    keyboard and can change the position of the cursor by using the

    arrow buttons. User can also use the special button called Input

    to import theG-Code from thetext fileand usethe Output button

    to export the G-Code to text file.

    5.3. Algorithm for the material removal simulation

    This system adopts the Z-Map structure model algorithm

    theory to achieve the cutting simulation [30]. This method has the

    following advantages:

    Table 2

    Performance test.

    Condition RAM

    requirement

    (MB)

    Frame

    rate per

    second (FPS)

    CPU

    usage

    No work piece amounted 85 42 48%

    200 100 10 (length width

    height) work piece mounted

    113 23.81 1835%

    200 100 30 work piece mounted 114 23.68 1836%

    200 200 10 work piece mounted 119 18.32 3447%

    200 200 30 work piece mounted 119 18.23 3448%

    Fig. 11. Main operation interface of NC machine.

    Fig. 12. Main interface of work piece set up or removal.Fig. 13. Main interface of cutting tool addition or removal.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697 693

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    9/12

    (1) The algorithm is very easy for program creation;

    (2) The system memory will be released, raising the calculation

    efficiency because the three dimension points are reduced to

    one dimension (only the Z direction is used);

    (3) There is ElevationGrid node in the VRML which can be used

    directly, so it is not necessary to design other prototype nodes.

    5.3.1. Work piece definition by the ElevationGrid node

    Work piece can be described by the ElevationGrid node in the

    VRML because the ElevationGrid node is very similar to the Z-map

    structure model. The steps are:

    Fig. 14. Main interface of reference tools addition or removal.

    Fig. 15. NC Machining process.

    Fig. 16. Machining simulation result.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697694

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    10/12

    Step 1: Determine how many points on the X, Y direction are

    needed to describethe work piece whichcan calculate by Eq. (1)

    XDim L

    D

    YDim W

    D

    9>>=>>;

    (1)

    XDim is the required number of points on the Xdirection, YDim is

    the required number of points on the Ydirection, L is the length of

    the work piece, Wis the width,D is the distance between the two

    vertices.

    From Eq. (1), the smaller the D is, the more accurate the workpiece is and consequently more system memory is required.

    Step 2: Set the height of the dispersed points of the work piece

    As shown in Fig. 18, set the height of the edge points (the points

    in the dotted line frame) to 0, the other is the height of work piece,

    finishing the separation of the work piece.

    5.3.2. The algorithm for material removed

    The system judges whether the tool intersects the work piece

    by the relative distance between them. The relative distance

    between the tool and the work piece is defined as Fig. 19.

    The meaning of the parameters in Fig. 19 is as the follows:

    (1) HZ0 is the Zvalue of the chuck jaw, changing when the tool ismove through the Z direction;

    (2) HZ1 is the Z axis value of the top plane of worktable in VRML

    coordinates;

    (3) Hj is the height of the fixture;

    (4) TL is the length of the tool;

    (5) Hw is the height of work piece;

    (6) H= HZ0 HZ1;

    (7) clearance = H ToolLength Hw Hj, the space between cut-

    ting tool and work piece. The tool intersects the work piece

    when the value of space is a negative number.

    Set the current coordinates of cutting tool to be (x, y, z), the

    relative zero point coordinates on the XY plane to be (x0, y0), thelength of work piece to be L, the width of work piece to be W,

    discrete accuracyof work piece to beD, the lengthof cutting tool to

    be LT, the radius of cutting tool to be R. XDim and YDim can be

    calculated using formula (1).

    Fig. 17. G-code Editor Interface.

    Fig. 18. Work piece entity. Fig. 19. Relative position between tool and work piece.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697 695

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    11/12

    The detailed steps of the algorithm for material removal are as

    the follows:

    Step 1: Sequence operation of the center point coordinates of

    cutting tool on the XY plane by Eq. (2).

    TX jx x0j

    D

    TY jy y0j

    D

    9>>=

    >>;(2)

    Step 2: Find out the projection point on the work pieces XY

    plane of the tool.

    Set all the points of the work piece to be one-dimensional array,

    and the subscript of each point to be number. Set all the points of

    cutting tool on the XYplane to be two-dimensional array, and the

    subscript of X is i, the subscript of Y is j.

    First traverse through all the values of i and j. The range of i is

    from TX to TX, the range of j is from TY to TY. If

    ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffii TX

    2 j TY2

    q (HZ0 LT), the height of the target point is considered

    larger than the height of the tool, using Eq. (4) to refresh.

    WHeighti HZ0 LT (4)

    The workflow of the algorithm for material removed as shown

    in Fig. 20.

    6. Conclusion

    This paper studied the web-basedCNC machine tool operations.

    The versatile CNC machine tool model and CNC control panel

    model had been discussed in this paper. Then, a communicationapproach based on VRML, JavaApplet and HTML, which is the key

    to create the prototype system, had been described. Comparing

    with the traditional EAI communication between VRML and

    JavaApplet, this approach has two advantages:

    (1) The designof thesystems control panel becomes more flexible.

    (2) The reading/writing ability can be achieved by the JavaScript

    imbedded in the HTML, overcoming the weakness that

    JavaApplet needs to be complied with digital signature and

    configure the complex system environment to allow it read/

    write the local files.

    Finally, in order to validate the feasibility of the proposed

    approach, the CNC milling machine was taken as an illustrativeexample for the prototype development. In comparison with the

    traditional stand alone CNC machine simulation system, our

    prototype application is platform independent and no special

    program needs to be installed on the client computer.

    Acknowledgements

    This work is supported by National Natural Science Foundation

    of China (No. 50775047); Scientific and Technological Project in

    Guangdong province, China (No. 2007A010100013). We would like

    to express our gratitude to Robert Kelly who helped in correcting

    the paper.

    References

    [1] Y. Yao, J. Li, W.B. Lee, C.F. Cheung, Y. Zhejun, VMMC: a test-bed for machining,Computers in Industry 47 (2002) 255268.

    [2] M. Weyrich, P. Drews, An interactive environment for virtual manufacturing: thevirtual workbench, Computers in Industry 38 (1999) 515.

    [3] I.D. Carpenter, J.M. Ritchie, R.G. Dewar, et al., Virtual manufacturing, Manufactur-ing Engineering 3 (1997) 113.

    [4] S.-H. Suh, Y. Seo, S.-M. Lee, T.-H. Choi, G.-S. Jeong, D.-Y. Kim, Modelling andimplementation of internet-based virtual machine tools, The International Jour-nal of Advanced Manufacturing Technology 21 (2003) 516522.

    [5] S.K. Ong, L. Jiang, A.Y.C. Nee, An Internet-based virtual CNC milling system,The International Journal of Advanced Manufacturing Technology 20 (2002)4447.

    [6] W. Lihui, P. Orban, A. Cunningham, S. Lang, Remote real-time CNC machining forweb-based manufacturing, Robotics and Computer-Integrated Manufacturing 20(2004) 562571.

    [7] C. Zhao.Evaluation of Vrml forModelingVirtualWorlds.Master ofScience;Miami

    University; Systems Analysis, 2000.Fig. 20. Flow chart of hidden algorithm.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697696

  • 8/8/2019 Web-Based Virtual Operating of CNC Machine Tools

    12/12

    [8] S. Jayaram, H.I. Connacher, K.W. Lyons, Virtual assembly using virtual realitytechniques, Computer-Aided Design 29 (1997) 575584.

    [9] K.-P. Beier. Web-based virtual reality in Design and Manufacturing Applications.COMPIT2000. URL: http://www-vrl.umich.edu/beier/Papers/compit2000/WebBasedVR.htm.

    [10] W.D.Lia, S.K.Ong, A.Y.C. Nee, A Web-based process planning optimization systemfor distributed design, Computer-Aided Design 37 (2005) 921930.

    [11] J.Y.H. Fuh, W.D.Li, Advances in collaborative CAD:the-state-of-theart, Computer-Aided Design 37 (2005) 571581.

    [12] W.D. Li, et al., An Internet-enabled integrated system for co-design and con-current engineering, Computers in Industry 55 (2004) 87103.

    [13] H.Y. Kan, V.G. Duffy,C.-J.Su, An Internet virtual reality collaborative environmentfor effective product design, Computers in Industry 45 (2001) 197213.[14] S.H. Choi, A.M.M. Chan, A virtual prototyping system for rapid product develop-

    ment, Computer-Aided Design 36 (2004) 401412.[15] K. Brodlie, N. El-Khalili, Y. Li, Using web-based computer graphics to teach

    surgery, Computer & Graphics 24 (2000) 157161.[16] P. Wang, I.A. Kreutzer, R. Bjarnemo, R.C. Davies, A Web-based cost-effective

    training tool with possible application to brain injury rehabilitation, ComputerMethods and Programs in Biomedicine 74 (2004) 235243.

    [17] J.C. Waller, N. Foster, Training via the web: a virtual instrument, Computers &Education 35 (2000) 161167.

    [18] W.Y. Liang, P. OGrady, The internet and medical collaboration usingvirtual reality, Computerized Medical Imaging and Graphics 27 (2003) 525534.

    [19] J.A. Velez, A.A. Navarro Newball, C.A. De La Roche, L.E. Munera, G. Bernabe,C. Bermudez, et al., A virtual surgical telesimulation in micrographic derma-tologic surgery (MOHS), International Congress Series 1256 (2003) 151155.

    [20] G. Bhatt, Bringing virtual reality for commercial Web sites, International Journal

    of HumanComputer Studies 60 (2004) 115.[21] K.C. Lee, N. Chung, A web DSS approach to building an intelligent internet

    shopping mall by integrating virtual reality and avatar, Expert Systems withApplications 28 (2005) 333346.

    [22] Y. Seo, D.-Y. Kim, S.-H. Suh, Development of web-based CAM system, The Inter-national Journal of Advanced Manufacturing Technology (online) 28 (4) (2005)101108.

    [23] S.-H. Suh, E.-S. Lee, Contouring performance measurement and evaluation of NCmachine controller for virtual machining CAM system, The International Journalof Advanced Manufacturing Technology 16 (2000) 271276.

    [24] CNC & CAD/CAM initial & continuing vocational training, TMS Company, URL:http://www.mts-cnc.com/.

    [25] C.-H. Yeung, Y. Altintas, K. Erkorkmaz, Virtual CNC system. Part I. Systemarchitecture, International Journal of Machine Tools & Manufacture 46 (2006)11071123.

    [26] S.K. Ong, M.A. Mannan,Virtualreality simulationsand animations in a web-basedinteractive manufacturing engineering module, Computers & Education 43(2004) 361382.

    [27] Sending Messages to Other Applets. The JavaTM Tutorial. URL: http://www.java.sun.com/docs/books/tutorial/deployment/applet/iac.html.

    [28] T. Hill. An alternative way for applet-to-applet communication. URL: http://www.javaworld.com/javaworld/javatips/jw-javatip101.html.

    [29] L. Qiang, Y. LiLi,Communication among applets in different supervise and controlscreens in virtual network supervise and control system, Computer ProgrammingSkills & Maintenance 8 (2004) 7284.

    [30] P.-L. Hsu, W.-T. Yang, Realtime 3D simulation of 3-axis milling using isometric

    projection, Computer-Aided Design 25 (4) (1993) 215224.

    He Hanwu is a Professor of the Faculty of Electro-

    mechanical Engineering at Guangdong University of

    Technology (GDUT) at Guangzhou,China.He is currently

    head of the virtual reality research group at GDUT. He

    receivedhis Ph.D. degree in ElectromechanicalEngineer-

    ingin 2001, Master degree in Manufacturing Automation

    Engineering in 1992 and Bachelor degree in Mechanical

    Engineering in 1988, all from Huazhong University of

    Science and Technology at Wuhan, China. His main

    research interests are in the domain of virtual reality,

    networked manufacturing, virtual reality applications in

    driving simulation, product design, manufacturing sys-

    tem and medical treatment. His research projects have

    been sponsored by a number of organizations including the Natural Science

    Foundation of China, HI-Tech Research and Development Program of China, the

    Natural Science Foundation of Guangdong Province and Department of Science andTechnology of Guangdong Province. He received the third prize for the National

    Science and Technology Progress from China in 1995.

    Wu Yueming born in 1979, is currently a doctoral

    candidate in Faculty of Electromechanical Engineering,

    Guangdong University of Technology, China. He received

    his master degree in Electromechanical Engineering in

    2005 from Guangdong University of Technology. His

    researchfocuses on virtualrealityand augmented reality

    applications in manufacturing system.

    H. Hanwu, W. Yueming/ Computers in Industry 60 (2009) 686697 697

    http://www-vrl.umich.edu/beier/Papers/compit2000/WebBasedVR.htmhttp://www-vrl.umich.edu/beier/Papers/compit2000/WebBasedVR.htmhttp://www.mts-cnc.com/http://www.java.sun.com/docs/books/tutorial/deployment/applet/iac.htmlhttp://www.java.sun.com/docs/books/tutorial/deployment/applet/iac.htmlhttp://www.javaworld.com/javaworld/javatips/jw-javatip101.htmlhttp://www.javaworld.com/javaworld/javatips/jw-javatip101.htmlhttp://www.javaworld.com/javaworld/javatips/jw-javatip101.htmlhttp://www.javaworld.com/javaworld/javatips/jw-javatip101.htmlhttp://www.javaworld.com/javaworld/javatips/jw-javatip101.htmlhttp://www.java.sun.com/docs/books/tutorial/deployment/applet/iac.htmlhttp://www.java.sun.com/docs/books/tutorial/deployment/applet/iac.htmlhttp://www.mts-cnc.com/http://www-vrl.umich.edu/beier/Papers/compit2000/WebBasedVR.htmhttp://www-vrl.umich.edu/beier/Papers/compit2000/WebBasedVR.htm