The Complex Test program demonstrates how to create a signal using several pattern item types. The pattern, from which the signal is derived uses different pulse types and different patterns. The Complex Test program generates a signal consisting of several different patterns.
The pattern definitions used for his example are taken from the Frequency Agile and Sensitivity program examples. This program example creates the signal generated in the Complex Test shown in the Examples section of this Help document and uses the same parameters. Review this example for a description and details on the settings and parameters used to generate the signal. The Complex Test program will:
Creates the three pulses used in the Frequency Agile Example
Creates the two Barker code modulated pulses from the Sensitivity Example
Uses the Frequency Agile pattern as a pattern item
Uses the Sensitivity pattern as a pattern item
Each of the forms that make up this program example is discussed in the following sections:
Details on procedures and declarations include:
The Pulse Building form is the first form displayed when the program is run. The Connect command buttons on this form use the Signal Generator Connection and Spectrum Analyzer Connection forms to set up the signal generator and analyzer I/O interface. In addition to the I/O configuration command buttons, the Pulse Building form has a Download and Play command button that will generate a waveform, download the waveform, marker, and sequence files to the signal generator, and play the corrected waveform.
There are two check boxes on the form: Apply Corrections and Save File. A check mark in the Apply Corrections check box indicates that corrections are applied to the signal. The corrections used are RF Flatness and Image Rejection. You must have a spectrum or signal analyzer connected to the signal generator if you want to use corrections. A check mark in the Save File check box will save the .pbp file in the directory where the Menu Driven Test program is run. This .pbp file consists of the Pulse and Pattern Library items along with all associated parameters.
The Complex Test example uses file input to read data from text files. Select the Microsoft Scripting Runtime library from the Available References in your Visual Basic project. You must reference this library.
The following code listing is from the Pulse Building form's General section. Descriptions follow the code lines.
Option Explicit ' It is advised that Option Explicit be used to prevent spelling and declaration errors in the program.
Dim project As AgtPBProject ' Declare an object, project, as type AgtPBProject. All the functionality available in the Pulse Building GUI is available in the AgtPBProject object.
Dim cw1 As AgtPBPulse ' Declare an object of type AgtPBPulse object with the name cw1. Each pulse must be declared as an AgtPBPulse type.
Dim cw2 As AgtPBPulse ' Declare an object of type AgtPBPulse object with the name cw2.
Dim cw3 As AgtPBPulse ' Declare an object of type AgtPBPulse object with the name cw3.
Dim BarkerA As AgtPBPulse ' Declare an object of type AgtPBPulse object with the name BarkerA. This pulse will have the Barker Code modulation
Dim BarkerB As AgtPBPulse ' Declare an object of type AgtPBPulse object with the name cw3. Second Barker Code modulated pulse
Dim ComplexPattern As AgtPBPattern ' Declare an object, ComplexPattern as type AgtPBPattern. Each pattern must be declared as an AgtPBPattern type.
Dim ComplexItem As AgtPBPatternItem ' Declare an object, ComplexItem, as type AgtPBPatternitem for the Complex pattern. Each pattern item must be declared as an AgtPBPatternItem type.
Dim AgilePattern As AgtPBPattern ' Declare an object, AgilePattern, as type AgtPBPattern.
Dim AgileItem As AgtPBPatternItem' Declare an object AgileItem, as type AgtPBPatternitem for the Agile pattern. Each pattern item must be declared as an AgtPBPatternItem type.
Dim DoubletPattern As AgtPBPattern' Declare an object, DoubletPattern as type AgtPBPattern.
Dim DoubletItem As AgtPBPatternItem' Declare an object DoubletItem, as type AgtPBPatternitem for the Doublet pattern. Each pattern item must be declared as an AgtPBPatternItem type.
Dim SensitivityPattern As AgtPBPattern' Declare an object, SensitivityPattern, as type AgtPBPattern.
Dim SensitivityItem As AgtPBPatternItem' Declare an object SensitivityItem, as type AgtPBPatternitem for the Sensitivity pattern. Each pattern item must be declared as an AgtPBPatternItem type.
Dim SpectrumAnalyzer As AgtPBSpectrumAnalyzer ' Declare an analyzer instrument object
Dim SignalGenerator As AgtPBSignalGenerator ' Declare a signal generator instrument object
Dim Settings As AgtPBSignalProperties ' Declare a signal generator properties object. Amplitude and frequency settings for a pattern item are set using the Settings object.
Dim IData() As Double ' Declare a dynamic array for I values
Dim QData() As Double' Declare a dynamic array for Q values
Dim customProfile() As Double' Declare a dynamic array for custom profile data
Dim dataType As String ' Declare a string variable used to designate data type; either I/Q or custom profile
Dim SGConnected As Boolean ' Used to verify signal generator IO connection
Dim SAConnected As Boolean ' Used to verify signal generator IO connection
The following code listing is from the Pulse Building form's Form_Load() event. Functions and code descriptions follow or precede the code statements.
Private Sub Form_Load()
On Error GoTo Error_Handler ' sets up an error trap to handle errors. If an error occurs in this procedure, the code execution 'jumps to the Error_Handler line label and a message describing the error is generated.
Set project = New AgtPBProject ' Creates a new project by instantiating an object of type AgtPBProject.
Exit Sub
Error_Handler:
MsgBox Err.Description
End Sub
The following code listing is from the Pulse Building form'scmdRun_Click() event. Comments describing functions follow or precede code statements.
Private Sub cmdRun_Click()
On Error GoTo ErrorHandler:
If Not SGConnected Then ' Check to see that the signal generator IO connection is valid
Call MsgBox("Connect Signal Generator", vbOKOnly)
frmMain.MousePointer = vbDefault
Exit Sub
End If
If Not SAConnected And chkCorrections.Value = 1 Then ' Check to see that the analyzer IO connection is valid
Call MsgBox("Connect Spectrum Analyzer", vbOKOnly)
frmMain.MousePointer = vbDefault
Exit Sub
End If
frmMain.MousePointer = vbHourglass ' Use the hourglass mouse pointer to indicate program activity
cmdRun.Enabled = False ' Disable the Download and Play button until this process has finished
Dim indexItem As Integer ' Counter variable
Dim powerScale As Integer ' Variable to indicate the power scale setting
project.NewProject ("Complex Test.pbp") ' Create a new .pbp project
Set cw1 = project.PulseLibrary.CreateNewPulse("CW1") ' Instanatiate a new pulse
cw1.PulseType = AgtPBPulseType_Trapezoidal ' Set the pulse type to Trapezoidal
' The next line of code sets the rise time of the pulse to 30 ns, the fall time to 30 ns, 100% to 100% to
' 940 ns, the width jitter type to none, and the jitter deviation to 0 seconds
Call cw1.SetEnvelopeTrapezoidal(0.00000003, 0.00000003, 0.00000094, AgtPBJitterType_None, 0)
cw1.ModulationType = AgtPBModulationType_None ' Set the modulation type to FM Chirp
dataType = "IQ" 'Variable to identify the IQ data text file
Call ReadDataASCIIFile(IData(), QData(), customProfile(), dataType) ' Read pulse data from a text file
Set cw2 = project.PulseLibrary.CreateNewPulse("CW2") 'Instantiate a new pulse
cw2.PulseType = AgtPBPulseType_CustomIQ 'Set the pulse type to CustomIQ
' Set the sampling rate to 100 MHz, and use the I and Q data from the text file as the pulse data
Call cw2.SetCustomIQ(100000000, IData(), QData())
cw2.ModulationType = AgtPBModulationType_None ' Set the modulation type to none
Set cw3 = project.PulseLibrary.CreateNewPulse("CW3") ' Create a new pulse called CW3
cw3.PulseType = AgtPBPulseType_CustomEnvelope 'Set the pulse type to custom profile
dataType = "Custom" 'Variable to identify the custom profile data text file
Call ReadDataASCIIFile(IData(), QData(), customProfile(), dataType) ' Read pulse data from a text file
' Set the sampling rate to 100 MHz, and use the customProfile data to create the CW3 Custom Profile Pulse
Call cw3.SetEnvelopeCustom(100000000, customProfile())
' Instantiate a Frequency Agile Pattern
Set AgilePattern = project.PatternLibrary.CreateNewPattern("Frequency Agile")
' Adding the trapezoidal pulse (CW1) as the first pattern item (0)
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW1", 0)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW1 to a 3 us repetition interval
AgileItem.NumberOfRepeats = 1 ' CW1 is repeated twice; the duration is 6 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW1
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' The item's signal generator RF power level is not changed
AgileItem.FrequencyOffsetHz = -10000000 ' The signal generator frequency is decreased by 10 MHz
AgileItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the custom I/Q pulse (CW2) as the second pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW2", 1)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW1 to a 3 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW2 1 time. The duration of this item with the repeats is 120 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' Set jitter type to gaussian
AgileItem.JitterDeviationSec = 0 ' Set the deviation to 100 ns
AgileItem.RelativePowerScaleDB = 0 ' The item's signal generator RF power level is not changed
AgileItem.FrequencyOffsetHz = 0 ' No frequency offset
AgileItem.PhaseOffsetRad = 0 ' No phase offset applied
' Adding the custom envelope pulse (CW3) as the third pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW3", 2)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW3 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = 10000000 ' The signal generator's frequency is increased 10 MHz
AgileItem.PhaseOffsetRad = 0 ' No phase offset applied
' Adding the trapezoidal pulse (CW1) as the 4th pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW1", 3)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW1 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = -10000000 ' -10 MHz frequency offset applied
AgileItem.PhaseOffsetRad = 1.047 ' 1.047 radians phase offset applied
' Adding the custom IQ pulse (CW2) as the 5th pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW2", 4)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW1 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = 0 ' No frequency offset applied
AgileItem.PhaseOffsetRad = 1.047 ' 1.047 radians phase offset applied
' Adding the custom envelope pulse (CW3) as the 6th pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW3", 5)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW1 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = 10000000 ' 10 MHz frequency offset applied
AgileItem.PhaseOffsetRad = 1.047 ' 1.047 radians phase offset applied
' Adding the trapezoidal pulse (CW1) as the 7th pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW1", 6)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW1 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = -10000000 ' -10 MHz frequency offset applied
AgileItem.PhaseOffsetRad = 2.093 ' 2.093 radians phase offset applied
' Adding the custom IQ pulse (CW2) as the 8th pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW2", 7)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW1 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = 0 ' No frequency offset applied
AgileItem.PhaseOffsetRad = 2.093 ' 2.093 radians phase offset applied
' Adding the custom envelope pulse (CW3) as the 9th pattern item
Set AgileItem = AgilePattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW3", 8)
' The following code statements set up the pattern item parameters
AgileItem.RepetitionIntervalSec = 0.00000333 'Set CW3 to a 10 us repetition interval
AgileItem.NumberOfRepeats = 1 ' Repeat CW1 1 time. The duration of this item with the repeats is 200 us
AgileItem.EdgeJitterType = AgtPBJitterType_None ' No jitter is applied to CW3
AgileItem.JitterDeviationSec = 0 ' No jitter applied so there is no jitter deviation
AgileItem.RelativePowerScaleDB = 0 ' No power scale offset
AgileItem.FrequencyOffsetHz = 10000000 ' 10 MHz frequency offset applied
AgileItem.PhaseOffsetRad = 2.093 ' 2.093 radians phase offset applied
' Instantiating a new pulse
Set BarkerA = project.PulseLibrary.CreateNewPulse("BarkerA")
BarkerA.PulseType = AgtPBPulseType_RaisedCosine ' Setting the pulse type to raised cosine
' Set the rise time to 100 ns, the fall time to 100 ns, 100% to 100% to 800 ns, the width jitter type to
' none, and the jitter deviation to 0 seconds
Call BarkerA.SetEnvelopeRaisedCosine(0.0000001, 0.0000001, 0.0000008, AgtPBJitterType_None, 0)
BarkerA.ModulationType = AgtPBModulationType_Barker ' Select Barker code modulation for the pulse
BarkerA.SetModulationBarker (13) ' Use Barker code number 13
' Instantiate a new pulse
Set BarkerB = project.PulseLibrary.CreateNewPulse("BarkerB")
BarkerB.PulseType = AgtPBPulseType_RaisedCosine ' Setting the pulse type to raised cosine
' Set the rise time to 100 ns, the fall time to 100 ns, 100% to 100% to 800 ns, the width jitter type to
' none, and the jitter deviation to 0 seconds
Call BarkerB.SetEnvelopeRaisedCosine(0.0000001, 0.0000001, 0.0000008, AgtPBJitterType_None, 0)
BarkerB.ModulationType = AgtPBModulationType_Barker ' Select Barker code modulation for the pulse
BarkerB.SetModulationBarker (7) ' Use Barker code number 7
'Instantiate a new pattern
Set DoubletPattern = project.PatternLibrary.CreateNewPattern("Doublet")
' Instantiate a pattern with the raised cosine (BarkerA) as the first pattern item
Set DoubletItem = DoubletPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "BarkerA", 0)
DoubletItem.RepetitionIntervalSec = 0.000005 ' Repetition interval set for 5 us
DoubletItem.NumberOfRepeats = 1 ' Number of repeats for the pattern item set to 1
DoubletItem.EdgeJitterType = AgtPBJitterType_None ' No jitter selected
DoubletItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
DoubletItem.RelativePowerScaleDB = 0 ' The item's signal generator RF power level is not changed
DoubletItem.FrequencyOffsetHz = 0 ' Signal generator RF frequency is not changed
DoubletItem.PhaseOffsetRad = 0 ' Signal generator RF signal phase offset set to 0 degrees
' Instantiate a pattern with the raised cosine (BarkerB) as the second pattern item
Set DoubletItem = DoubletPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "BarkerB", 1)
DoubletItem.RepetitionIntervalSec = 0.000045 ' Repetition interval set for 45 us
DoubletItem.NumberOfRepeats = 1 ' Number of repeats for the pattern item set to 1
DoubletItem.EdgeJitterType = AgtPBJitterType_None ' No jitter selected
DoubletItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
DoubletItem.RelativePowerScaleDB = 0 ' The item's signal generator power level is not changed
DoubletItem.FrequencyOffsetHz = 0 ' Signal generator frequency is not changed
DoubletItem.PhaseOffsetRad = 1.57 ' Signal generator RF signal phase is changed by 180 degrees
' Instantiating the Sensitivity pattern that will be used as the last item in the complex test pattern
Set SensitivityPattern = project.PatternLibrary.CreateNewPattern("Sensitivity")
SensitivityPattern.Properties.AmplitudeDBm = -10 ' Set the signal generator power level to -10 dBm for the Sensitivity pattern
' The next section of code uses a loop to fill in the pattern items and parameters for the Sensitivity pattern
' Each of the Sensitivity pattern items is a Doublet pattern. The first line of code in the loop instantiates
' a pattern item object; SensitivityItem using the Doublet pattern and at the counter "indexItem" index position.
For indexItem = 0 To 9
Set SensitivityItem = SensitivityPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pattern, "Doublet", indexItem)
SensitivityItem.RepetitionIntervalSec = 0.00005 ' Repetition interval set for 50 us
SensitivityItem.NumberOfRepeats = 1 ' Number of repeats for the pattern item set to 1
SensitivityItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
SensitivityItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
SensitivityItem.RelativePowerScaleDB = powerScale ' Set the power scale value for this item
SensitivityItem.FrequencyOffsetHz = 0 ' No change to signal generator RF signal
SensitivityItem.PhaseOffsetRad = 0 ' No change to the phase of the signal generator RF signal
If indexItem < 5 Then ' Based on the index, change the power scale value.
powerScale = powerScale - 6
Else
powerScale = powerScale + 6
End If
Next 'indexItem
' Instantiate a Complex Test pattern object
Set ComplexPattern = project.PatternLibrary.CreateNewPattern("Complex Test")
' Instantiate a pattern item object using the trapezoidal pulse (cw1)(put it at index 0)
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW1", 0)
ComplexItem.RepetitionIntervalSec = 0.000005 ' Repetition interval set for 5 us
ComplexItem.NumberOfRepeats = 2 ' Number of repeats for the pattern item set to 2
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the custom I/Q pulse (cw2) as the second pattern item
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW2", 1)
ComplexItem.RepetitionIntervalSec = 0.000005 ' Repetition interval set for 5 us
ComplexItem.NumberOfRepeats = 2 ' Number of repeats for the pattern item set to 2
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the custom profile pulse (cw3)as the third pattern item.
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "CW3", 2)
ComplexItem.RepetitionIntervalSec = 0.000005 ' Repetition interval set for 5 us
ComplexItem.NumberOfRepeats = 2 ' Number of repeats for the pattern item set to 2
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the raised cosine pulse (BarkerA) as the fourth pattern item.
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "BarkerA", 3)
ComplexItem.RepetitionIntervalSec = 0.000005 ' Repetition interval set for 5 us
ComplexItem.NumberOfRepeats = 1 ' Number of repeats
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the raised cosine pulse (BarkerB) as the fifth pattern item.
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pulse, "BarkerB", 4)
ComplexItem.RepetitionIntervalSec = 0.000005 ' Repetition interval set for 5 us
ComplexItem.NumberOfRepeats = 1 ' Number of repeats
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the Frequency Agile pattern (Agile) as the sixth pattern item.
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pattern, "Frequency Agile", 5)
ComplexItem.RepetitionIntervalSec = 0.0004 ' Repetition interval set for 400 us
ComplexItem.NumberOfRepeats = 3 ' Number of repeats for the pattern item set to 3
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 5000000 'The frequency of the carrier is increased by 5 MHz
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the Frequency Agile pattern (Agile) as the seventh pattern item.
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pattern, "Frequency Agile", 6)
ComplexItem.RepetitionIntervalSec = 0.0004 ' Repetition interval set for 400 us
ComplexItem.NumberOfRepeats = 3 ' Number of repeats for the pattern item set to 3
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = -5000000 'The frequency of the carrier is decreased by 5 MHz
ComplexItem.PhaseOffsetRad = 1.57 ' The phase of the signal generator signal is shifted 90 degrees
' Adding the Doublet pattern (Doublet) as the eighth pattern item
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pattern, "Doublet", 7)
ComplexItem.RepetitionIntervalSec = 0.0001 ' Repetition interval set for 100 us
ComplexItem.NumberOfRepeats = 4 ' Number of repeats
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = 0 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Adding the Sensitivity pattern (Sensitivity) as the ninth pattern item
Set ComplexItem = ComplexPattern.CreateNewItemAt(AgtPBPatternItemObjectType_Pattern, "Sensitivity", 8)
ComplexItem.RepetitionIntervalSec = 0.001 ' Repetition interval set for 5 us
ComplexItem.NumberOfRepeats = 5 ' Number of repeats for the pattern item set to 2
ComplexItem.EdgeJitterType = AgtPBJitterType_None ' No jitter applied
ComplexItem.JitterDeviationSec = 0 ' Jitter deviation set to 0
ComplexItem.RelativePowerScaleDB = -3 ' No power scale offset from carrier
ComplexItem.FrequencyOffsetHz = 0 ' No frequency offset from carrier
ComplexItem.PhaseOffsetRad = 0 ' No phase offset
' Save the .pbp file to the PC
If chkSaveFile.Value = 1 Then
project.SaveProject
End If
' If no analyzer then corrections must be disabled.
If chkCorrections.Value = 0 Then
project.ImageRejectionCorrectionEnabled = False
project.RFFlatnessCorrectionEnabled = False
End If
project.DownloadAndPlayPattern ("Complex Test") 'Download and play the signal on the signal generator
Call MsgBox("Signal Downloaded to Signal Generator", vbOKOnly)
frmMain.MousePointer = vbDefault ' Use default mouse icon
cmdRun.Enabled = True ' Re-enable the Download and Play button; the process is finished
Exit Sub
ErrorHandler:
frmMain.MousePointer = vbDefault
cmdRun.Enabled = True ' Re-enable the Download and Play button because; an excerption occurred
Call MsgBox(Err.Description, vbOKOnly)
End Sub
The Sensitivity Program Example describes the signal generator and spectrum/signal analyzer I/O connection forms. Refer to that section for details on this form.
The code listing for this function is described in the Frequency Agile Program Example. Refer to that example for details and descriptions on the function.