EasyManuals Logo

Keysight N9322C User Manual

Keysight N9322C
223 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #43 background imageLoading...
Page #43 background image
35
Programming Example
Programming in C using the VTL
viStatus=viOpen(defaultRM,"USB0::2391::8472::000
0000000::0::INSTR",VI_NULL,VI_NULL,&viN9322C);
/*Initialize device */
viPrintf(viN9322C, "*RST\n");
/*Send an *IDN? string to the device */
printf(viN9322C, "*IDN?\n");
/*Read results */
viScanf(viN9322C, "%t", &buf);
/*Print results */
printf("Instrument identification string: %s\n",
buf);
/* Close the sessions */
viClose(viN9322C);
viClose(defaultRM);
}
Including the VISA Declarations File
For C and C++ programs, you must include the visa.h
header file at the beginning of every file that contains VTL
function calls:
#include “visa.h”
This header file contains the VISA function prototypes and
the definitions for all VISA constants and error codes. The
visa.h header file includes the visatype.h header file.
The visatype.h header file defines most of the VISA types.
The VISA types are used throughout VTL to specify data
types used in the functions. For example, the
viOpenDefaultRM function requires a pointer to a
parameter of type ViSession. If you find ViSession in the
visatype.h header file, you will find that ViSession is
eventually typed as an unsigned long.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight N9322C and is the answer not in the manual?

Keysight N9322C Specifications

General IconGeneral
BrandKeysight
ModelN9322C
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals