C Programming Examples Using Vtl; Typical Example Program Contents - HP ESA-E Series Programmer's Manual

Esa spectrum analyzers
Table of Contents

Advertisement

C Programming Examples using VTL

The programming examples that are provided in this guide are written
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 taken
from the manual "HP VISA Transition Library", HP part number
E2090-90026.) The following topics are included:

"Typical Example Program Contents"

"Linking to VTL Libraries"
"Compiling and Linking a VTL Program"
"Example Program"
"Including the VISA Declarations File"
"Opening a Session"
"Device Sessions"
"Addressing a Session"
"Closing a Session"
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
language. The viPrintf call sends the IEEE 488.2
*RST command to the analyzer and puts it in a known
state. The viPrintf call is used again to query for the
Chapter 3
on page 3-3
on page 3-4
on page 3-6
on page 3-7
on page 3-7
on page 3-9
on page 3-10
Programming Examples
C Programming Examples using VTL
on page 3-4
on page 3-6
3-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents