EasyManuals Logo

Agilent Technologies InfiniiVision 5000 Series Programmer's Guide

Agilent Technologies InfiniiVision 5000 Series
788 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 #699 background imageLoading...
Page #699 background image
Programming Examples 12
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide 699
* This program illustrates most of the commonly-used programming
* features of your Agilent oscilloscope.
* This program is to be built as a WIN32 console application.
* Edit the RESOURCE line to specify the address of the
* applicable device.
*/
#include <stdio.h> /* For printf(). */
#include <visa.h> /* Agilent VISA routines. */
/* GPIB */
/* #define RESOURCE "GPIB0::7::INSTR" */
/* LAN */
/* #define RESOURCE "TCPIP0::a-mso6102-90541::inst0::INSTR" */
/* USB */
#define RESOURCE "USB0::2391::5970::30D3090541::0::INSTR"
#define WAVE_DATA_SIZE 5000
#define TIMEOUT 5000
#define SETUP_STR_SIZE 3000
#define IMG_SIZE 300000
/* Function prototypes */
void initialize(void); /* Initialize the oscilloscope. */
void extra(void); /* Miscellaneous commands not executed,
shown for reference purposes. */
void capture(void); /* Digitize data from oscilloscope. */
void analyze(void); /* Make some measurements. */
void get_waveform(void); /* Download waveform data from
oscilloscope. */
void save_waveform(void); /* Save waveform data to a file. */
void retrieve_waveform(void); /* Load waveform data from a file. */
/* Global variables */
ViSession defaultRM, vi; /* Device session ID. */
char buf[256]={0}; /*Buffer for IDN string. */
unsigned char waveform_data[WAVE_DATA_SIZE]; /* Array for waveform
data. */
double preamble[10]; /* Array for preamble. */
void main(void)
{
/* Open session. */
viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, RESOURCE, VI_NULL,VI_NULL, &vi);
printf ("Oscilloscope session initialized!\n");
/* Clear the interface. */
viClear(vi);
initialize();
/* The extras function contains miscellaneous commands that do not
* need to be executed for the proper operation of this example.

Table of Contents

Other manuals for Agilent Technologies InfiniiVision 5000 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies InfiniiVision 5000 Series and is the answer not in the manual?

Agilent Technologies InfiniiVision 5000 Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelInfiniiVision 5000 Series
CategoryTest Equipment
LanguageEnglish

Related product manuals