Agilent Technologies 81134A Service Manual Page 12

  • Download
  • Add to my manuals
  • Print
  • Page
    / 104
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 11
Connecting to the Pulse/Pattern Generator for Remote Programming Connecting to the Instrument via GPIB
12 Agilent 81133A/81134A Pulse Generator Programming Guide, March 2007
Example for Connecting via GPIB
The following code example shows how to use the VISA library to
connect to the instrument via GPIB.
This example queries a GPIB device for an identification string and
prints the results.
Implementation
#include <visa.h>
#include <stdio.h>
void main () {
ViSession defaultRM, vi;
char buf [256] = {0};
/* Open session to GPIB device at address 22 */
viOpenDefaultRM (&defaultRM);
viOpen (defaultRM, "GPIB0::22::INSTR", VI_NULL,VI_NULL, &vi);
/* Initialize device */
viPrintf (vi, "*RST\n");
/* Send an *IDN? string to the device */
viPrintf (vi, "*IDN?\n");
/* Read results */
viScanf (vi, "%t", &buf);
/* Print results */
printf ("Instrument identification string: %s\n", buf);
/* Close session */
viClose (vi);
viClose (defaultRM);
}
Page view 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 103 104

Comments to this Manuals

No comments