EasyManuals Logo

Agilent Technologies 8719ET Programmer's Guide

Agilent Technologies 8719ET
541 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #378 background imageLoading...
Page #378 background image
Chapter 7 7-15
Programming Examples
Measurement Setup Examples
ViSession vi;
ViStatuserr_status;
ViChar err_message[256];
/* Note that this function can verify that the instrument specified is an */
/* hp875x (id_query=VI_TRUE) and can send a reset to the instrument */
/* (do_reset=VI_TRUE). */
err_status = hp875x_init(Nwa, id_query, do_reset, &vi);
if (( err_status < VI_SUCCESS ) || ( vi == VI_NULL ))
{
printf(“\ninit failed with return code %d\n”, err_status);
if ( vi != VI_NULL )
{
hp875x_error_message(vi,err_status,err_message);
printf(“ Error Status: %d\n”, err_status);
printf(“ Error Message: %s\n”, err_message);
}
exit (err_status);
}
*vi_ptr = vi;
return(VI_SUCCESS);
}
ViStatus checkErr (ViSession vi, ViStatus err_status)
{
ViInt32 inst_err;
ViChar err_message[256];
if(VI_SUCCESS > err_status)
{
/* Send a device clear to ensure communication with */
/* the instrument. */
hp875x_dcl(vi);
/* If the driver is set to detect instrument errors, and */
/* an instrument error is detected, the error code is */
/* hp875x_INSTR_ERROR_DETECTED (see 875x_cpp.h). In this */
/* case, query the instrument for the error and display */
/* it. Otherwise, the error is a driver error. Query the */
/* driver for the error and display it. */
if(hp875x_INSTR_ERROR_DETECTED == err_status)
{
hp875x_error_query(vi, &inst_err, err_message);
printf(“Instrument Error : %ld, %s\n”, inst_err, err_message);
}
else
{
hp875x_error_message(vi, err_status, err_message);
printf(“Driver Error : %ld, %s\n”, err_status, err_message);

Table of Contents

Other manuals for Agilent Technologies 8719ET

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8719ET and is the answer not in the manual?

Agilent Technologies 8719ET Specifications

General IconGeneral
BrandAgilent Technologies
Model8719ET
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals