Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 637

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

Advertisement

End Sub
'
' Initialize
' -------------------------------------------------------------------
' Initialize will start the program with the oscilloscope in a known
' state.
' cause the program to fail or not perform as expected.
'
' In this example, we initialize the following:
'
'
'
'
'
'
' There are also some additional initialization commands, which are
' not used, but shown for reference.
' -------------------------------------------------------------------
Private Sub Initialize()
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
' DIGITIZE command.
Capture
' Analyze - Once the waveform has been captured, it can be analyzed.
' There are many parts of a waveform to analyze.
' some of the possible ways to analyze various parts of a waveform.
Analyze
' Close the vi session and the resource manager session.
err = viClose(vi)
err = viClose(drm)
This is required because some uninitialized conditions could
- Oscilloscope
- Channel 1 range
- Display Grid
- Timebase reference, range, and delay
- Trigger mode and type
' Clear the interface.
err = viClear(vi)
' RESET - This command puts the oscilloscope into a known state.
' This statement is very important for programs to work as expected.
' Most of the following initialization commands are initialized by
' *RST.
It is not necessary to reinitialize them unless the default
' setting is not suitable for your application.
' Reset the oscilloscope to the defaults.
err = viVPrintf(vi, "*RST" + vbLf, 0)
' IDN - Ask for the device's *IDN string.
err = viVPrintf(vi, "*IDN?" + vbLf, 0)
err = viVScanf(vi, "%t", strQueryResult)
' Display results.
MsgBox "Result is: " + strQueryResult, vbOKOnly, "*IDN? Result"
' AUTOSCALE - This command evaluates all the input signals and sets
' the correct conditions to display all of the active signals.
err = viVPrintf(vi, ":AUTOSCALE" + vbLf, 0)
Programming Examples
This example shows
' Read the results as a
' string.
' Same as pressing
' the Autoscale key.
12
637

Advertisement

Table of Contents
loading

Table of Contents