June 15, 1997
June 15, 1997
June 18, 1997
2.232.1 - 2.232.5
Industrial Automation Using OLE
Dr. Bruce E. Segee, Kevin S. LeBlanc University of Maine
Abstract Often, industrial automation software is a single monolithic program that must handle all aspects of control, data gathering, architecture, and reporting. Design of such software is time consuming and error prone. Furthermore, maintenance or modifications to the code is difficult and can “break” other functions. A more powerful approach is to use the multiprocessing capabilities of Windows95™ along with the interprocess communication provided by Object- Linking and Embedding (OLE). Using OLE, the functionality of other Windows applications can be used as building blocks for your own applications without the overhead. For example, a container application and its user interface can be developed in Visual Basic. Microsoft Excel is ideal for organization and analysis of data, thus it could perform any “number crunching”. Similarly, Microsoft Word provides the mechanisms necessary to edit, format, and print documents, so it would be ideal for report generation and printing. Often, in industrial automation, software must interface to hardware to monitor and control machinery. OLE lends itself nicely to this requirement through the use of OLE controls (OCXs) developed in Visual C++. Similar to device drivers, OLE controls can be easily customized to external hardware and utilized in software. In this fashion, hardware control is easily integrated into a Windows application. Furthermore, OLE is a great educational tool because it modularizes the application at hand. This allows a number of students of differing skill levels to take part in program development.
With using OLE as a software building tool, development, management, and enhancement of software is drastically simplified. Likewise, software is less prone to errors and less time is spent in development.
1. Introduction This paper is organized into six sections. Section 2 briefly explains OLE, why one would use OLE over other Windows interprocess communication standards, and how to program using OLE. Specifically, linking and embedding, OLE automation and OLE controls are discussed. Section 3 gives an example using OLE in a generic automation project. Examples of using linking and embedding, as well as OLE automation, are related to Microsoft Word and Excel in an automation application. An example of where OLE controls can be used in development is also discussed. The second half of Section 3 gives a specific example using OLE in a simple intelligent system. Section 4 gives concluding remarks on industrial automation using OLE.
2. Object Linking and Embedding (OLE) 2.1 Overview OLE is a mechanism that allows two software modules to connect and communicate with each other on the same machine. Specifically, OLE allows you to create complex documents by utilizing the resources of other Windows applications.
LeBlanc, K. S., & Segee, B. E. (1997, June), Industrial Automation Using Ole Paper presented at 1997 Annual Conference, Milwaukee, Wisconsin. https://peer.asee.org/6612
ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 1997 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015