Agilent Technologies E5071C Manual page 971

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

E5071C
Dim SelMode As String
Dim Result As String * 10000
Dim RealData As Double
Dim ImagData As Double
Dim FreqData As Double
ReDim Error_Term_Data(Nop * 2) As String
as needed for NOP.
ReDim Freq_Data(Nop) As String
SelMode = Cells(3, 6) 'Reads the read/write mode.
Select Case SelMode
Case "Read"
Call viVPrintf(vi, ":SENS" & Ch & ":CORR:COEF? " & ErrTerm & "," & Respons & "," & Stimulus &
vbLf, 0) 'Read the calibration coefficient data.
Call viVScanf(vi, "%t", Result)
Error_Term_Data = Split(Result, ",") 'Splits the read data by comma.
Freq_Data = Make_Freq(vi, Nop)
For i = 0 To Nop - 1
RealData = CDbl(Error_Term_Data(i * 2))
ImagData = CDbl(Error_Term_Data(i * 2 + 1)) 'Reads the imag data from error coefficient
items.
FreqData = CDbl(Freq_Data(i + 1))
Cells(10 + i, 2) = RealData
Cells(10 + i, 3) = ImagData
Cells(10 + i, 1) = FreqData
Next i
Call Data_Plot(vi, Nop, ErrTerm)
Case "Write"
'Write the error coefficient to the ena.
Error_Term_Data = ErrTerm & "," & Respons & "," & Stimulus
For i = 0 To Nop - 1
RealData = Cells(10 + i, 2)
ImagData = Cells(10 + i, 3)
1198
'Defines the stock variables for the error coefficient
'Defines the stock variables for the frequency values.
'Reads the error coefficient from the ena.
'Calculates the frequency values.
'Reads the real data from error coefficient items.
'Reads the frequency values.
'Displays the real data to the excel sheet.
'Displays the imag data to the excel sheet.
'Displays the frequency values to the excel sheet.
'Displays the graph to the excel sheet.
'Retrieves the real data from the excel sheet.
'Retrieves the imag data from the excel sheet.
'Sets the command parameter.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents