Agilent Technologies MSO6102A Programmer's Reference Manual page 619

6000 series
Hide thumbs Also See for MSO6102A:
Table of Contents

Advertisement

Agilent 6000 Series Oscilloscopes Programmer's Reference
' it back to the oscilloscope.
Dim varSetupString As Variant
strPath = "c:\scope\config\setup.dat"
Open strPath For Binary Access Read As #1
Get #1, , varSetupString
Close #1
' Close file.
' Write setup string back to oscilloscope using ":SYSTEM:SETUP"
' command:
myScope.WriteIEEEBlock ":SYSTEM:SETUP ", varSetupString
CheckForInstrumentErrors
' MEASURE - The commands in the MEASURE subsystem are used to make
' measurements on displayed waveforms.
' Source to measure.
myScope.WriteString ":MEASURE:SOURCE CHANNEL1"
' Query for frequency.
myScope.WriteString ":MEASURE:FREQUENCY?"
varQueryResult = myScope.ReadNumber
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(varQueryResult / 1000, 4) + " kHz"
' Query for duty cycle.
myScope.WriteString ":MEASURE:DUTYCYCLE?"
varQueryResult = myScope.ReadNumber
MsgBox "Duty cycle:" + vbCrLf + _
FormatNumber(varQueryResult, 3) + "%"
' Query for risetime.
myScope.WriteString ":MEASURE:RISETIME?"
varQueryResult = myScope.ReadNumber
MsgBox "Risetime:" + vbCrLf + _
FormatNumber(varQueryResult * 1000000, 4) + " us"
' Query for Peak to Peak voltage.
myScope.WriteString ":MEASURE:VPP?"
varQueryResult = myScope.ReadNumber
MsgBox "Peak to peak voltage:" + vbCrLf + _
FormatNumber(varQueryResult, 4) + " V"
' Query for Vmax.
myScope.WriteString ":MEASURE:VMAX?"
varQueryResult = myScope.ReadNumber
MsgBox "Maximum voltage:" + vbCrLf + _
FormatNumber(varQueryResult, 4) + " V"
' WAVEFORM_DATA - To obtain waveform data, you must specify the
' WAVEFORM parameters for the waveform data prior to sending the
' ":WAVEFORM:DATA?" query.
' the waveform data and the preamble can be read.
'
' WAVE_SOURCE - Selects the channel to be used as the source for
' the waveform commands.
myScope.WriteString ":WAVEFORM:SOURCE CHAN1"
' WAVE_POINTS - Specifies the number of points to be transferred
' Open file for input.
' Read data.
' Read frequency.
' Read duty cycle.
' Read risetime.
' Read VPP.
' Read Vmax.
Once these parameters have been sent,
Programming Examples
619
9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents