EasyManua.ls Logo

Agilent Technologies 4156C User Manual

Agilent Technologies 4156C
312 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 #93 background imageLoading...
Page #93 background image
Agilent 4155C/4156C VXIplug&play Driver Users Guide, Edition 4 3-5
Programming Examples for Visual Basic Users
Programming Basics
’Closing the session ********************************************
ret = hp4156b_close(vi) ’30
check_err vi, ret
msg = "Click OK to stop the program."
MsgBox msg, vbOKOnly, ""
End Sub
’---------------------------------------------------------------- 36
Sub perform_meas(vi As Long, ret As Long)
’insert program code
End Sub
’---------------------------------------------------------------- 41
Sub check_err(vi As Long, ret As Long)
Dim inst_err As Long
Dim err_message As String * 250
Dim msg As String
Dim retStatus As Long
If VI_SUCCESS > ret Then
If (hp4156b_INSTR_ERROR_DETECTED = ret) Then
retStatus = hp4156b_error_query(vi, inst_err, err_message)
msg = "Instrument Error: " & inst_err & Chr(10) & Chr(10) & err_message
MsgBox msg, vbOKOnly, ""
Else
retStatus = hp4156b_error_message(vi, ret, err_message)
msg = "Driver Error: " & ret & Chr(10) & Chr(10) & err_message
MsgBox msg, vbOKOnly, ""
End If
End If
End Sub
Line Description
30 Disables the software connection with the Agilent 4155/4156.
31 Calls the check_err subprogram to check if an error status is returned for the line 30.
32 to 33 Opens a message box to confirm end of program.
35 End of the Main subprogram.
38 to 40 This is just the declaration of the perform_meas subprogram. Complete the subprogram
that controls the 4155/4156, performs measurement, and displays/saves the results.
41 to last Checks if the passed “ret” value indicates normal status, and returns to the line that
called this subprogram. If the value indicates an instrument error status or a device error
status, a message box will be displayed to show the error message.

Table of Contents

Other manuals for Agilent Technologies 4156C

Question and Answer IconNeed help?

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

Agilent Technologies 4156C Specifications

General IconGeneral
BrandAgilent Technologies
Model4156C
CategoryMeasuring Instruments
LanguageEnglish

Summary

1 Installation

System Requirements

Specifies the necessary software and hardware environments for using the VXIplug&play driver.

Installing VXIplug&play Driver

Provides step-by-step instructions for installing the VXIplug&play driver for the instruments.

2 Driver Function Reference

4155/4156 Driver Functions

Details the functions available for controlling the Agilent 4155/4156 VXIplug&play driver.

E5250A Driver Functions

Details the functions available for controlling the Agilent E5250A VXIplug&play driver.

6 Programming Examples for VEE Users

Registrating the Driver on Agilent VEE

Details the process of registering the VXIplug&play driver within the Agilent VEE environment.

Related product manuals