Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 714

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

Advertisement

12
Programming Examples
714
' Read VPP.
err = viVScanf(vi, "%lf" + vbLf, VarPtr(dblQueryResult))
MsgBox "Peak to peak voltage:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
' Query for Vmax.
err = viVPrintf(vi, ":MEASURE:VMAX?" + vbLf, 0)
' Read Vmax.
err = viVScanf(vi, "%lf" + vbLf, VarPtr(dblQueryResult))
MsgBox "Maximum voltage:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
' WAVEFORM_DATA - To obtain waveform data, you must specify the
' WAVEFORM parameters for the waveform data prior to sending the
' ":WAVEFORM:DATA?" query.
' the waveform data and the preamble can be read.
'
' WAVE_SOURCE - Selects the channel to be used as the source for
' the waveform commands.
err = viVPrintf(vi, ":WAVEFORM:SOURCE CHAN1" + vbLf, 0)
' WAVE_POINTS - Specifies the number of points to be transferred
' using the ":WAVEFORM:DATA?" query.
err = viVPrintf(vi, ":WAVEFORM:POINTS 1000" + vbLf, 0)
' WAVE_FORMAT - Sets the data transmission mode for the waveform
' data output.
This command controls whether data is formatted in
' a word or byte format when sent from the oscilloscope.
Dim lngVSteps As Long
Dim intBytesPerData As Integer
' Data in range 0 to 65535.
err = viVPrintf(vi, ":WAVEFORM:FORMAT WORD" + vbLf, 0)
lngVSteps = 65536
intBytesPerData = 2
' Data in range 0 to 255.
'err = viVPrintf(vi, ":WAVEFORM:FORMAT BYTE" + vbLf, 0)
'lngVSteps = 256
'intBytesPerData = 1
' GET_PREAMBLE - The preamble block contains all of the current
' WAVEFORM settings.
' where <preamble_block> is:
'
FORMAT
: int16 - 0 = BYTE, 1 = WORD, 2 = ASCII.
'
TYPE
: int16 - 0 = NORMAL, 1 = PEAK DETECT, 2 = AVERAGE.
'
POINTS
: int32 - number of data points transferred.
'
COUNT
: int32 - 1 and is always 1.
'
XINCREMENT
: float64 - time difference between data points.
'
XORIGIN
: float64 - always the first data point in memory.
'
XREFERENCE
: int32 - specifies the data point associated with
'
'
YINCREMENT
: float32 - voltage difference between data points.
'
YORIGIN
: float32 - value is the voltage at center screen.
'
YREFERENCE
: int32 - specifies the data point where y-origin
'
Dim intFormat As Integer
Once these parameters have been sent,
It is returned in the form <preamble_block><NL>
x-origin.
occurs.
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents