|
Chapter 11 - A VxD-Based Automatic Blending System Using Multithreaded Programming
11A VxD-Based Automatic Blending System Using Multithreaded ProgrammingThis chapter discusses the object-oriented software design for an automatic blending system. By combining the advantages of Programmable Logic Controller (PLC) and Industrial Control PC (ICPC), an automatic blending control system is developed for a chemical plant. The system structure and multi-thread-based communication approach are first presented in this chapter. The overall software design issues, such as system requirements and functionalities, are then discussed in detail. Furthermore, by replacing the conventional Dynamic Link Library (DLL) with Virtual X Device drivers (VxD), a practical and cost-effective solution is provided to improve the robustness of Windows platform-based automatic blending system in small and medium-sized plants. 11.1 INTRODUCTION Blending is a key component in manufacturing processes, which is used in diverse applications such as chemical, metallurgical, and cement industries [2, 3, 5, 8, 13]. In traditional blending systems, nearly all blending operations are manually conducted by trained or experienced operators. To achieve an accurate and real-time blending process, it is not advisable for operators to control the blending process manually on site, due to the reasons associated with harsh worksite environment, long production line, and complex control process. Although single-chip micro-controller (SCMC) has been used as the master-control device in a blending system, the SCMC-based blending system is hard to be programmed and is not sufficiently stable and reliable during system operations. With the rapid development of industrial electronics technology, an inevitably programmable logic controller (PLC) was introduced into the blending systems, which is more stable and reliable as compared to SCMC. The PLC's intuitive ladder programming enables it to be easily understood and programmed by nonprofessional personnel. It features strong anti-interference capability that is beneficial in a harsh manufacturing environment. By adopting a modularized structure, the PLC is highly scalable and thus is able to cater for different measurement and control requirements. However, the PLC is known to be poor for designing user-friendly interface and generating good statistical reports. To overcome these difficulties, the personal computer (PC) was introduced into the PLC-based blending systems. In such automatic blending systems, the units of signal acquisition, ingredient mixing, recipe configuration, production process monitoring, report generation, etc. are fully automated. In addition, the functions of measurement, control, and management are all integrated into a single automated blending system. Blending system capabilities are also enhanced by exploiting the abilities that the modern computer operating systems offer to the application software development. For instance, to ensure the real-time performance of blending system, multithreaded programming technique for Windows platform can be employed to improve the data communication efficiency and accuracy by minimizing the control delay when system runs [10]. For numerous small and medium-sized plants, especially for those in developing countries, financial cost is often an important issue for software development. For instance, the software developed in earlier Windows operating systems often need to be upgraded to meet the ever-increasing production requirements. However, it is difficult to upgrade the entire software and its associated hardware equipment in a short period due to the high upgrading cost incurred. Hence, as an alternative, only the most crucial features are usually upgraded using low cost solutions. Traditional blending systems often include the front-end software and DLL. However, the DLL's close involvement in certain low-level interrupt operations may lead to system unreliability. For instance, a production interruption caused by such a system fault occurred prior to the adoption of VxD incurred USD 210,000 loss as reported from fault diagnosis department in the chemical plant. Therefore, it is highly necessary to upgrade the DLL to VxD for a more reliable system. |
Preface
TABLE OF CONTENTS