Agilent Technologies ESA-E Series Programmer's Manual page 64

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Examples
C Programming Examples using VT L
C Programming Examples using VT L
The programming examples that are provided in this guide are writte n
using the C programming language and the VTL (VISA transition
library) . This section includes some basic information about
programming in the C language . Refer to your C programming
language documentation for more details . (This information is take n
from the manual "HP VISA Transition Library", HP part numbe r
E2090-90026 .) If you are using the National Instruments VISA library,
most of this information will still apply, but the include and library file s
will be in different subdirectories. Also, this information assumes a
computer running a Windows 95 operating system with an HP/Agilen t
82341C GPIB interface card is being used . The following topics are
included :
"Typical Example Program Contents" on page 3- 4
"Linking to VTL Libraries" on page 3- 5
"Compiling and Linking a VTL Program" on page 3- 5
"Example Program" on page 3- 7
"Including the VISA Declarations File" on page 3- 7
"Opening a Session" on page 3- 8
"Device Sessions" on page 3- 8
"Addressing a Session" on page 3-1 0
"Closing a Session" on page 3-1 1
Typical Example Program Content s
The following is a summary of the VTL function calls used in th e
example programs .
visa .h
This file is included at the beginning of the file to
provide the function prototypes and constants define d
by VTL .
ViSession
The
ViSession is
a VTL data type. Each object that
will establish a communication channel must be
defined as
ViSession.
viOpenDefaultRM
You must first open a session with the default resourc e
manager with the
viOpenDefaultRM
function . This
function will initialize the default resource manage r
and return a pointer to that resource manager session .
viOpen
This function establishes a communication channe l
with the device specified . A session identifier that can
be used with other VTL functions is returned . This call
must be made for each device you will be using .
3-4
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents