The development of the software for the controller of an automatic machine workshop by object-oriented programming

The development of the software for the controller of an automatic machine workshop by object-oriented programming

Journal of Materials Processing Technology 101 (2000) 231±237 The development of the software for the controller of an automatic machine workshop by ...

246KB Sizes 0 Downloads 24 Views

Journal of Materials Processing Technology 101 (2000) 231±237

The development of the software for the controller of an automatic machine workshop by object-oriented programming Chaug-Liang Hsu*, Yuen-Sum Liu Mechanical Design and Manufacturing Centre, Chung Shan Institute of Science and Technology, PO Box 90008-15, Lung Tan, Taiwan, ROC Received 30 October 1998

Abstract The material presented is to introduce how an advanced object-oriented programming (OOP) technique can be applied to an automatic machine workshop. It is a user-friendly and well-manipulated software which uses a semantic net of information representation by applying a hierarchy of various object components and/or structures. It has already been proven to be a very useful software concept in handling a ¯exible, automatic manufacturing system. In order to discuss further the application of the OOP concept in detail, an automatic machine workshop is used as an example to illustrate the applications. It is found that this kind of object-based approach offers a swift tool to integrate objects into a manufacturing environment to make the control of an automatic machine workshop possible. # 2000 Elsevier Science S.A. All rights reserved. Keywords: Object-oriented programming; Flexible manufacturing system; Semantic net

1. Introduction A modern machining workshop is an integrated computer-controlled manufacturing system, which should merge most of the current technologies in a system. A typical machining workshop could be formed by a cutting machine tool, a material ¯ow transport system, tooling, ®xtures, work-stations and a set of computer-controlled monitoring modules. It is designed such that these kinds of machine workshops should be very easily and quickly adjusted to meet current marketing changes. Thus, usually, this sort of system can be categorized as a kind of variable and small batch production system. A company that implements this kind of highly ef®cient, automatic manufacturing workshop should be much more competitive since it includes different hardware such as machining centers, material handling devices, measuring machines, etc. In order to manipulate this kind of system an advanced system controller with various functions supporting control software has become essential for shop ¯oor information ¯ow and the whole system management. *

Corresponding author. Fax: ‡3-4713318.

There is a recommended programming concept: objectoriented programming (OOP) [1], which has become the main-stream in the ®eld of software development in this ®eld. The concept of OOP can be applied easily to various kinds of automatic workshops just by carrying out their controller software implementation and developments. A numerous advantages have been shown in using such a hierarchical structured programming method especially in a very complicated, automatic manufacturing system. 2. Object-oriented programming How to set up intelligent and user-friendly control software becomes an important task at the stage of system development. OOP provides a special method of information representation by applying the hierarchy of different components or structures of various organizations, has proven to be a very useful programming concept for ¯exible automatic manufacturing system. The relationships amongst the components, objects and tasks of a system can be described clearly and well represented by OOP. OOP is actually based on a frame-based structure. It could be referred to as a semantic net of knowledge representation in an Expert System. The term `semantic net' is used to

0924-0136/00/$ ± see front matter # 2000 Elsevier Science S.A. All rights reserved. PII: S 0 9 2 4 - 0 1 3 6 ( 0 0 ) 0 0 4 6 9 - 6

232

C.-L. Hsu, Y.-S. Liu / Journal of Materials Processing Technology 101 (2000) 231±237

3. Pre-planning stage of an automatic machine workshop In order to consider the requirements of various aspects and the usage of an automatic machining workshop (AMW) [2], a pre-planning analysis has been made which is described below: Fig. 1. The hierarchical relationship between classes and slots.

describe the relationship structure here, and it has been well developed to simulate the human intelligence. A semantic net consists of nodes and links. Nodes stand for objects, concepts or events, and links describe the relationships amongst the nodes. Fig. 1 illustrates a semantic net as well as the hierarchical relationship between the classes and the slots. Just as the items in the semantic net, OOP takes root class as an initial or basic class and subclass as a child class created by the root class. The class represents a group of closely related objects. As shown in the ®gure, there is an initial (root) class, which creates several subclasses. The end node of a class is called a unit. There are some attributes or slots in the unit. A slot is a fundamental object that holds information regarding a particular attribute of a class. The slots can also be classi®ed as member slots and own slots. Member slots represent the value of the slots that will be inherited by those of the subclass; whilst on the other hand, own slots represent the value of the slots that will not be inherited. By applying the OOP concept, a programmer can apply code components that have been developed previously. The codes, which represent objects or tasks, can be reused and adjusted easily by the subsequent user. He or she does not have to take care of the types, functions or variable names of the data. The following is an example of the object world for the inventory world (Fig. 2).

1. Collecting and analyzing the current and the past manufacturing information of various products and the types of parts that have shown its major proportion. In addition, when considering the manufacture of the most complicated parts in the future, it is advised that the CNC machine center should be selected. 2. In order to determine the production requirements, further analysis of production time requirements has been processed. Other factors such as the future marketing trend, the manufacturing strategy and the total economic environment in the world, are taken into consideration before a decision is made. 3. The installation of an AMW should include the following technical items: ¯exible manufacturing modules, automatic guided vehicles (AGVs), a monitor/ control system and a computer-control measurement system. The ®rst two items can be easily achieved by applying currently existing technology. The monitor/ control system is a key element to the success of an AMW, and has to be developed. The computer on-line control measurement system is another technical area that has been explored lately. Therefore, the most urgent needs will be the development of a monitor/control system. 4. A good monitor/control system should provide on-line scheduling, monitoring of AGVs, a ¯exible manufacturing module, and instant trouble shooting and system diagnosis capabilities. The system should be ¯exible to face a lot of challenges during testing and provide for instant modi®cation. Another essential technology considered is an off-line computer aided simulation technique which should be capable of predicting precisely the actual machining time of an AMW. 5. Fixture design and tool life are further topics to be considered in the running of an AMW. They are important because they can provide a very strong back-up to keep the system running smoothly. CAD/ CAM simulation technique and NC part programming functions are also fundamental tools for the installation of an AMW.

4. The con®guration of an automatic machining workshop control system

Fig. 2. An object world of inventory.

In order to make this project possible and workable, a proposed AMW is planned, which includes the following hardware [3], a system cell controller, machine centers,

C.-L. Hsu, Y.-S. Liu / Journal of Materials Processing Technology 101 (2000) 231±237

Fig. 3. The con®guration of a monitor/control module.

AGVs, pallet stations and load/unload stations. As for the implementing of an AMW control system, a three-level approach is applied here. Also, by applying a local communication network, the functions of these three levels can be linked together to produce a complete AMW system (Fig. 3). The functions of each level are discussed below. 1. Work-station controller level. The work-station controller level is the lowest distinguished group. Each object in the system is a member of an object class. For example, if an object class is assigned for the ®xture, then all of the ®xtures of the system should be in the control level of the system. The control functions usually include the controller of hardware such as CNC machine center(s), a load/unload station, AGVs and measurement equipment. The key elements are the CNC controller and the PLC, which are designed to carry out the commands received from the cell controller, through RS232/422 media and to dispatch orders to the identi®ed hardware. At the same time it collects and/or sends the cutting data and the current location status to/from the cell controller. 2. Cell controller level. The cell controller is the main control unit of the system. Its chief mission is to ensure that all of the workstations on the line perform smoothly, correctly and meet the scheduled process plan. Therefore, it provides a tool to monitor each workstation's current status, material ¯owing status and proper control of the object ¯owing status such as pallets, workpieces; their quantities, locations, qualities as well as system hardware status such as machine waiting time, machine breakdown time, etc. 3. Factory manufacturing system level. Within this level, most manufacturing information such as CAD/CAM data, NC programs, tool management information and material resource information, etc. are stored, manipulated and processed [4].

that can be easily assigned as an object class to each distinguished group. Each object in the system is a member of an object class. For example, if an object class is assigned for the ®xture, then all the ®xtures of the system should belong to this class. Each object in an object class has a unique name, which is used in the object world for identi®cation. For example, if an object class is de®ned as the cutting machine tool, then the object class should include all of the cutting machine tools of the system identi®ed with various unique names; e.g. MH1, MH2, MH3, TV1, etc., respectively, where MH1 and TV1 mean the ®rst horizontal milling machine and the ®rst vertical turning machines, respectively. Operation objects can be sorted out and put into two categories: dynamic and static objects. A dynamic object can be detached from its current parent object and moved to attach to another parent object. For example, a pallet is a kind of dynamic object since it may move amongst cutting machine tools whenever the machines are on idling or waiting status. Contrarily, a static object is one that cannot be detached from its parent object. For example, each workpiece has its own dedicated ®xture, yet no ®xture has its own dedicated pallet. Thus, if a ®xture is mounted on a pallet, the ®xture location then becomes a static object then. In OOP a dynamic object can be treated as an `own slot' the value of which is not inherited, and a static object can be treated as a `member slot' the value of which is inherited by those of the subclasses. The following is a frame of object world of AMW (Fig. 4). In the frame of AMW object world, each slot or class may create its own hierarchical subslots (subclasses). For example, the AMW controller object may be extended to the following subclasses (Fig. 5). The description of a workshop operation object world by the OOP concept is described below. It shows the common characteristics of this class in `documentation' and in `relationship' between the lower classes and the upper classes. 1. 2. 3. 4.

Class name: workshop controller. Documentation: to control the workshop operation. Superclass: workshop operation object. Subclasses: station controller No. 1, No. 2, etc.

Now, the station controller family tree can be used as an example to illustrate the concept of the OOP method used in

5. Programming control module by applying OOP By using the OOP method in the designing of a manufacturing system, one can consider all of those major components, such as cutting machine tools, measuring equipment, material transfer devices, pallets, ®xtures, as objects that represent the software abstraction components. At the same time there are many object groups in the system

233

Fig. 4. A frame of AMW object world.

234

C.-L. Hsu, Y.-S. Liu / Journal of Materials Processing Technology 101 (2000) 231±237

Source Default value Member slot Source Default value Member slot Source Default value Own slot Source Default value Own slot Source Default value Own slot Source Default value Fig. 5. Subclasses extended from the AMW controller object.

the controller software design. The station controller family tree diagram is shown in Fig. 6. The characteristics of the pallet location include all features such as: (i) current status; (ii) availability; (iii) source; (iv) numbers; and (v) location. The features above can be expressed easily by the OOP method, as shown in the following: Class name Documentation Superclass Subclass Member slot

pallet location controller the pallet location control station controller pallet, fixture, part pallet

pallet location 20 fixture fixture location 5 part part location 30 pallet location pallet location controller 1 fixture location pallet 1 part location fixture 1

The characteristics above for a pallet location can be easily added, deleted or modi®ed. 6. System controller module development 6.1. System de®nition Each workshop should include processing equipments such as CNC machine tools, robots, material handling devices and data/information storage facilities. The system controller is responsible for the following: 1. Transforming the manufacturing plan into a sequence of work orders with start and ®nish time for each workstation and material handling device within scheduled time limits. 2. Monitoring the progress of the work orders. 3. Taking recovery action if any orders cannot be completed within the de®ned time limits. 4. Tracking inventory ¯ow including pallet, ®xture, part, etc. 6.2. Object world From the point of the system control scenario of the workshop object world, the world will be subdivided into many collections of communicating objects. Each collection of similar real-world things are referred to as a class of objects. Fig. 7 illustrates the basic kernel of this kind of object classes of the workshop. Three functional objects of the system are de®ned below.

Fig. 6. Station controller family tree.

1. The operational object world which supports the manufacturing operation should include the factory controller, station controller, machine controller, pallet location, pallets, ®xture location, ®xtures, part location, parts and job programs (message issuing object). As shown in Fig. 7, the objects in the system are either static or dynamic objects. A static object is one that

C.-L. Hsu, Y.-S. Liu / Journal of Materials Processing Technology 101 (2000) 231±237

Fig. 7. AMW operation object world.

cannot be detached from its parent object. The station controller, machine controller and pallet location are considered as static objects and therefore will always have the same parent objects. 2. The storage object world, which monitors the inventory should include the system inventory, part inventory, ®xture inventory and tool inventory. 3. The work order manager object normally initiates the production task of the system. 6.3. Operation theory 6.3.1. Internal control activity for object-based world The controller uses the parent-and-child relationship during the system initiating action. Each object will

235

perform various functions, which are named methods. For example, one of the methods for the pallet object class is the ability to change the pallet's mode from automatic to manual. Methods within an object are invoked when a message is received from another object. Therefore, the object messages re¯ect the needs of the message issuing object. A job program is the object that issues the majority of the messages. When a job program sends a message that is issued from its parent object, the parent object will then assume the need of the message to issue a method of job program. If the method is not programmed to satisfy the need, the message will be passed up the ladder to its parent and will become the need of that object. Fig. 8 illustrates the message ¯ow in a hierarchy of workshop operation objects. The job program (test program), just like a message collector, will issue a message (download) and traces the object's hierarchical path to ®nd methods to ®t the demanding request of the message. 6.3.2. System activity Each manufacturing system in a large-scale discrete production environment is subject to scheduling, monitoring and disturbance. A signi®cant bene®t for a hierarchical and objective decision making system becomes distinguished when the system is subject to random events and uncertainty. Fig. 9 illustrates the activities of the system as follows:

Fig. 8. Example of object message ¯ow.

236

C.-L. Hsu, Y.-S. Liu / Journal of Materials Processing Technology 101 (2000) 231±237

Fig. 9. Object's system activity.

1. Using work order manager object to initiate and schedule the task of production. 2. Using the object world activity of the workshop to carry out the production. 3. Using the event-manager to record real-time events and to monitor the system activity. 4. Using the status-manager to monitor the current status of the workshop. 5. Using the recovery-manager to control the object world and status database to do a recovery operation. 6. Using the MIS-manager to manipulate information of the shop ¯oor. The CIM's operation function [5] is an integration of individual functions such as MRP II, CAD/CAM, CAPP, FA and the communication protocols manager by object-based interface [6]. Fig. 10 illustrates the distributed manufacturing system.

7. Conclusion Using OOP to implement the working model of an automatic machine workshop has a number of advantages, including the following: 1. The object-based approach maintains the independence of the system's behavior, and still integrates the separate behavior into a seamless system. 2. Manipulating the object's instance allows one to adjust the system's con®guration in an easy way by going through the object's instance ®le (current system's con®guration) such as to add new facilities with a new object's instance by using the translation function of the con®guration's manager to update the workshop object world easily. 3. High potential in the future An object-based approach offers an easy way to integrate objects into the manufacturing environment. This environment, representing, the system's individual

Fig. 10. Distributed manufacturing system.

C.-L. Hsu, Y.-S. Liu / Journal of Materials Processing Technology 101 (2000) 231±237

components such as intelligent object that encapsulates processing knowledge and protocols required to communicate with other object-based AMW, may be incorporated directly into an object-based, distributed manufacturing system, which is also known as computer integrated manufacturing (CIM). References

[2] [3] [4] [5] [6]

[1] D. Kayshaw, C‡‡: Effective Object-Oriented Software Construc-

237

tion: Concepts, Principles, Industrial Strategies, and Practices, Prentice-Hall PTR, Upper Saddle River, NJ, 1997. P.G. Ranky, Flexible Manufacturing Cell and System in CIM, CIMware Ltd., Guildford, Surrey, England 1990. J. Talavage, R.G. Hannam, Flexible Manufacturing Systems in Practice, Marcel Dekker, Inc., New York and Basel, 1998. P.G. Ranky, Manufacturing Database Management and Knowledge Based Expert Systems, CIMware Ltd., Guildford, Surrey, England 1990. G. Halevi, The Role of Computers in Manufacturing Processes, John Wiley, New York, 1980. M.J. Odell, Object-Oriented Methods: A Foundation, Prentice-Hall PTR, Upper Saddle River, NJ, 1998.