Last Updated: August 29, 2007
This topic provides an example of how to make a Dynamic Power measurement.
For more information on the conventions used in the programming examples click here.
Ensure that the wireless device is connected to the test set, and in a suitable test mode. In addition, the wireless device must provide a suitable trigger. The measurement interval needs to be set shorter than the step length and the trigger delay must be set appropriately for your wireless device to avoid transients caused by power steps.
Set up the dynamic power measurement parameters as needed using the SETup:DPOWer commands.
Use the INITiate:DPOWer[:ON] command to start the measurement.
Use the INITiate:DPOWer:ARMed? query to determine if the measurement is armed and ready to be triggered.
Use the FETCH:DPOWer? commands to obtain the measurement results.
This programming example can be used on the GPIB, LAN and USB interfaces by using the correct VISA Address. For more information on VISA Addresses refer to Step 2. Open the test set connection using the IO library.
Option Explicit On
Option Strict On
Imports Ivi.Visa.Interop
Module modDynamicPower
Public Sub DynamicPower()
' This programming example assumes the wireless device is connected to the test set,
' and in a suitable test mode. In addition, the wireless device must provide a
' suitable trigger. The measurement interval needs to be set shorter than the step
' length and the trigger delay must be set appropriately for your wireless device
' to avoid transients caused by power steps.
Dim ResManager As New ResourceManager
Dim TestSet As New FormattedIO488
Dim InitiateDpowerArmed as String
Dim FetchDpowerSpower As Array
Try
' Open the connection to the test set
TestSet.IO = CType(ResManager.Open("GPIB0::14::INSTR"), IMessage)
' Clear the interface buffer.
TestSet.IO.Clear()
Console.WriteLine(ControlChars.NewLine & "Measuring Dynamic Power...")
'***Set up measurement parameters***
' Set Dynamic Power trigger arm to single.
TestSet.WriteString("SETup:DPOWer:CONTinuous OFF")
' Set VISA timeout to 10 seconds. This timeout should be longer than the
' following measurement timeout value.
TestSet.IO.Timeout = 10000
' Set Dynamic Power timeout to 5 seconds.
TestSet.WriteString("SETup:DPOWer:TIMeout 5S")
' Set filter to 300 kHz.
TestSet.WriteString("SETup:DPOWer:FILTer BWKHZ300")
' Set step length for 300 kHz filter to 15 ms.
TestSet.WriteString("SETup:DPOWer:SLENgth:BWKHZ300 0.0015")
' Set measurement interval for the currently selected filter to 0.58 ms.
TestSet.WriteString("SETup:DPOWer:INTerval:BWKHZ300 0.00058")
' Set trigger delay for 300 kHz filter to 50 us.
TestSet.WriteString("SETup:DPOWer:TRIGger:DELay:BWKHZ300 50uS")
' Set number of steps for 300 kHz filter to 40.
TestSet.WriteString("SETup:DPOWer:STEPs:BWKHZ300 40")
'***INITiate and FETCh measurements***
' Initiate a dynamic power measurement.
TestSet.WriteString("INITiate:DPOWer")
' Query if the dynamic power measurement is armed.
TestSet.WriteString("INITiate:DPOWer:ARMed?")
InitiateDpowerArmed = TestSet.ReadString()
' Query the integrity indicator, number of steps measured, and the step power result
' in dBm for each step.
TestSet.WriteString("FETCh:DPOWer:SPOWer?")
FetchDpowerSpower = CType(TestSet.ReadList(), Array)
'***Print measurement results***
Console.WriteLine(ControlChars.NewLine & "Dynamic Power Results:")
Console.WriteLine("Integrity Indicator = " & CStr(FetchDpowerSpower.GetValue(0)))
Console.WriteLine("Step Count = " & CStr(FetchDpowerSpower.GetValue(1)))
Console.WriteLine("Individual Power Results for Each Step (dBm) = ")
Dim I As Integer
For I = 2 To 41
Console.WriteLine("Step " & CStr(I - 1) & ": " & CStr(FetchDpowerSpower.GetValue(I)))
Next I
Console.WriteLine(ControlChars.NewLine & "Dynamic Power Test Complete.")
Catch ex As Exception
MessageBox.Show("The following error occurred in Dynamic Power" & ControlChars.CrLf & ex.Message, "Program Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
'***Post test clean up***
' Turn Dynamic Power off.
TestSet.WriteString("INITiate:DPOWer:OFF")
' Close IO interface to test set.
TestSet.IO.Close()
End Sub
End Module