Agilent Technologies MSO6102A Programmer's Reference Manual page 608

6000 series
Hide thumbs Also See for MSO6102A:
Table of Contents

Advertisement

9
Programming Examples
End Sub
'
' Analyze
' -------------------------------------------------------------------
' In analyze, we will do the following:
'
'
'
'
'
' -------------------------------------------------------------------
Private Sub Analyze()
608
' available for measurement.
' the completion criteria may never be met.
' gathered in Single mode is related to the sweep speed, memory
' depth, and maximum sample rate.
' 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.
' less than or equal to the maximum sample rate, the full 1000 points
' will be digitized in a single acquisition.
' (10 us across the screen).
' 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.
' 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.
' may be returned over the bus in this situation.
'
err = viVPrintf(vi, ":DIGITIZE CHAN1" + vbLf, 0)
- 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.
' Set up arrays for multiple parameter query returning an array
' with viVScanf/viVQueryf.
' of elements that the array can hold.
paramsArray(0) = VarPtr(retCount)
paramsArray(1) = VarPtr(byteArray(0))
' SAVE_SYSTEM_SETUP - The :SYSTEM:SETUP? query returns a program
' message that contains the current state of the instrument.
' format is a definite-length binary block, for example,
'
#800002204<setup string><NL>
' where the setup string is 2204 bytes in length.
Dim lngSetupStringSize As Long
err = viVPrintf(vi, ":SYSTEM:SETUP?" + vbLf, 0)
retCount = ByteArraySize
' Unsigned integer bytes.
err = viVScanf(vi, "%#b\n" + vbLf, paramsArray(0))
lngSetupStringSize = retCount
If DIGITIZE is used with single mode,
The number of points
For example, take an oscilloscope
Because this number is
1000 divided by 10 us equals 100 MSa/s;
An error value of 9.9E+37
Set retCount to the maximum number
Agilent 6000 Series Oscilloscopes Programmer's Reference
Now, use 1 us/div
If a
Its

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents