Anritsu MA24106A, 0701012 manual Sample Visual Basic Code Using the Demo Application

Page 55

Sample Visual Basic Code

Using the Demo Application

'

'Event handler for MSComm1 event Private Sub MSComm1_OnComm()

'Get data from Input buffer gstrInputBuffer = MSComm1.Input

'Display received result on the Received text box txtReceived.Text = gstrInputBuffer

End Sub

'Event handler for GetFreq button Private Sub btnGetFreq_Click()

txtCommand.Text = "FREQ?" Call btnSend_Click

End Sub

'Event handler for GetPower button Private Sub btnGetPower_Click()

txtCommand.Text = "PWR?" Call btnSend_Click

End Sub

'Event handler for SetFreq button Private Sub btnSetFreq_Click()

txtCommand.Text = "FREQ " & txtFreq.Text Call btnSend_Click

End Sub

'Event handler for ZeroSensor button Private Sub btnZeroSensor_Click()

txtCommand.Text = "ZERO" Call btnSend_Click

'Sensor will return OK after about 19 Seconds End Sub

'Event handler for Close button Private Sub btnClose_Click()

'

'Make sure we close the com port before we exit the app If MSComm1.PortOpen = True Then

'Stop sensor from making measurements txtCommand.Text = "STOP"

Call btnSend_Click

'

'Wait for half a second after sending START command Delay (0.5)

'

MSComm1.PortOpen = False End If

'Close the app End

End Sub

MA24106A UG

B-3

Image 55
Contents True-RMS, 50 MHz to 6 GHz MA24106A USB Power Sensor User GuideUpdates Anritsu Company Software License Agreement Page Table of Contents Table of Contents General Information Preparation for Storage/Shipment Preparation for Storage/ShipmentDriver Installation InstallationHardware and Software Requirements Anritsu Power Meter Installation Driver InstallationLicense Agreement Installation Driver InstallationSoftware will then install to the selected location Found New Hardware Wizard Select the hardware type Computer, and then click Next Click Have Disk..., and then click Next 14.Found New Hardware Wizard Click Finish to close the wizard Page Graphical User Interface Using the Power SensorButtons Buttons Using the Power SensorData Entry Fields Display Window Using the Power Sensor Display WindowStatus Bar Tools Menu Menu Bar Using the Power SensorMenu Bar File MenuDataLogging Menu Data Logging Menu10. Data Logging Power GraphTime, X-axis 30 minutes 14.Offset Entry Screen Offset Table16. Open Dialog MA24106A UG 17.Offset Table Menu Offset Table Off Status Session RestoreMaking Measurements Basic Power MeasurementConnecting the DUT Using the Power Sensor Making MeasurementsApplying a Calibration Factor Correction Making Measurements Using the Power SensorZeroing the Sensor Calibrating the Sensor±0.20 dB ±0.15 dB ±0.10 dB ±0.05 dB ±0.01 dB DBm Noise Number Averages Needed forMessage Description Resolution Error StatesTime Varying Signals Measurement Considerations Using the Power SensorNoise and Averaging High Crest Factor Signals peak to average ratioMultitone Signals Using the Power Sensor Measurement ConsiderationsSettling Time Uncertainty of a Measurement Using the Power Sensor Uncertainty of a MeasurementNoise Calculations at 12 dBm 16 mW Uncertainty of a Measurement Using the Power SensorUncertainty Adjusted Specification Uncertainty ExampleCommand Description Remote Operation Commands SummaryRemote Operation Remote Operation Command Details Remote Operation Command DetailsFREQ? Remote Operation Remote Operation Command DetailsHAT Required Equipment Sensor Operational TestsVswr Pretest Test ProcedureVswr Pretest Sensor Operational Tests Sensor Operational Tests Calibration Factor Test Calibration Factor TestMA24106A Calibration Factor Test Sensor Operational TestsSensor Operational Tests Linearity Test Linearity TestApply Linearity Test Sensor Operational TestsSensor Operational Tests Linearity Test +20 +15 +10 Adjust per Max Min Delta E11 E12 Measurement Results 2 GHz Measurement Results 6 GHz Beware of destructive pin depth mating connectors Appendix a Connector Care and HandlingConnector Care and Handling Avoid over torquing connectorsAvoid applying excessive power Cleaning connectorsAppendix B Sample Visual Basic Code Using the Demo ApplicationDemo Application Using the Demo Application Sample Visual Basic Code Sample Visual Basic Code Using the Demo Application Delay routine Appendix C Serial Port Compatibility For Anritsu Power Meter 1.0 OnlyMethod 3-Remapping a Serial Port Method 1-Download Updated SoftwareFigure C-2.System Properties Serial Port CompatibilityFigure C-3.Device Manager Method 3-Remapping a Serial PortFigure C-4.Advanced Settings for COM Port Close all windows that you have opened up to this point Upgrading the Firmware Appendix D Upgrading the FirmwareUpgrading the Firmware Figure D-3.Firmware Upgrade DialogFigure D-5.Open File Dialog Figure D-7 Symbols to L SymbolsIndex Index-2 MA24106A UG To SUSB To Z