Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 681

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

* 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)
{
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
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);
/* 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
Programming Examples
/* GPIB */
/* LAN */
/* USB */
681
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents