Agilent Technologies MSO6102A Programmer's Reference Manual page 612

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

Advertisement

9
Programming Examples
612
'
CStr(lngXReference) + vbCrLf
'strOutput = strOutput + "Y increment = " + _
'
FormatNumber(sngYIncrement * 1000) + _
'
" mV" + vbCrLf
'strOutput = strOutput + "Y origin = " + _
'
FormatNumber(sngYOrigin) + " V" + vbCrLf
'strOutput = strOutput + "Y reference = " + _
'
CStr(lngYReference) + vbCrLf
strOutput = strOutput + "Volts/Div = " + _
FormatNumber(lngVSteps * sngYIncrement / 8) + _
" V" + vbCrLf
strOutput = strOutput + "Offset = " + _
FormatNumber(sngYOrigin) + " V" + vbCrLf
strOutput = strOutput + "Sec/Div = " + _
FormatNumber(lngPoints * dblXIncrement / 10 * _
1000000) + " us" + vbCrLf
strOutput = strOutput + "Delay = " + _
FormatNumber(((lngPoints / 2) * _
dblXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
' QUERY_WAVE_DATA - Outputs waveform data that is stored in a buffer.
' Query the oscilloscope for the waveform data.
err = viVPrintf(vi, ":WAV:DATA?" + vbLf, 0)
' READ_WAVE_DATA - The wave data consists of two parts: the header,
' and the actual waveform data followed by a new line (NL) character.
' The query data has the following format:
'
'
<header><waveform_data><NL>
'
' Where:
'
'
<header> = #800001000 (This is an example header)
'
' The "#8" may be stripped off of the header and the remaining
' numbers are the size, in bytes, of the waveform data block.
' size can vary depending on the number of points acquired for the
' waveform.
You can then read that number of bytes from the
' oscilloscope and the terminating NL character.
'
'Dim lngI As Long
Dim lngDataValue As Long
paramsArray(1) = VarPtr(byteArray(0))
retCount = ByteArraySize
' Unsigned integer bytes.
err = viVScanf(vi, "%#b" + vbLf, paramsArray(0))
' retCount is now actual number of bytes returned by query.
For lngI = 0 To retCount - 1 Step (retCount / 20)
If intBytesPerData = 2 Then
lngDataValue = CLng(byteArray(lngI)) * 256 + _
CLng(byteArray(lngI + 1))
Else
lngDataValue = CLng(byteArray(lngI))
End If
strOutput = strOutput + "Data point " + _
' 16-bit value.
' 8-bit value.
Agilent 6000 Series Oscilloscopes Programmer's Reference
The
' 20 points.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents