Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 694

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

12
Programming Examples
694
Close hFile
' Close file.
MsgBox "Screen image written to " + strPath
' Download waveform data.
' -----------------------------------------------------------------
Dim lngPoints As Long
Dim dblXIncrement As Double
Dim dblXOrigin As Double
Dim dblYIncrement As Double
Dim dblYOrigin As Double
Dim dblYReference As Double
' Set the waveform source.
DoCommand ":WAVeform:SOURce CHANnel1"
Debug.Print "Waveform source: " + _
DoQueryString(":WAVeform:SOURce?")
' Get the number of waveform points:
' How do you get max depth like when saving CSV from front panel?
dblQueryResult = DoQueryNumber(":WAVeform:POINts?")
lngPoints = dblQueryResult
Debug.Print "Waveform points, channel 1: " + _
CStr(lngPoints)
' Display the waveform settings:
dblXIncrement = DoQueryNumber(":WAVeform:XINCrement?")
Debug.Print "Waveform X increment, channel 1: " + _
Format(dblXIncrement, "Scientific")
dblXOrigin = DoQueryNumber(":WAVeform:XORigin?")
Debug.Print "Waveform X origin, channel 1: " + _
Format(dblXOrigin, "Scientific")
dblYIncrement = DoQueryNumber(":WAVeform:YINCrement?")
Debug.Print "Waveform Y increment, channel 1: " + _
Format(dblYIncrement, "Scientific")
dblYOrigin = DoQueryNumber(":WAVeform:YORigin?")
Debug.Print "Waveform Y origin, channel 1: " + _
Format(dblYOrigin, "Scientific")
dblYReference = DoQueryNumber(":WAVeform:YREFerence?")
Debug.Print "Waveform Y reference, channel 1: " + _
Format(dblYReference, "Scientific")
' Choose the format of the data returned (WORD, BYTE, ASCII):
DoCommand ":WAVeform:FORMat BYTE"
Debug.Print "Waveform format: " + _
DoQueryString(":WAVeform:FORMat?")
' Data in range 0 to 255.
Dim lngVSteps As Long
Dim intBytesPerData As Integer
lngVSteps = 256
intBytesPerData = 1
' Get the waveform data
Dim lngNumBytes As Long
lngNumBytes = DoQueryIEEEBlock_Bytes(":WAVeform:DATA?")
Debug.Print "Waveform data IEEEBlock bytes: " + CStr(lngNumBytes)
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents