Technical data

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);
}