1254
Keysight P9241/42/43A Oscilloscopes SCPI Programmer's Guide
38
Programming Examples
End If
If intType = 0 Then
Debug.Print "Acquisition type: NORMal"
ElseIf intType = 1 Then
Debug.Print "Acquisition type: PEAK"
ElseIf intType = 2 Then
Debug.Print "Acquisition type: AVERage"
ElseIf intType = 3 Then
Debug.Print "Acquisition type: HRESolution"
End If
Debug.Print "Waveform points: " + _
FormatNumber(lngPoints, 0)
Debug.Print "Waveform average count: " + _
FormatNumber(lngCount, 0)
Debug.Print "Waveform X increment: " + _
Format(dblXIncrement, "Scientific")
Debug.Print "Waveform X origin: " + _
Format(dblXOrigin, "Scientific")
Debug.Print "Waveform X reference: " + _
FormatNumber(lngXReference, 0)
Debug.Print "Waveform Y increment: " + _
Format(sngYIncrement, "Scientific")
Debug.Print "Waveform Y origin: " + _
FormatNumber(lngYOrigin, 0)
Debug.Print "Waveform Y reference: " + _
FormatNumber(lngYReference, 0)
' Get the waveform data
Dim lngNumBytes As Long
lngNumBytes = DoQueryIEEEBlock_Bytes(":WAVeform:DATA?")
Debug.Print "Number of data values: " + CStr(lngNumBytes)
' Set up output file:
strPath = "c:\scope\data\waveform_data.csv"
' Open file for output.
Open strPath For Output Access Write Lock Write As hFile
' Output waveform data in CSV format.
Dim lngDataValue As Long
For lngI = 0 To lngNumBytes - 1
lngDataValue = CLng(byteArray(lngI))
' Write time value, voltage value.
Print #hFile, _
FormatNumber(dblX (lngI * dblXIncrement), 9) + _
", " + _
Summary of Contents for P9241
Page 1: ...Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide...
Page 6: ...6 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide...
Page 36: ...36 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 1 What s New...
Page 41: ...Setting Up 2 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 41...
Page 44: ...44 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 2 Setting Up...
Page 222: ...222 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 7 Root Commands...
Page 244: ...244 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 8 ACQuire Commands...
Page 256: ...256 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 9 CALibrate Commands...
Page 278: ...278 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 10 CHANnel n Commands...
Page 328: ...328 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 15 EXTernal Trigger Commands...
Page 386: ...386 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 17 FUNCtion m Commands...
Page 390: ...390 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 18 HCOPY Commands...
Page 416: ...416 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 20 MARKer Commands...
Page 498: ...498 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 21 MEASure Commands...
Page 532: ...532 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 22 MTESt Commands...
Page 572: ...572 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 24 SAVE Commands...
Page 900: ...900 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 28 TIMebase Commands...
Page 1080: ...1080 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 31 WGEN w Commands...
Page 1142: ...1142 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 34 Error Messages...
Page 1344: ...1344 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide Index...