Programming Examples
42
Keysight InfiniiVision 3000T X-Series Oscilloscopes Programmer's Guide
1331
' Output setup string to a file:
Dim strPath As String
strPath = "c:\scope\config\setup.dat"
If Len(Dir(strPath)) Then
Kill strPath
' Remove file if it exists.
End If
' 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)
' Write data.
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 position.
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 (NORMal, PEAK, AVERage, or HRESolution).
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
' Open file for input.
Dim lngSetupFileSize As Long
lngSetupFileSize = LOF(hFile)
' Length of file.
Get hFile, , byteArray
' Read data.
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)
Summary of Contents for InfiniiVision 3000T X Series
Page 1: ...Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide...
Page 40: ...40 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 1 What s New...
Page 50: ...50 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 64: ...64 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 254: ...254 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Page 306: ...306 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 12 DEMO Commands...
Page 364: ...364 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 17 FFT Commands...
Page 442: ...442 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 21 MARKer Commands...
Page 524: ...524 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 22 MEASure Commands...
Page 656: ...656 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 26 POWer Commands...
Page 666: ...666 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 27 RECall Commands...
Page 888: ...888 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 29 SBUS n Commands...
Page 978: ...978 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 30 SEARch Commands...
Page 1240: ...1240 Keysight InfiniiVision 3000T X Series Oscilloscopes Programmer s Guide 38 Error Messages...