Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1208

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

39
Programming Examples
1208
' Or, configure by loading a previously saved setup.
Dim nBytesWritten As Integer
strPath = "c:\scope\config\setup.stp"
strResultsArray = File.ReadAllLines(strPath)
nBytesWritten = strResultsArray.Length
' Restore setup string.
myScope.SCPI.SYSTem.SETup.Command(strResultsArray)
Console.WriteLine("Setup bytes restored: {0}", nBytesWritten)
' Capture an acquisition using :DIGitize.
myScope.SCPI.DIGitize.Command("CHANnel1", Nothing, Nothing, _
End Sub
' Analyze the captured waveform.
' --------------------------------------------------------------
Private Shared Sub Analyze()
Dim strResults As String, source1 As String, source2 As String
Dim fResult As Double
' Make a couple of measurements.
' -----------------------------------------------------------
myScope.SCPI.MEASure.SOURce.Command("CHANnel1", Nothing)
myScope.SCPI.MEASure.SOURce.Query(source1, source2)
Console.WriteLine("Measure source: {0}", source1)
myScope.SCPI.MEASure.FREQuency.Command("CHANnel1")
myScope.SCPI.MEASure.FREQuency.Query("CHANnel1", fResult)
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000)
' Use direct command/query when commands not in command set.
myScope.Transport.Command.Invoke(":MEASure:VAMPlitude CHANnel1")
myScope.Transport.Query.Invoke(":MEASure:VAMPlitude? CHANnel1", _
Console.WriteLine("Vertial amplitude: {0} V", strResults)
' Download the screen image.
' -----------------------------------------------------------
myScope.SCPI.HARDcopy.INKSaver.Command(False)
' Get the screen data.
Dim byteResultsArray As Byte()
' Results array.
myScope.SCPI.DISPlay.DATA.Query("PNG", "COLor", byteResultsArray)
Dim nLength As Integer
' Number of bytes returned from instrument.
nLength = byteResultsArray.Length
' Store the screen data to a file.
Dim strPath As String
strPath = "c:\scope\data\screen.png"
Dim fStream As FileStream = File.Open(strPath, FileMode.Create)
fStream.Write(byteResultsArray, 0, nLength)
fStream.Close()
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
Nothing, Nothing)
strResults)

Advertisement

Table of Contents
loading

Table of Contents