Add voice command to virtual instrumentation
Alexander Bell, Infosoft International Inc, Rego Park, NY -- 5/30/2002
Debates still persist in the engineering community about the relative merits of analog and digital controls of instrumentation. Meanwhile, a revolutionary new type of control—voice-command control—is gaining acceptance in many application areas (Reference 1). This Design Idea focuses on the practical implementation of the Voice Commander voice-command interface in a virtual-instrumentation project. The beauty of the method lies in the fact that a single Microsoft Excel file, vScope VC.xls, encapsulates the entire voice-command system. The Excel file comprises two worksheets, vScope and vScopeData; two standard code modules; and a small portion of code in the This Workbook code module. Click here to download the relevant software. Using the terminology and the concept of modern multitiered software architecture, the voice-command method embraces the user-interface and the business-logic layers.
The simulated-data layer is in the vScopeData worksheet. Column A contains the samples' ordinal numbers (i=1, 2, ...64), Column B contains simulated signal-amplitude samples (V=sin(6.28×2×i/64)+0.5cos(6.28×10×i/64)), and columns C and D contain calculated complex-FFT and signal-amplitude spectra, respectively. By adding the actual data source (signal samples captured by a data-acquisition board or database query for historical data analysis) and linking it to Column B, you can expand the technique to a "full-flavored" virtual instrument or analytical tool with voice-command interface.
The vScope worksheet contains the Chart Object (called "Chart1" in the downloadable macros), formatted to emulate the actual oscilloscope screen (Figure 1). A custom toolbar appears at the top of the display, which contains control buttons. The buttons are associated with macros that execute when you press the button or say the command, corresponding with button's caption. Note that the voice-command feature is available only in the latest Excel 2002 Office application. Table 1 shows the list of custom commands. The Chart Object dynamically links via macros to the simulated data in the vScopeData worksheet. The Business Logic portion of the routine is programmed in VBA (macros) and partially in Excel worksheet functions. It contains a 64-point FFT, based on the Excel add-in functions. To use this feature, install Analysis Tool-VBA from the Tools-Add-Ins menu item. You can expand the business-logic and user-interface layers by including different digital-filtering and windowing techniques and by adding multiple channels, for example.
Is this the best Design Idea in this issue? Select at www.ednmag.com.
| Reference |
|
© 2009, Reed Business Information, a division of Reed Elsevier Inc. All Rights Reserved.

