PC-based data acquisition evolved as a result of the merger of general-purpose, low-cost, high-powered PCs and special-purpose data acquisition hardware components. In effect, the specialized data acquisition market leveraged off the very large general-purpose PC market to provide scientific and technical customers with inexpensive, effective data acquisition solutions.
A comparable merger is now underway in the realm of software. Until recently, acquiring and reporting data was an involved process. You wrote data acquisition applications in conventional languages such as BASIC or C or used dedicated, specialized data acquisition programs such as LABTECH NOTEBOOKTM or National Instruments’ LabVIEWÒ . To report your acquired data, maybe you imported or pasted the data into a mainstream software program, such as a spreadsheet or word processor.
Now, the process of acquiring and reporting data is changing. The advent of true multitasking environments such as WindowsÒ 95and the comprehensive programming standard, object linking and embedding (OLE), help streamline the process. As data acquisition hardware components have transformed general-purpose PCs into specialized data acquisition systems, software components are transforming general-purpose software into specialized data acquisition applications.
What Are Software Components?
The term “software components” generally refers to software constructed so it can be added to or accessed from other software applications. This is primarily made possible with the latest version of OLE 2.0, a comprehensive standard that outlines how software developers should write their programs to interact with other software and the operating environment. Using OLE under the Windows environment, you can customize your work environment using software components in a variety of ways, such as adding their functionality to a mainstream software program.
For example, with mainstream software, such as Microsoft’s ExcelTM, it is possible to include a command or function so you can attach special functions directly into the Excel program. The Excel name for these special functions is add-in.
Currently, there are add-ins for special functions such as data acquisition and statistical and engineering analysis. Once these add-ins are installed in your mainstream software, you can access that specialized function, such as data acquisition, via a toolbar.
Add-ins are not limited to Excel. Other software programs, such as Visual Basic, now offer the add-in (also called add-on) feature.
With software components, both add-ins and embedded objects, you can combine the functions of applications rather than rely on dedicated applications that do everything. No longer will you have to pay extra for features that are already available from lower-cost applications, such as Microsoft WordTM and Excel. Likewise, data acquisition suppliers can concentrate on producing only programs that are absolutely essential to data acquisition–and the cost savings of producing such software can be passed onto you.
What’s In It For You?
Software components allow you to easily and inexpensively construct a data acquisition environment suited to your needs. To acquire and analyze statistical and engineering data, you can customize your spreadsheet application by adding a special function so you can easily acquire and analyze that type of data. To generate a report that includes text, raw and calculated numeric data, and a graphic summary, you can embed a spreadsheet and chart into a word-processing document.
Previously, analyzing and reporting data was accomplished by concurrently running a word processor, a spreadsheet and a graphics program. A better approach uses a single “home” application that accomplishes all these things automatically–a word processor with spreadsheet and graphics capabilities.
You can access Excel’s spreadsheet and graphics capabilities from within a home, or client application, such as Word. This provides you with a single document that holds all your data.
To do this, you embed or paste a spreadsheet and the accompanying graphics into a Word document. To adjust the raw data, double-click on the embedded spreadsheet. When you do this, the spreadsheet’s source application opens, allowing you to enter new data into the appropriate cells. The calculated cells and the embedded graphs associated with the numeric data are updated automatically.
To return to the home application, click anywhere outside the spreadsheet. This solution does not require you to write a single line of code or glue together any icons.
How Software Components Work
All software programs and applications have strong and weak points. Under a software-components architecture, software program and applications developers expose the strong points of their products so the specialized features can be accessed by those of other applications.
Exposing features divides an application into usable modules of functionality, then applies a standardized interface that provides access to these modules. This modularization of software functionality and the creation of structured interfaces are concepts borrowed from object-oriented programming (OOP).
For years, software pundits have said that reusable code will provide the next big jump in software development productivity–and it has. OOP promotes reuse of encapsulated software. Visual Basic’s eXtension (VBX) technology is a good example of this. It changed the central focus of programming from source-code files to graphical user interface (GUI) elements.
Generally, a software program consists of a collection of source code and other text files that contain a symbolic description of the program. With Visual Basic, the source code is still a major part of the development process, but you can save time by combining this code with your choice of on-screen objects (called custom controls or VBXs) that you piece together.
A typical custom control has both an appearance and defined behavior. For instance, to write a Visual Basic program that requires a File Open dialog box, you can either develop a dialog box and all its on-screen controls or use the Common Dialog VBX, which provides this functionality. To use the Common Dialog VBX, instruct the dialog box to open. VBX handles every interaction required to get a file name for you.
Ideal System Software
The ideal turnkey data acquisition package:
Permits you to set up and operate data acquisition hardware via an easy-to-use GUI.
Allows you to store acquired data in a tabulated, spreadsheet format.
Enables you to calculate results and analyze raw data.
Offers you many graphing options and gives you the ability to print reports.
A data acquisition package with such extensive functionality usually costs about $2,000. However, you can attain this level of functionality for much less by using some of the software packages you already have, such as installing a data acquisition add-in within Excel.
An add-in does not require programming, writing code, wiring icons together or building flow charts to collect data and place it in a spreadsheet. All you do is pop up the dialog box, adjust the data acquisition parameters and click Go.
Just as the power of the PC is the foundation for PC-based data acquisition, the strength of Excel is the heart of the add-in solution. In addition to providing a wealth of basic functionality, Excel also offers an assortment of high-powered math and analysis functions, including frequency domain functions such as fast Fourier transforms.
All this makes it easy for you to set up a spreadsheet for analyzing and reducing raw data, generating graphs and printing reports–which means that Excel is suitable for repetitive tests in which consistency is important. Recent studies indicate that over 70% of all engineers use Excel for reporting purposes.
Using Embedded Objects With Add-Ins
You can obtain automated reports by embedding an Excel object equipped with a data acquisition add-in into a Word document. In this situation, Word serves as the home or client application and holds all text; the Excel spreadsheet or chart serves as the embedded object and holds raw and calculated data and graphics.
To access the data acquisition add-in, you double click the Excel object in a Word document. This gives you access to Excel and all its installed add-ins. Then you perform a data acquisition that updates the Excel object as well as all its calculated cells and dependent graphs within a Word document. This compound document lets you collect, analyze, graph and annotate your data.
True multitasking systems such as Windows95 are encouraging PC
users to develop highly specialized solutions using software components from various sources. This is, in part, because Windows 95 had updated OLE, which offers you advantages such as add-ins and embedded objects.
OLE promises to provide you with the tools you need to combine
software modules into applications suited to your needs. As the software-components architecture increases in popularity, you will be able to access more specialized features of inexpensive and powerful mainstream applications to create custom data acquisition solutions.
About the Author
Steve Lekas is the Director of New Product Development at IOtech. He has more than 15 years of experience in the industrial control and test systems industries, and has worked for Gould’s Recording Systems Division and Keithley Instruments. Mr. Lekas holds both B.S. and master’s degrees in electrical engineering. IOtech, Inc., 25971 Cannon Rd., Cleveland, OH 44146, (216) 439-4091.
Copyright 1995 Nelson Publishing Inc.