1148
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
39
Programming Examples
If (err <> VI_SUCCESS) Then HandleVISAError vi
err = viVScanf(vi, "%lf" + vbLf, VarPtr(dblResult))
If (err <> VI_SUCCESS) Then HandleVISAError vi
DoQueryNumber = dblResult
CheckInstrumentErrors
End Function
Private Function DoQueryNumbers(query As String) As Long
Dim dblResult As Double
' Send query.
err = viVPrintf(vi, query + vbLf, 0)
If (err <> VI_SUCCESS) Then HandleVISAError vi
' Set up paramsArray for multiple parameter query returning array.
paramsArray(0) = VarPtr(retCount)
paramsArray(1) = VarPtr(dblArray(0))
' Set retCount to max number of elements array can hold.
retCount = DblArraySize
' Read numbers.
err = viVScanf(vi, "%,#lf" + vbLf, paramsArray(0))
If (err <> VI_SUCCESS) Then HandleVISAError vi
' retCount is now actual number of values returned by query.
DoQueryNumbers = retCount
CheckInstrumentErrors
End Function
Private Function DoQueryIEEEBlock_Bytes(query As String) As Long
' Send query.
err = viVPrintf(vi, query + vbLf, 0)
If (err <> VI_SUCCESS) Then HandleVISAError vi
' Set up paramsArray for multiple parameter query returning array.
paramsArray(0) = VarPtr(retCount)
paramsArray(1) = VarPtr(byteArray(0))
' Set retCount to max number of elements array can hold.
retCount = ByteArraySize
' Get unsigned integer bytes.
err = viVScanf(vi, "%#b" + vbLf, paramsArray(0))
If (err <> VI_SUCCESS) Then HandleVISAError vi
err = viFlush(vi, VI_READ_BUF)
If (err <> VI_SUCCESS) Then HandleVISAError vi
Содержание InfiniiVision 3000 X-Series
Страница 1: ...s1 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Страница 30: ...30 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide...
Страница 54: ...54 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 68: ...68 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 152: ...152 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 4 Commands Quick Reference...
Страница 218: ...218 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 6 Root Commands...
Страница 242: ...242 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands...
Страница 280: ...280 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 11 DEMO Commands...
Страница 288: ...288 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 12 DIGital d Commands...
Страница 306: ...306 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 14 EXTernal Trigger Commands...
Страница 340: ...340 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 15 FUNCtion Commands...
Страница 358: ...358 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 16 HARDcopy Commands...
Страница 378: ...378 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 18 MARKer Commands...
Страница 446: ...446 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 19 MEASure Commands...
Страница 466: ...466 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 20 MEASure Power Commands...
Страница 502: ...502 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 22 POD Commands POD1 DISP 0 THR 1 40E 00...
Страница 564: ...564 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 23 POWer Commands...
Страница 842: ...842 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 29 TIMebase Commands...
Страница 1046: ...1046 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 34 Obsolete and Discontinued Commands...
Страница 1054: ...1054 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 35 Error Messages...
Страница 1076: ...1076 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 36 Status Reporting...
Страница 1086: ...1086 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 37 Synchronizing Acquisitions...
Страница 1216: ...1216 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 39 Programming Examples...
Страница 1231: ...Index Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide 1231 zoomed window horizontal scale 841...
Страница 1232: ...1232 Agilent InfiniiVision 3000 X Series Oscilloscopes Programmer s Guide Index...