Agilent Technologies InfiniiVision 7000A Series Programmer's Manual page 857

Table of Contents

Advertisement

End Sub
'
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
' Open file for output.
Dim hFile As Long
hFile = FreeFile
Open strPath For Binary Access Write Lock Write As hFile
Dim lngI As Long
For lngI = 0 To lngSetupStringSize - 1
Put hFile, , byteArray(lngI)
Next lngI
Close hFile
' Close file.
' Change settings with individual commands:
' -----------------------------------------------------------------
' Set vertical scale and offset.
DoCommand ":CHANnel1:SCALe 0.05"
Debug.Print "Channel 1 vertical scale: " + _
DoQueryString(":CHANnel1:SCALe?")
DoCommand ":CHANnel1:OFFSet -1.5"
Debug.Print "Channel 1 vertical offset: " + _
DoQueryString(":CHANnel1:OFFSet?")
' Set horizontal scale and offset.
DoCommand ":TIMebase:SCALe 0.0002"
Debug.Print "Timebase scale: " + _
DoQueryString(":TIMebase:SCALe?")
DoCommand ":TIMebase:POSition 0.0"
Debug.Print "Timebase position: " + _
DoQueryString(":TIMebase:POSition?")
' Set the acquisition type to NORMal.
DoCommand ":ACQuire:TYPE NORMal"
Debug.Print "Acquire type: " + _
DoQueryString(":ACQuire:TYPE?")
' Or, configure by loading a previously saved setup.
' -----------------------------------------------------------------
strPath = "c:\scope\config\setup.dat"
Open strPath For Binary Access Read As hFile
Dim lngSetupFileSize As Long
lngSetupFileSize = LOF(hFile)
Get hFile, , byteArray
Close hFile
' Close file.
' Write learn string back to oscilloscope using ":SYSTem:SETup"
' command:
Dim lngRestored As Long
lngRestored = DoCommandIEEEBlock(":SYSTem:SETup", lngSetupFileSize)
Debug.Print "Setup bytes restored: " + CStr(lngRestored)
' Capture data using :DIGitize.
' -----------------------------------------------------------------
DoCommand ":DIGitize"
' Write data.
' Length of file.
' Read data.
Programming Examples
' Open file for input.
12
857

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents