
92
Chapter 2
Programming Fundamentals
C Programming Examples using VTL
The following is an example of opening a device session with the GPIB
device at primary address23.
ViSession defaultRM, vi;
.
.
viOpenDefaultRM (&defaultRM);
viOpen (defaultRM, “GPIB0::23::INSTR”, VI_NULL,VI_NULL,&vi);
.
.
viClose(vi);
viClose (defaultRM);
Closing a Session
The
viClose
function must be used to close each session. You can close
the specific device session, which will free all data structures that had
been allocated for the session. If you close the default resource manager
session, all sessions opened using that resource manager will be closed.
Since system resources are also used when searching for resources
(
viFindRsrc
) or waiting for events (
viWaitOnEvent
), the
viClose
function needs to be called to free up find lists and event contexts.
Содержание E4406A VSA Series
Страница 4: ...4 ...
Страница 59: ...59 2 Programming Fundamentals ...
Страница 76: ...76 Chapter2 Programming Fundamentals Using the Instrument Status Registers Overall Status Register System ...
Страница 124: ...124 Chapter2 Programming Fundamentals Using the LAN to Control the Analyzer ...
Страница 125: ...125 3 Programming Examples ...
Страница 164: ...164 Chapter3 Programming Examples Using Java Programming Over Socket LAN ...
Страница 165: ...165 4 Programming Command Cross References ...
Страница 379: ...379 6 Error Messages ...
Страница 412: ...412 Chapter6 Error Messages Error Message Descriptions ...