Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1111

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
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);
int do_query_ieeeblock_words(char *query);
void check_instrument_errors();
/* Global variables */
INST id;
char str_result[256] = {0};
double num_result;
unsigned char ieeeblock_data[IEEEBLOCK_SPACE];
signed short ieeeblock_data_words[IEEEBLOCK_SPACE];
double dbl_results[10];
/* Main Program
* --------------------------------------------------------------- */
void main(void)
{
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
/* 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");
}
/* For printf(). */
/* For strcpy(), strcat(). */
/* For clock(). */
/* Agilent SICL routines. */
"lan[130.29.71.191]:inst0"
15000
500000
/* 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. */
/* Query for word data. */
/* Check for inst errors. */
/* Device session ID. */
/* Result from do_query_string(). */
/* Result from do_query_number(). */
do_query_ieeeblock(). */
do_query_ieeeblock_words(). */
/* Result from do_query_numbers(). */
For Windows 2000 or XP, use the Event
Sample Programs
/* Result from
/* Result from
38
1111

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents