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 #47 background imageLoading...
Page #47 background image
39
Programming Example
Checking the USB Connection
Checking the USB Connection
Usually, using ā€œ*IDN?ā€ verifies the data transferring
between the controller PC and the instrument.
****************************************************
#include "visa.h"
#include <stdio.h>
#define BufferSize 128
static ViStatus status;
static ViSession defaultRM;
static ViSession inst_N9322C;
static ViUInt32 rcount;
static unsigned char buffer[BufferSize];
int main(void)
{
/* Connect N9322C and read its "IDN". */
status = viOpenDefaultRM (&defaultRM);
status = viOpen (defaultRM,
"USB0::2391::8472::0000000000::0::INSTR", VI_NULL,
VI_NULL, &inst_N9322C);
if (status != VI_SUCCESS)
return -1; //failed to connect N9322C/
/* Read "IDN" from N9322C" */
status = viWrite (inst_N9322C, "*RST\n",
StringLength("*RST\n"), &rcount);
status = viWrite (inst_N9322C, "*IDN?\n",
StringLength("*IDN?\n"), &rcount);
status = viRead (inst_N9322C, buffer, BufferSize,
&rcount);
/* Close connection to N9322C. */
status = viClose (inst_N9322C);
status = viClose (defaultRM); return 1;
}

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