Agilent Technologies E5071C Manual page 955

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

E5071C
ECal
Overview
Sample Program in Excel VBA
Sample Program in HT Basic
Other topics about Sample Programs
Overview
The sample program performs 1-port or 2-port calibration using ECal.
See Calibration for this programming.
Sample Program in Excel VBA
Sub ECal_Click()
Dim defrm As Long
Dim vi As Long
Dim Ch As String
Dim CalKit As Integer
Dim Port(4) As String
Const TimeOutTime = 40000 'timeout time.
Ch = Cells(5, 5)
Port(1) = Cells(3, 6)
Port(2) = Cells(3, 7)
Port(3) = Cells(3, 8)
Port(4) = Cells(3, 9)
Call viOpenDefaultRM(defrm)
Call viOpen(defrm, "GPIB0::17::INSTR", 0, 0, vi)
Call viSetAttribute(vi, VI_ATTR_TMO_VALUE, TimeOutTime) 'The state of an attribute for the
specified session.
Call viVPrintf(vi, "*RST" & vbLf, 0) 'Presets the setting state of the ENA.
Call viVPrintf(vi, "*CLS" & vbLf, 0) 'Clears the all status register.
Select Case Cells(3, 5)
Case "1 Port"
Call ECal(vi, Ch, 1, Port) 'Perform 1-port calibration.
Case "2 Port"
Call ECal(vi, Ch, 2, Port) 'Perform full 2-port calibration.
1182
'Session to Default Resource Manager
'Session to instrument
'Select channel
'Sets the select port 1.
'Sets the select port 2.
'Sets the select port 3.
'Sets the select port 4.
'Initializes the VISA system.
'Opens the session to the specified instrument.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents