Writing Your Ni-488.2 Application; Items To Include - National Instruments NI-488.2M Software Reference Manual

For os/2
Hide thumbs Also See for NI-488.2M:
Table of Contents

Advertisement

Chapter 3

Writing Your NI-488.2 Application

This section discusses items you should include in an application program that
uses NI-488.2 routines, general program steps, and examples.

Items to Include

Include the GPIB header file. This file contains prototypes for the NI-488.2
routines and constants that you can use in your application program. Include
the declaration file appropriate for your compiler as follows:
#include "decl.h"
#include "decl_16.h"/* 16-bit C compiler */
Check for errors after each NI-488.2 routine.
Declare and define a function to handle GPIB errors. This function takes the
board offline and closes the application. If the function is declared as
follows
void gpiberr (char *msg); /* function prototype */
your application invokes the function as follows
if (ibsta & ERR) {
gpiberr("GPIB error");
}
© National Instruments Corp.
Developing Your Application
/* 32-bit C compiler */
3-13
NI-488.2M SRM for OS/2

Advertisement

Table of Contents
loading

Table of Contents