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 #42 background imageLoading...
Page #42 background image
Programming Example
Programming in C using the VTL
34
Example Program
This example program queries a USB device for an
identification string and prints the results. Note that you
must change the address if something other than the default
USB address value is required.
/*idn.c - program filename */
#include "visa.h"
#include <stdio.h>
void main ()
{
char buf[300]
ViSession viN9322C
ViStatus viSatus;
ViSession defaultRM;
/*Open session to USB device */
viOpenDefaultRM(&defaultRM);
viWrite This function synchronously sends the data pointed to by buf to the
device specified by vi. Only one synchronous write operation van occur
at any one time.
viWrite(vi, buf, count, &retCount)
viRead This function synchronously reads raw data from the session specified
by the vi parameter and stores the result in location where buf is
pointing. Only one synchronous read operation can occur at any one
time.
viRead(vi, buf, count, &retCount)
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 set free. If you close the default resource manager
session, all sessions opened using that resource manager session will be
closed.
viClose(vi);
viClose(defaultRM)

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