Download Agilent Technologies Ininiium 9000 Technical data
Transcript
38 Sample Programs
* -----------------------------------------------------------------* This program illustrates a few commonly-used programming
* features of your Agilent Infiniium Series oscilloscope.
*/
#include
#include
#include
#include
<stdio.h>
<string.h>
<time.h>
<visa.h>
/*
/*
/*
/*
For printf(). */
For strcpy(), strcat(). */
For clock(). */
Agilent VISA routines. */
#define VISA_ADDRESS "TCPIP0::130.29.71.191::inst0::INSTR"
#define IEEEBLOCK_SPACE 5000000
/* Function prototypes */
void initialize(void);
void capture(void);
void analyze(void);
/* Initialize to known state. */
/* Capture the waveform. */
/* Analyze the captured waveform. */
void do_command(char *command);
/* Send command. */
int do_command_ieeeblock(char *command); /* Command w/IEEE block. */
void do_query_string(char *query);
/* Query for string. */
void do_query_number(char *query);
/* Query for number. */
void do_query_numbers(char *query);
/* Query for numbers. */
int do_query_ieeeblock(char *query);
/* Query for IEEE byte block. */
int do_query_ieeeblock_words(char *query);
/* Query for word block. */
void check_instrument_errors();
/* Check for inst errors. */
void error_handler();
/* VISA error handler. */
/* Global variables */
ViSession defaultRM, vi;
/* Device session ID. */
ViStatus err;
/* VISA function return value. */
char str_result[256] = {0};
/* Result from do_query_string(). */
double num_result;
/* Result from do_query_number(). */
unsigned char ieeeblock_data[IEEEBLOCK_SPACE];
/* Result from
do_query_ieeeblock(). */
signed short ieeeblock_data_words[IEEEBLOCK_SPACE];
/* Result from
do_query_ieeeblock_words(). */
double dbl_results[10];
/* Result from do_query_numbers(). */
/* Main Program
* --------------------------------------------------------------- */
void main(void)
{
/* Open the default resource manager session. */
err = viOpenDefaultRM(&defaultRM);
if (err != VI_SUCCESS) error_handler();
/* Open the session using the oscilloscope's VISA address. */
err = viOpen(defaultRM, VISA_ADDRESS, VI_NULL, VI_NULL, &vi);
if (err != VI_SUCCESS) error_handler();
/* Set the I/O timeout to fifteen seconds. */
err = viSetAttribute(vi, VI_ATTR_TMO_VALUE, 15000);
if (err != VI_SUCCESS) error_handler();
/* Clear the interface. */
err = viClear(vi);
1214
Agilent Infiniium 9000 Series Oscilloscopes Programmer's Reference
Related documents
Agilent Technologies Ininiium 90000 Technical data
Agilent Technologies 86100A Technical data
Agilent Technologies 2000 X-Series Technical data
(Agilent) 83495A Optical/electrical clock recovery
VDO MS 2000X - Technical data
NCPlot™ v2.21 User Manual
NCPlot™ v2.26 User Manual
Agilent Technologies InfiniiVision 3000 DSO-X 3054A Technical data
Ditec CROSS18-19 Automazioni per cancelli scorrevoli
Here - FTP Directory Listing