Check_Err Vi, Ret - Agilent Technologies B1500A User Manual

Semiconductor device analyzer
Hide thumbs Also See for B1500A:
Table of Contents

Advertisement

/* Starting the session */
ret = agb1500_init("GPIB0::17::INSTR", VI_TRUE, VI_TRUE, &vi);
if ( ( ret < VI_SUCCESS ) || ( vi == VI_NULL ) ) {
printf("Initialization failure.\n Status code: %d.\n", ret);
if ( vi != VI_NULL ) {
agb1500_error_message(vi, ret, err_msg);
printf("Error: %ld\n %s\n", ret, err_msg);
}
exit (ret);
}
ret = agb1500_reset(vi);
ret = agb1500_timeOut(vi, 60000);
ret = agb1500_errorQueryDetect(vi, VI_TRUE);
perform_meas(vi, ret);
/* ret = agb1500_cmd(vi, "aa");
/* check_err(vi, ret);
/* Closing the session
ret = agb1500_close(vi);
check_err(vi, ret);
return VI_SUCCESS;
}
Line
33
Establishes the software connection with the Agilent B1500.
The above example is for the Agilent B1500 on the GPIB address 17.
Confirm the GPIB address of your B1500, and set the address correctly instead of "17".
34 to 41
Checks the status returned by the agb1500_init function. Displays the error message
and stops the program execution if an error status is returned.
43 to 45
Resets the Agilent B1500, sets the driver I/O time out to 60 seconds, and enables the
automatic instrument error checking.
47
Calls the perform_meas subprogram (line 22).
48 to 49
Should be deleted or commented out before executing the program. The lines are just
used to check the operation of the check_err subprogram.
52
Disables the software connection with the Agilent B1500.
53
Calls the check_err subprogram to check if an error status is returned for the line 52.
55 to 56
End of the main program.
Agilent B1500 VXIplug&play Driver User's Guide, Edition 3
Programming Examples for C++ Users
/* resets B1500
/* sets 60 second timeout
/* turns on error detection
/* calls perform_meas subprogram
sends an invalid command
checks check_err subprogram operation
Description
Programming Basics
/* 33 */
/* 41 */
43 */
*/
*/
47 */
*/
*/
52 */
/* 55 */
4-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents