Data Methods
These methods are used for capturing, saving, and graphing measurement data.
Public Sub GTraceData (tracetype As enumTraceType, Traces As Integer, Points As Integer, TraceData() As Single)
Description: This method is associated with the calibration that was previously performed. If a bandwidth and reflection calibration has been performed then both the bandwidth measurement and the reflection measurement will be returned in a multidimensional array. The reflection measurement will be returning in the following manner.
COMPLEX_TYPE • Reflection
• TraceData(2,0 to Points - 1) contain all the real data points • TraceData(3,0 to Points - 1) contain all the imaginary data points
Formatted Types(LOGMAG_TYPE, PHASE_TYPE, DELAY_TYPE) • Bandwidth or Reflection
• TraceData(0, 0 to Points - 1) contain all the data points • TraceData(1, 0 to Points - 1) contain all 0s
The bandwidth portion of the measurement will be returned in array index 0 - 1.
Public Function SaveTraceText(strFilename As String, tracetype As enumTraceType) As Integer
Description: Saves the active trace from the 8510 into a text file.
strFilename: Absolute path where the file will be saved. For example: StrFilename: “D:\LCA50GHz\Data\filename.xls”
Data Methods
Tracetype: Selects the trace type (COMPLEX_TYPE, LOGMAG_TYPE, PHASE_TYPE, DELAY_TYPE)
N O T E If a bandwidth and reflection calibration was the last calibration performed, the software assumes that both measurements are of interest. This method will append a “_BW” or “_RF” to the filename. Both files will appear in the D:\LCA50GHZ\Data directory as the following:
File1 = filename1_BW.xls File2 = filename2_RF.xls
Public Function SaveTraceExcel(strFilename As String, tracetype As enumTraceType)As Integer
Description: Saves the active trace from the 8510 into an excel file.
strFilename: Absolute path where the file will be saved. For example: StrFilename: “D:\LCA50GHz\Data\filename.xls”
Tracetype: Selects the trace type (COMPLEX_TYPE, LOGMAG_TYPE, PHASE_TYPE, DELAY_TYPE)
Public Function ExcelGraph(filenameExcel As String, tracetype As enumTraceType) As Integer Syn
Description: Creates graph within existing excel file. This excel file must have already been saved using the method call SaveTraceExcel.
filenameExcel: Absolute path where the file will be saved. For example: filenameExcel: “D:\LCA50GHz\Data\filename.xls”
Tracetype: Selects the trace type (COMPLEX_TYPE, LOGMAG_TYPE, PHASE_TYPE, DELAY_TYPE)
N O T E If a bandwidth and reflection calibration was the last calibration performed, the software assumes that both measurements are of interest. This method will append a “_BW” or “_RF” to the filename. Both files will appear in the D:\LCA50GHZ\Data directory as the following:
Data Methods
Public Function gResponse(arResponse() As Single, intmeas As Integer) As Integer
Description: This function returns an array through arResponse() containing the real and imaginary data for each point of measurement. An array dimensioned as arResponse (1 to 2 * Number of Points) as single should be passed to it. The data points are returned in arResponse(). The format for arResponse is odd indexes 1,3,5...contains real and even indexes 2,4,6...contain imaginary arResponse(1) and arResponse(2) make up a single data point.
intMeas: tells what type of measurement was performed either BANDWIDTH, REFLECTION, or BW_N_REFL.
Public Function gResponseLogMag(arResponse() As Single, intmeas As Integer) As Integer
Description: This function returns the Log Magnitude of the response displayed on the 8510. Only odd indexes of arResponse are of interest. All even indexes are 0. This function forces the 8510 into displaying Log Magnitude.
intMeas: is the type of measurement of interest.
Public Function gResponsePhase(arResponse() As Single, intmeas As Integer) As Integer
Description: This function returns the Phase of the response displayed on the 8510. Only odd indexes of arResponse are of interest. All even indexes are 0. This func- tion forces the 8510 into displaying phase.
intMeas: is the type of measurement of interest.
Public Function gResponseDelay(arResponse() As Single, intmeas As Integer) As Integer
Description: This function returns the Delay of the response displayed on the 8510. Only odd indexes of arResponse are of interest. All even indexes are 0. This func- tion forces the 8510 into displaying delay.
Data Methods
Public Function gCalibrationData(Sets As Integer, Points As Integer, CalibrationData() As Single) As Integer
Description: This method returns the calibration array of the 8510. The contents are the calibration correction coefficients calculated during the last calibration. A valid calibration must have been performed before calling this method.
Return Types: CalibrationData(): multidimensional array of single. The dimension of the array is dependent on the type of calibration performed. If a response and iso- lation calibration was performed then the array will return both the response and isolation portions of the calibration. The returned array will be as follows. • CalibrationData(0, 0 to Points - 1) = Real portion of isolation coefficients. • CalibrationData(1, 0 to Points - 1) = Imaginary portion of isolation coeffi-
cients.
• CalibrationData(2, 0 to Points - 1) = Real portion of response coefficients. • CalibrationData(3, 0 to Points - 1) = Imaginary portion of response coeffi-
cients.
If only a response calibration was performed then CalibrationData() will be as follows.
• CalibrationData(0, 0 to Points - 1) = Real portion of response coefficients. • CalibrationData(1, 0 to Points - 1) = Imaginary portion of response coeffi-
cients.
Sets: This is an integer value specifying the dimension of the returned array. This value is a 1 for response calibrations, and a 2 for response and isolation cali- brations.
Data Methods
Points: This is an integer value specifying the number of points for the returned cali- bration. This value is 0 if no valid calibration was available.
This function returns a 0 for success and a -1 for failure.
If a bandwidth and reflection calibration has been performed and both coeffi- cients are desired. The methods sBandwidth and sReflection must be used to switch the system into the corresponding measurement mode and then to make the call to gCalibrationData.
For example:
Server.sBandwidth ‘Puts system into bandwidth mode Server.gCalibrationData(...) ‘Gets the calibration