Programming In C Using The Vtl; Typical Example Program Contents - Agilent Technologies PSA Series User And Programming Manual

Spectrum analyzers
Hide thumbs Also See for PSA Series:
Table of Contents

Advertisement

Programming in C Using the VTL

The programming examples that are provided are written using the C
programming language and the Agilent VTL (VISA transition library).
This section includes some basic information about programming in the
C language. Note that some of this information may not be relevant to
your particular application. (For example, if you are not using VXI
instruments, the VXI references will not be relevant).
Refer to your C programming language documentation for more details.
(This information is taken from the manual "VISA Transition Library",
part number E2090-90026.) The following topics are included:
"Typical Example Program Contents" on page 333
"Linking to VTL Libraries" on page 334
"Compiling and Linking a VTL Program" on page 334
"Example Program" on page 336
"Including the VISA Declarations File" on page 336
"Opening a Session" on page 337
"Device Sessions" on page 337
"Addressing a Session" on page 339
"Closing a Session" on page 340

Typical Example Program Contents

The following is a summary of the VTL function calls used in the
example programs.
This file is included at the beginning of the file to
visa.h
provide the function prototypes and constants defined
by VTL.
The ViSession is a VTL data type. Each object that
ViSession
will establish a communication channel must be
defined as ViSession.
viOpenDefaultRM You must first open a session with the default
resource manager with the viOpenDefaultRM
function. This function will initialize the default
resource manager and return a pointer to that resource
manager session.
This function establishes a communication channel
viOpen
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.
viPrintf
These are the VTL formatted I/O functions that are
viScanf
patterned after those used in the C programming
Chapter 5
Programming Fundamentals
Programming in C Using the VTL
333

Advertisement

Table of Contents
loading

This manual is also suitable for:

E4440aE4443aE4445aE4448aE4446a

Table of Contents