Using C And The Gpib Command Library; Supported C Programs; Executing A Program - Agilent Technologies 75000 Series B Configuration Manual

Installing the mainframe and plug-in modules
Hide thumbs Also See for 75000 Series B:
Table of Contents

Advertisement

Using C and the GPIB Command Library

The following shows how to use the C program language with the GPIB Command Library and the Agilent
82335 GPIB Interface Card (the command library is supplied with the GPIB Card). Both the GPIB Card and
Command Library are used in a PC type computer.
The GPIB Command Library provides the functions to send the SCPI commands that control instrument
operation. To send a SCPI command, the C function requires the GPIB address of the instrument (e.g.,
70900) and the SCPI command. To receive data from the instrument, the C function requires the GPIB
address and the returned data format. Typical functions to send commands and to receive data are as follows
(refer to the GPIB Command Library Manual for other commands).

Supported C Programs

The supported C programs are:
Microsoft® C and C+ +
Borland C and C+ +
What's Needed
You need the following libraries and header files. These are supplied with the command library.
clhpib.lib - for Microsoft® C and C+
tchhpib.lib - for Borland C and C+ +
cfunc.h - for the Small memory model only

Executing a Program

To execute a program, first compile and link the program to make an executable file. To compile the
program from the command line:
Link the appropriate GPIB C library (from the GPIB Command Library files). Use one of the
following libraries:
Microsoft® C + and C+ + , and QuickC© : clhpib.lib
Borland C and C+ + : tchhpib.lib
If using the Small memory model, include "cfunc.h" header file (from the GPIB Command Library
files). This file is not needed when using the Large/Huge memory models.
Be sure the necessary paths have been added to the AUTOEXEC.BAT file for the compilers to find
the correct library and header file (see your C Language documentation to set the proper paths).
2-10
Sending SCPI Commands

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1301bE1300b

Table of Contents