Last Updated: August 29, 2007
This step involves making measurements on the wireless device. Refer to the following sections for more details:
For more information on the conventions used in the programming examples click here.
Refer to the following sections for more details:
The recommended measurement process when making measurements remotely, is to INITiate a measurement or measurement suite, and then FETCh its results, before INITiating and FETChing the next measurement or measurement suite. Using this process ensures the most efficient use of your program execution and the test set's resources.
Validating measurement results is extremely important. The test set returns a result if it is capable of making a measurement, even if this result is obtained under adverse conditions.
The measurement integrity indicator is a measurement result and therefore is queried using the FETCh subsystem. The majority of the test set's FETCh commands return an integrity indicator as the first result returned. A value of 0 indicates that the measurement is valid. A value other than 0 indicates that an error occurred during the measurement process.
Example Integrity Indicators
|
Value Returned |
Description (which also appears on the status bar in the results window) |
|
0 |
Normal |
|
1 |
No Result Available |
|
2 |
Measurement Timeout |
|
5 |
Over Range |
|
6 |
Under Range |
In a typical control program, measurements are repeated on various frequencies and power levels. Therefore, it is desirable to have a subprogram capable of initiating and fetching multiple measurement results. The example code in the following section demonstrates how you might create a subprogram for initiating and fetching the measurement results.
The following examples, based on the GSM/GPRS/EGPRS Cal Application, are provided:
Dim FetchRfchannelCpower As Array
Dim RFChannelIntegrity As Integer
' Query the channel power.
TestSet.WriteString("FETCh:RFCHannel:CPOWer?")
FetchRfchannelCpower = CType(TestSet.ReadList(), Array)
RFChannelIntegrity = CInt(FetchRfchannelCpower.GetValue(0))
If RFChannelIntegrity = 0 Then ' If integrity value is normal, print the valid measurement results.
Console.WriteLine("Average Channel Power (dBm) = " & CStr(FetchRfchannelCpower.GetValue(1)))
Console.WriteLine("Peak Channel Power (dBm) = " & CStr(FetchRfchannelCpower.GetValue(2)))
Else ' If integrity result is any value other than 0, report an error and print the returned integrity value.
Console.WriteLine("Channel Power Measurement Error")
Console.WriteLine("RF Channel Suite Integrity Indicator = " & CStr(FetchRfchannelCpower.GetValue(0)))
End If
Public Sub InitiateAndFetchResults()
Dim FetchPmodulationTrace As Array
Dim FetchPmodulationPferror As Array
Dim FetchPmodulationTxpower As Array
Dim FetchOrfspectrumModulation As Array
Dim FetchOrfspectrumSwitching As Array
Dim FetchRfchannelCpower As Array
Dim FetchRfchannelFerror As Array
Dim TransceiverBandGcalibration As String
Dim TransceiverChannel As Int32
Try
' Initiate the Power and Modulation Quality measurement suite. The measurements specified
' previously using the SETup:PMODulation:INITiate command are all activated.
TestSet.WriteString("INITiate:PMODulation")
' Query the power versus time trace results.
TestSet.WriteString("FETCh:PMODulation:PVTime:TRACe?")
FetchPmodulationTrace = CType(TestSet.ReadList(), Array)
' Query the Phase and Frequency Error measurement results.
TestSet.WriteString("FETCh:PMODulation:PFERror?")
FetchPmodulationPferror = CType(TestSet.ReadList(), Array)
' Query the average transmit power result.
TestSet.WriteString("FETCh:PMODulation:TXPower?")
FetchPmodulationTxpower = CType(TestSet.ReadList(), Array)
' Initiate the Output RF Spectrum measurement suite. The measurements specified
' previously using the SETup:ORFSpectrum:INITiate command are all activated.
TestSet.WriteString("INITiate:ORFSpectrum")
' Query the ORFS measurement suite integrity, ORFS Modulation pass/fail result,
' 30 kHz reference power, ORFS Modulation number of fetch points,
' and up to 22 ORFS Modulation (average) results.
TestSet.WriteString("FETCh:ORFSpectrum:MODulation?")
FetchOrfspectrumModulation = CType(TestSet.ReadList(), Array)
' Query the ORFS measurement suite integrity, ORFS Switching pass/fail result,
' ORFS Switching number of fetch points, and up to 8 ORFS Switching (maximum) results.
TestSet.WriteString("FETCh:ORFSpectrum:SWITching?")
FetchOrfspectrumSwitching = CType(TestSet.ReadList(), Array)
' Initiate the RF Channel measurement suite. The measurements specified previously using
' the SETup:RFCHannel:INITiate command are activated.
TestSet.WriteString("INITiate:RFCHannel")
' Query the channel power.
TestSet.WriteString("FETCh:RFCHannel:CPOWer?")
FetchRfchannelCpower = CType(TestSet.ReadList(), Array)
' Query the frequency error.
TestSet.WriteString("FETCh:RFCHannel:FERRor?")
FetchRfchannelFerror = CType(TestSet.ReadList(), Array)
' Query the currently set band.
TestSet.WriteString("TRANsceiver:BAND:GCALibration?")
TransceiverBandGcalibration = TestSet.ReadString()
' Query the currently set ARFCN.
TestSet.WriteString("TRANsceiver:CHANnel?")
TransceiverChannel = CType(TestSet.ReadNumber(), Int32)
'***Print measurement results***
Console.WriteLine(ControlChars.NewLine & "Measured Results for:")
Console.Write("Band " & TransceiverBandGcalibration)
Console.WriteLine("ARFCN " & TransceiverChannel)
Console.WriteLine(ControlChars.NewLine & "Power and Modulation Quality Measurement Suite")
Console.WriteLine("----------------------------------------------")
Console.WriteLine(ControlChars.NewLine & "Power and Modulation Quality Suite Integrity Indicator = " & CStr(FetchPmodulationTrace.GetValue(0)))
Console.WriteLine(ControlChars.NewLine & "Power versus Time Results:")
Console.WriteLine("Number of Points Measured = " & CStr(FetchPmodulationTrace.GetValue(1)))
Console.WriteLine("Absolute reference power (dBm) = " & CStr(FetchPmodulationTrace.GetValue(4)))
Console.WriteLine("Trace power values (dBm) = " & CStr(FetchPmodulationTrace.GetValue(5)))
Console.WriteLine(ControlChars.NewLine & "Phase and Frequency Error Results:")
Console.WriteLine("Maximum RMS Phase Error (deg) = " & CStr(FetchPmodulationPferror.GetValue(1)))
Console.WriteLine("Maximum Peak Phase Error (deg) = " & CStr(FetchPmodulationPferror.GetValue(2)))
Console.WriteLine("Worst Frequency Error (kHz) = " & CStr(FetchPmodulationPferror.GetValue(3)))
Console.WriteLine(ControlChars.NewLine & "Transmit Power Results:")
Console.WriteLine("Average Transmit Power (dBm) = " & CStr(FetchPmodulationTxpower.GetValue(1)))
Console.WriteLine(ControlChars.NewLine & "Power and Modulation Quality measurement suite complete." & ControlChars.NewLine)
Console.WriteLine("Output RF Spectrum Measurement Suite")
Console.WriteLine("------------------------------------")
Console.WriteLine(ControlChars.NewLine & "Output RF Spectrum Suite Integrity Indicator = " & CStr(FetchOrfspectrumModulation.GetValue(0)))
Console.WriteLine(ControlChars.NewLine & "ORFS Modulation Results:")
Console.WriteLine("ORFS Modulation Pass/Fail result (0=Pass/1=Fail) = " & CStr(FetchOrfspectrumModulation.GetValue(1)))
Console.WriteLine("30 KHz Reference Power = " & CStr(FetchOrfspectrumModulation.GetValue(2)))
Console.WriteLine("ORFS Modulation Number of Fetch Points = " & CStr(FetchOrfspectrumModulation.GetValue(3)))
Console.WriteLine("ORFS Modulation 200 kHz Offset Frequency Average Power = " & CStr(FetchOrfspectrumModulation.GetValue(4)))
Console.WriteLine(ControlChars.NewLine & "ORFS Switching Results:")
Console.WriteLine("ORFS Switching Pass/Fail result (0=Pass/1=Fail) = " & CStr(FetchOrfspectrumSwitching.GetValue(1)))
Console.WriteLine("ORFS Switching Number of Fetch Points = " & CStr(FetchOrfspectrumSwitching.GetValue(2)))
Console.WriteLine("ORFS Switching 200 kHz and 400 kHz Offset Frequency Maximum Power = " & CStr(FetchOrfspectrumSwitching.GetValue(3)))
Console.WriteLine(ControlChars.NewLine & "Output RF Spectrum measurement suite complete." & ControlChars.NewLine)
Console.WriteLine("RF Channel Measurement Suite")
Console.WriteLine("----------------------------")
Console.WriteLine(ControlChars.NewLine & "RF Channel Suite Integrity Indicator = " & CStr(FetchRfchannelFerror.GetValue(0)))
Console.WriteLine(ControlChars.NewLine & "Channel Power Results:")
Console.WriteLine("Average Channel Power (dBm) = " & CStr(FetchRfchannelCpower.GetValue(1)))
Console.WriteLine("Peak Channel Power (dBm) = " & CStr(FetchRfchannelCpower.GetValue(2)))
Console.WriteLine(ControlChars.NewLine & "Frequency Error Results:")
Console.WriteLine("Frequency Error (Hz) = " & CStr(FetchRfchannelFerror.GetValue(1)))
Console.WriteLine(ControlChars.NewLine & "RF Channel measurement suite complete." & ControlChars.NewLine)
Catch ex As Exception
MessageBox.Show("The following error occurred in the Control Program" & ControlChars.CrLf & ex.Message, "Program Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Go to Step 10. Re-configure the test set and wireless device connection parameters