Activating the Internet for Virtual Instrumentation

Many scientists and engineers have waited calmly on the sidelines as the technology surrounding the Internet and World Wide Web has exploded over the past 12 to 18 months. After all, the Internet has nothing to do with automated test systems involving data acquisition (DAQ) and instrument control—right?

Wrong. As the test industry becomes increasingly reliant on the personal computer (PC) for automated solutions, any new technology affecting the PC, like the Internet and World Wide Web, will eventually work its way into the virtual instrumentation world. Many test engineers already recognize the Internet as a key support tool for development teams. Advances in Internet technology also are making common instrumentation tasks, such as remote monitoring and control, trivial.

Making Technology Work for Engineers

Intranets are private networks inside a company or organization that use the same kind of software you would find on the public Internet, but is for internal use only. It uses the same easy-to-use tools, such as web browsers and HyperText Markup Language (HTML) files with dynamic links and jumps, that are available for the World Wide Web.

An Intranet server makes an ideal document-distribution system (Figure 1). Many test-engineering teams distribute source-code files, test methods, fixture instructions and user manuals from an Intranet server. A web browser can easily access the files from any computer platform or operating system. System administrators also can track file use through standard web-reporting methods. With the flexibility of today’s server tools, an Intranet server can act simply as an easy-to-use graphical front-end to a standard source code control and tracking repository.

Remote Virtual Instruments Over the Internet

Like the Intranet, the Internet and its easy-to-use access tools make a good platform for distributed and remote virtual instrumentation. With the Internet, you can distribute completely running applets to field-service personnel or pass data from a remote data-monitoring system back to the corporate offices. More importantly, these capabilities are available through easy-to-use development tools. Through ActiveX controls and new web-page development tools, Microsoft makes remote virtual instrumentation a reality.

ActiveX controls, formerly known as OLE controls, are software components callable from many different development tools, including Visual C++, Visual Basic and Access.1 You can think of an ActiveX control as a self-contained executable code module for performing a task that can be controlled from a programming environment.

ActiveX controls have properties that you can set or retrieve programmatically, methods that you can call, and events that are fired when the control must send information back to your program asynchronously. ActiveX controls have gained widespread acceptance because they are the primary vehicle for adding capabilities to Visual Basic, since Visual Basic is one of the most widely used and easiest development tool under Windows. Today, ActiveX controls are available for acquiring data from plug-in DAQ boards, analyzing data and building virtual instrument panels.

ActiveX Controls Over the Internet

How are ActiveX controls related to the World Wide Web? The latest group of tools to support ActiveX controls is web browsers. Both Microsoft Internet Explorer 3.0 and Netscape Navigator (through an add-in) can view HTML pages with embedded ActiveX controls.

As a result, you can download an HTML page and run it within your web browser. This means you can build test programs, or applets, directly into HTML pages with a delivery system as simple as a web browser.

With the ActiveX approach, Microsoft makes it easy to develop web applets. VB-Script, a Visual Basic-like programming language, is used to program, or automate, ActiveX controls in a browser. For example, you can build an HTML page that consists of a collection of ActiveX controls and some VB-Script that tells the ActiveX controls what to do.

You might have an ActiveX control for acquiring data with a plug-in DAQ board, another for displaying data on a graph control, and a third for sending data over a transmission control protocol (TCP) to other computers. The VB-Script might trigger the DAQ control to acquire a waveform from a particular input channel and then send the data to the graph control. Because the applet executes locally within a browser, end users running the program can operate the user interface controls as a dynamic front-end.

For example, once the data is passed to the graph control, you can zoom in on the data, operate cursors and pan on the data in the graph. Likewise, knobs, meters, gauges and push buttons can be operated directly from within the browser (Figure 2).

To complete our simple example, once you acquire the waveform and analyze it in the graph control, press a button to send the data back to a centralized file transfer protocol (FTP) server using the TCP control. Why is it significant that you can write a program that acquires a waveform, plots it on a graph, and then sends it back to a remote computer?

First, the delivery mechanism. The program is an HTML page that is downloaded just like any other web page. This is an ideal scenario for field-service tests. Rather than equip your field-service personnel with a large collection of programs that will need to be maintained on each of their hard drives, simply provide the maintenance programs on a web server.

Whenever field technicians need a program to diagnose or to service a unit in the field, they connect to the web server and download the appropriate one. As the test-program developer, you maintain one set of files on the server.

Second, the distribution requirements. You only need a web browser (Internet Explorer or Navigator with an add-in) to run the program as well as a DAQ board installed on your computer.

Web-Based Virtual Instruments

Microsoft has made the task of building these distributed applets easy. You don’t have to know Java or complicated C++ programming to build these applets. Instead, Visual Basic is the language for automating ActiveX controls in a web browser. Anyone familiar with Visual Basic can build Internet applets using VB-Script and ActiveX controls.

Microsoft also has created a development environment for building active web pages. With the ActiveX ControlPad, you can build web pages much in the same fashion as you build Visual Basic applications (Figure 3). ControlPad has an interactive drag-and-drop graphical editor in which you can lay out your web page with ActiveX controls. In addition, ControlPad has a script wizard that automatically generates VB-Script code based on entries by the developer.

Future Developments

Today, most of the ActiveX web-based technology focuses on the client, meaning clients can download web pages and execute them on the local computer. In the future, Microsoft will apply the VB-Script concept for controlling server-side operations. This means you can develop more advanced servers that can query clients connecting for particular information and make decisions on the fly based on the client input. These decisions will be driven by VB-Script.

As general-purpose PC technology continues to evolve and develop, astute scientists and engineers will be able to find faster, easier and cheaper solutions to traditional test and measurement challenges. The Internet and World Wide Web are just examples in which technology is easily adapted to meet the needs of the engineer—in this case, for remote virtual instruments. In the case of the Internet, the key to its success in the virtual instrumentation arena is ease of use—of the end-user tools such as web browsers in general, and of the new development tools such as the ActiveX ControlPad.

Reference

1. Pasquarette, J., “Building Virtual Instruments With OLE Controls,” EE-Evaluation Engineering, February 1996, pp. S-22-S-25.

Note: This article can be accessed on EE’s TestSite at www.nelsonpub.com/ee/. Select EE Archives and use key word search.

About the Author

John Pasquarette is the instrumentation software marketing manager at National Instruments. He received a B.S. degree in electrical engineering from Texas A&M University. After spending one year as a consultant, Pasquarette joined National Instruments in 1990 as an applications engineer. He was promoted to LabWindows/CVI marketing manager, then to visual development tools marketing manager. National Instruments, 6504 Bridge Point Parkway, Austin, TX 78730-5039, (512) 794-0100.

 

Sidebar no fig

Instrumentation Software Packages Get Connected on the Web

Microsoft is not the only software company taking advantage of the web. In fact, many of the leading instrumentation software vendors now offer web connectivity over the Internet. In general, these approaches vary slightly from the distributed applet approach followed in the ActiveX model.

For example, with the new Internet Developers Toolkit, you can add web-server capabilities to your data-acquisition and instrument-control applications built in LabVIEWÒ or LabWindowsÒ /CVI. Following this server scenario, multiple clients can connect to the LabVIEW application to download a replica of the application’s front panel.

The web server automatically supplies images of the virtual instrument front panel as a single snapshot or as an animation. Through the Internet Developers Toolkit, you can make any virtual instruments immediately accessible over the Internet from any other computer equipped with a web browser and Internet connection; no extra programming is required. For more information, visit web site www.ni.com.

 

Copyright 1997 Nelson Publishing Inc.

February 1997

 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!