Agilent Technologies InfiniiVision 7000A Series Programmer's Manual page 892

Table of Contents

Advertisement

12
Programming Examples
* Edit the DEVICE_ADDRESS line to specify the address of the
* applicable device.
*/
#include <stdio.h>
#include "sicl.h"
/* #define DEVICE_ADDRESS "gpib0,7" */
/* #define DEVICE_ADDRESS "lan[a-mso6102-90541]:inst0" */
#define DEVICE_ADDRESS "usb0[2391::5970::30D3090541::0]"
#define WAVE_DATA_SIZE 5000
#define TIMEOUT
#define SETUP_STR_SIZE 3000
#define IMG_SIZE
/* Function prototypes */
void initialize(void);
void extra(void);
void capture(void);
void analyze(void);
void get_waveform(void);
void save_waveform(void);
void retrieve_waveform(void);
/* Global variables */
INST id;
char buf[256] = { 0 };
/* Array for waveform data. */
unsigned char waveform_data[WAVE_DATA_SIZE];
double preamble[10];
void main(void)
{
892
300000
/* Install a default SICL error handler that logs an error message
* and exits.
On Windows 98SE or Windows Me, view messages with
* the SICL Message Viewer.
* Viewer.
*/
ionerror(I_ERROR_EXIT);
/* Open a device session using the DEVICE_ADDRESS */
id = iopen(DEVICE_ADDRESS);
if (id == 0)
{
printf ("Oscilloscope iopen failed!\n");
}
else
{
printf ("Oscilloscope session initialized!\n");
/* Set the I/O timeout value for this session to 5 seconds. */
itimeout(id, TIMEOUT);
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
/* For printf(). */
/* SICL routines. */
5000
/* Initialize the oscilloscope. */
/* Miscellaneous commands not executed,
shown for reference purposes. */
/* Digitize data from oscilloscope. */
/* Make some measurements. */
/* Download waveform data from
oscilloscope. */
/* Save waveform data to a file. */
/* Load waveform data from a file. */
/* Device session ID. */
/* Buffer for IDN string. */
/* Array for preamble. */
For Windows 2000 or XP, use the Event
/* GPIB */
/* LAN */
/* USB */

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents