816
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
12
Programming Examples
'
' NOTE!
The DIGITIZE command is highly recommended for triggering
' modes other than SINGLE.
This ensures that sufficient data is
' available for measurement.
If DIGITIZE is used with single mode,
' the completion criteria may never be met.
The number of points
' gathered in Single mode is related to the sweep speed, memory
' depth, and maximum sample rate.
For example, take an oscilloscope
' with a 1000-point memory, a sweep speed of 10 us/div (100 us
' total time across the screen), and a 20 MSa/s maximum sample rate.
' 1000 divided by 100 us equals 10 MSa/s.
Because this number is
' less than or equal to the maximum sample rate, the full 1000 points
' will be digitized in a single acquisition.
Now, use 1 us/div
' (10 us across the screen).
1000 divided by 10 us equals 100 MSa/s;
' because this is greater than the maximum sample rate by 5 times,
' only 400 points (or 1/5 the points) can be gathered on a single
' trigger.
Keep in mind when the oscilloscope is running,
' communication with the computer interrupts data acquisition.
' Setting up the oscilloscope over the bus causes the data buffers
' to be cleared and internal hardware to be reconfigured.
If a
' measurement is immediately requested, there may have not been
' enough time for the data acquisition process to collect data,
' and the results may not be accurate.
An error value of 9.9E+37
' may be returned over the bus in this situation.
'
myScope.WriteString ":DIGITIZE CHAN1"
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + Err.Description
End Sub
'
' Analyze
' -------------------------------------------------------------------
' In analyze, we will do the following:
'
- Save the system setup to a file and restore it.
'
- Save the waveform data to a file on the computer.
'
- Make single channel measurements.
'
- Save the oscilloscope display to a file that can be sent to a
'
printer.
' -------------------------------------------------------------------
Private Sub Analyze()
On Error GoTo VisaComError
' SAVE_SYSTEM_SETUP - The :SYSTEM:SETUP? query returns a program
' message that contains the current state of the instrument.
Its
' format is a definite-length binary block, for example,
'
#800002204<setup string><NL>
' where the setup string is 2204 bytes in length.
myScope.WriteString ":SYSTEM:SETUP?"
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
CheckForInstrumentErrors
' After reading query results.
' Output setup string to a file:
Summary of Contents for InfiniiVision 7000A Series
Page 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Page 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Page 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Page 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...