Choosing How To Use The Ni-488.2 Api; Communicating With A Single Gpib Device - National Instruments NI-488.2 User Manual

National instruments user manual ni-488.2
Hide thumbs Also See for NI-488.2:
Table of Contents

Advertisement

Chapter 3
Developing Your NI-488.2 Application

Choosing How to Use the NI-488.2 API

NI-488.2 User Manual for Windows
The NI-488.2 API has two subsets of calls to meet your application needs.
Both of these sets, the traditional calls and the multi-device calls, are
compatible across computer platforms and operating systems, so you can
port programs to other platforms with little or no source code modification.
For most applications, the traditional NI-488.2 calls are sufficient. If you
have a complex configuration with one or more interfaces and multiple
devices, use the multi-device NI-488.2 calls. Whichever option you
choose, bus management operations necessary for device communication
are performed automatically.
The following sections describe some differences between the traditional
NI-488.2 calls and the multi-device NI-488.2 calls.

Communicating with a Single GPIB Device

If your system has only one device attached to each interface, the traditional
NI-488.2 calls are probably sufficient for your programming needs. A
typical NI-488.2 application with a single device has three phases:
Initialization: use
device.
Device Communication: use
to communicate with the device.
ibwait
Cleanup: use
ibonl
Refer to the sample applications that are installed with the NI-488.2
software to see detailed examples for different GPIB device types.
For NI-488.2 applications that need to control the GPIB in non-typical
ways, for example, to communicate with non-compliant GPIB devices,
there are a set of low-level functions that perform rudimentary GPIB
applications. If you use these functions, you need to understand GPIB
management details like how to address talkers and listeners. Refer to
Appendix A,
GPIB
Basics, for some details on GPIB management.
The set of low-level functions are called board-level functions. They access
the interface directly and require you to handle the addressing and bus
management protocol. These functions give you the flexibility and control
to handle situations such as the following:
Communicating with non-compliant (non-IEEE 488.2) devices.
Altering various low-level interface configurations.
Managing the bus in non-typical ways.
to get a handle and use
ibdev
,
ibwrt
ibrd
to put the handle offline.
3-4
to clear the
ibclr
,
,
, and
ibtrg
ibrsp
www.natinst.com

Advertisement

Table of Contents
loading

Table of Contents