Asee peer logo

Instrument I/O Using Visual Basic

Download Paper |


2001 Annual Conference


Albuquerque, New Mexico

Publication Date

June 24, 2001

Start Date

June 24, 2001

End Date

June 27, 2001



Page Count


Page Numbers

6.601.1 - 6.601.9

Permanent URL

Download Count


Request a correction

Paper Authors

author page

David Hergert

Download Paper |

NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract

Session 2559

Instrumentation I/O and Visual Basic David Hergert Miami University Ohio

1. Introduction

If a college wants to implement a computerized instrumentation system without using commercial software, Visual Basic provides a quick and easy solution. Visual Basic is capable of creating ActiveX controls to display data, as well as providing numerous methods to transfer and store data. Data can even be displayed on the web using ActiveX . When developing VB computerized instrumentation systems, the following must be taken into account.

• How the energy is being measured. • How it will be brought into the computer. • How it will display data. • How the data is stored. • What kind of data transfer will be needed.

Before developing a Visual Basic instrumentation system, the professor must first determine what type of transducer he is interfacing to. Next he will either buy or design the appropriate signal conditioning to bring the signal into the computer. This includes necessary A/D and DSP conversions. To bring the data into the computer, the user has a minimum of three choices:

• Use a commercial plug-in data acquisition board • Use the serial port • Use the printer port

While Visual Basic can easily display data, it is more difficult to read in data than QuickBasic. Displaying data can be made a relatively simple process by first creating ActiveX controls. A discussion of how to read through a serial port is first covered, then a description of creating ActiveX controls for displays. Finally a description of how Visual C++ can be used to create a DLL that allows Visual Basic to read from a port.

2. Serial I/O with Visual Basic

Many inexpensive devices exist today that allow the user to read data through the communication port. Serial data acquisition boards can input and output analog or digital signals. In addition, digital multimeters and oscilloscopes often have an RS-232port included. Some digital multimeters also include a thermocouple for temperature measurement. Often this equipment comes with instructions on how to set up data transfer using Microsoft QuickBasic. Reading and writing to a serial port in Visual Basic is done in a similar manner. When QuickBasic attempts to make a connection, the following events happen:

"Proceedings of the 2001 American Society for Engineering Education Annual Conference & Exposition Copyright 2001, American Society for Engineering Education"

Hergert, D. (2001, June), Instrument I/O Using Visual Basic Paper presented at 2001 Annual Conference, Albuquerque, New Mexico.

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: © 2001 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