338
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
5
Commands by Subsystem
Example Code
' MEASURE - The commands in the MEASURE subsystem are used to make
' measurements on displayed waveforms.
myScope.WriteString ":MEASURE:SOURCE CHANNEL1"
' Source to measure.
myScope.WriteString ":MEASURE:FREQUENCY?"
' Query for frequency.
varQueryResult = myScope.ReadNumber
' Read frequency.
MsgBox "Frequency:" + vbCrLf _
+ FormatNumber(varQueryResult / 1000, 4) + " kHz"
myScope.WriteString ":MEASURE:DUTYCYCLE?"
' Query for duty cycle.
varQueryResult = myScope.ReadNumber
' Read duty cycle.
MsgBox "Duty cycle:" + vbCrLf _
+ FormatNumber(varQueryResult, 3) + "%"
myScope.WriteString ":MEASURE:RISETIME?"
' Query for risetime.
varQueryResult = myScope.ReadNumber
' Read risetime.
MsgBox "Risetime:" + vbCrLf _
+ FormatNumber(varQueryResult * 1000000, 4) + " us"
myScope.WriteString ":MEASURE:VPP?"
' Query for Pk to Pk voltage.
varQueryResult = myScope.ReadNumber
' Read VPP.
MsgBox "Peak to peak voltage:" + vbCrLf _
+ FormatNumber(varQueryResult, 4) + " V"
myScope.WriteString ":MEASURE:VMAX?"
' Query for Vmax.
varQueryResult = myScope.ReadNumber
' Read Vmax.
MsgBox "Maximum voltage:" + vbCrLf _
+ FormatNumber(varQueryResult, 4) + " V"
Example program from the start:
Summary of Contents for InfiniiVision 7000A Series
Page 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Page 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Page 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Page 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...