beautypg.com

Introduction, C languages – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 222

background image

II. SOFTWARE GUIDES - 10. Driver488/W31

10D. Getting Started

Personal488 User’s Manual, Rev. 3.0

II-207

Introduction

C Languages

Driver488/W31 provides support for Microsoft C, Quick C and Borland C++. In addition,
Driver488/W31 features an IEEE 488 Event Message. The IEEE Event Message can be used to trap
IEEE 488 events such as bus errors and instrument interrupts (

SRQ

) letting your application handle

asynchronous bus events. At run time, the IEEE 488 Message Handler traps IEEE 488 events, which
are then automatically dispatched to the appropriate service routines.

The following text outlines the steps necessary to produce an application program that communicates
with Driver488/W31. For more details on using C languages to develop a basic data acquisition
program and on how to use the IEEE 488 Event Message with Driver488/W31, turn to the next Sub-
Chapter “C Languages” in this Chapter. All of the examples described in that Sub-Chapter were
developed using Quick C for Windows. For details on using the

WINTEST

and

QUIKTEST

utility

programs, turn to the following Sub-Chapter “Utility Programs” in this Chapter. Additional functions
provided by Driver488/W31 are described in “Section III: Command References” of this manual.

Visual Basic

Driver488/W31 provides support for Microsoft’s Visual Basic. Visual Basic includes a tool palette for
designing your application’s user interface, letting you use point-and-click operations to design and test
your entire user interface. For example, to place a button in one of your application’s windows, you
simply select the button tool from the tool palette, then click and drag in the desired window to place
and size the button.

In addition, Driver488/W31 adds to the tool palette with an IEEE 488 Event Custom Control.
Including the Event Custom Control in your application creates service routines for IEEE 488 events
such as bus errors and instrument interrupts (

SRQ

), letting your application handle asynchronous bus

events with unparalleled ease. At run time, the IEEE 488 Event Custom Control traps IEEE 488
events, which are then automatically dispatched to the appropriate service routines.

The following text outlines the steps necessary to produce an application program that communicates
with Driver488/W31. For more details on using Visual Basic to develop a basic data acquisition
program, how to use the IEEE 488 Event Custom Control, and performing Dynamic Data Exchange
with Driver488/W31, turn to the following Sub-Chapter “Visual Basic” in this Chapter. For details on
using the

WINTEST

and

QUIKTEST

utility programs, turn to the following Sub-Chapter “Utility

Programs” in this Chapter. Additional functions provided by Driver488/W31 are described in
“Section III: Command References” of this manual.

C Languages

To successfully operate Driver488/W31, several declarations must be included in the user’s application
program. These declarations are found in two headers which must be included in the main module of
your C program. The two required headers can be found in the language-specific subdirectory at the
end of the path

\IEEE488\LANGUAGE

, if installed under the default conditions.

In the same directory as the headers is the library that must be linked with your C project to resolve
Driver488/W31 external references.

Note:

For proper configuration, the C compiler must have byte alignment when using term structure.

Required Headers

For Microsoft C and Quick C Users:

All programs need to include the following header files to run with Driver488/W31:

iot_main.h
iotmc60w.h

These header files must be included in your test program. To do so, insert the following lines: