
Building a VISA Application in Windows
2
Agilent VISA User’s Guide
17
C/C++ Sample Program Contents
A summary of the VISA function calls used in the preceding sample
C/C++ program follows. For a more detailed explanation of VISA
functionality, see
Chapter 3
, “Programming with VISA
.”
See the
VISA
Online Help
for more detailed information on these VISA function
calls.
Table 2
Summary of VISA Function Calls Used in the C/C++ Sample
Function(s)
Description
visa.h
This file is included at the beginning of the program to
provide the function prototypes and constants defined by
VISA.
ViSession
The
ViSession
is a VISA data type. Each object that will
establish a communication channel must be defined as
ViSession
.
viOpenDefaultR
M
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.
viOpen
This function establishes a communication channel with
the device specified. A session identifier that can be used
with other VISA functions is returned. This call must be
made for each device you will be using.
viPrintf
and
viScanf
These are the VISA formatted I/O functions that are
patterned after those used in the C programming
language. The
viPrintf
call sends the IEEE 488.2
*RST
command to the instrument and puts it in a known state.
The
viPrintf
call is used again to query for the device
identification (
*IDN?
). The
viScanf
call is then used to
read the results.
viClose
This function must be used to close each session. When
you close a device session, all data structures that had
been allocated for the session will be deallocated. When
you close the default manager session, all sessions opened
using that default manager session will be closed.
Содержание E2094S
Страница 6: ...6 Agilent VISA User s Guide ...
Страница 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Страница 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Страница 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...
Страница 144: ...144 Agilent VISA User s Guide Glossary ...