Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1179

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sicl.h>
#define SICL_ADDRESS
#define TIMEOUT
#define IEEEBLOCK_SPACE
/* Function prototypes */
void initialize(void);
void capture(void);
void analyze(void);
void do_command(char *command);
int do_command_ieeeblock(char *command); /* Command w/IEEE block. */
void do_query_string(char *query);
void do_query_number(char *query);
void do_query_numbers(char *query);
int do_query_ieeeblock(char *query);
void check_instrument_errors();
/* Global variables */
INST id;
char str_result[256] = {0};
double num_result;
unsigned char ieeeblock_data[IEEEBLOCK_SPACE];
double dbl_results[10];
/* Main Program
* --------------------------------------------------------------- */
void main(void)
{
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
/* 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 SICL_ADDRESS */
id = iopen(SICL_ADDRESS);
if (id == 0)
{
printf ("Oscilloscope iopen failed!\n");
}
else
{
printf ("Oscilloscope session opened!\n");
}
/* Initialize - start from a known state. */
initialize();
/* For printf(). */
/* For strcpy(), strcat(). */
/* For clock(). */
/* Agilent SICL routines. */
"usb0[2391::6054::US50210029::0]"
5000
100000
/* Initialize to known state. */
/* Capture the waveform. */
/* Analyze the captured waveform. */
/* Send command. */
/* Query for string. */
/* Query for number. */
/* Query for numbers. */
/* Query for IEEE block. */
/* Check for inst errors. */
/* Device session ID. */
/* Result from do_query_string(). */
/* Result from do_query_number(). */
do_query_ieeeblock(). */
/* Result from do_query_numbers(). */
For Windows 2000 or XP, use the Event
Programming Examples
/* Result from
39
1179

Advertisement

Table of Contents
loading

Table of Contents