Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1138

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

Advertisement

39
Programming Examples
{
}
/* Query for a string result.
* --------------------------------------------------------------- */
void do_query_string(query)
char *query;
{
}
/* Query for a number result.
* --------------------------------------------------------------- */
void do_query_number(query)
char *query;
{
}
/* Query for numbers result.
* --------------------------------------------------------------- */
1138
char message[80];
int data_length;
strcpy(message, command);
strcat(message, " #8%08d");
err = viPrintf(vi, message, num_bytes);
if (err != VI_SUCCESS) error_handler();
err = viBufWrite(vi, ieeeblock_data, num_bytes, &data_length);
if (err != VI_SUCCESS) error_handler();
check_instrument_errors();
return(data_length);
char message[80];
strcpy(message, query);
strcat(message, "\n");
err = viPrintf(vi, message);
if (err != VI_SUCCESS) error_handler();
err = viScanf(vi, "%t", str_result);
if (err != VI_SUCCESS) error_handler();
check_instrument_errors();
char message[80];
strcpy(message, query);
strcat(message, "\n");
err = viPrintf(vi, message);
if (err != VI_SUCCESS) error_handler();
err = viScanf(vi, "%lf", &num_result);
if (err != VI_SUCCESS) error_handler();
check_instrument_errors();
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents