7-16
IM 760101-11E
'Set conditions for reading the waveform
'ASCII format, Trace = U1
msg = "WAVEFORM:TRACE U1;FORMAT ASCII" + term
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
'Read and display the waveform data
pntl = 1002
num = 0
For i = 0 To pntl Step 10
'Read in the waveform data 10 data points at a time
msg = "WAVEFORM:START" + Str(i) + ";END" + Str(i + 9) + ";SEND?" + term
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry)) 'Receive Query
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
k = 1
'Extract items that are separated by commas(,) from the received data
For j = 0 To 9
comma = InStr(k, qry, ",")
If (comma = 0) Then comma = InStr(k, qry, term)
num = num + 1
Query(num) = Mid(qry, k, (comma - k))
If (num < 10) Then
List1.AddItem " " + CStr(num) + " " + Query(num)
ElseIf (num < 100) Then
List1.AddItem " " + CStr(num) + " " + Query(num)
ElseIf (num < 1000) Then
List1.AddItem " " + CStr(num) + " " + Query(num)
Else
List1.AddItem CStr(num) + " " + Query(num)
End If
k = comma + 1
List1.ListIndex = List1.Lis 1
If (num >= pntl) Then Exit For
Next j
qry = Space$(200)
Dummy = DoEvents()
Next i
Call ibonl(Dev, 0)
GpibWaveAscii = 0
End Function
----------------------------------------------------------------------------------------
7.6 Output of Waveform Data (ASCII Format)
Содержание wt1600
Страница 1: ...Digital Power Meter Communication Interface IM 760101 11E 4th Edition ...
Страница 131: ...7 2 IM 760101 11E 7 2 Sample Program Image ...
Страница 138: ...Sample Program 7 9 IM 760101 11E 7 7 4 Output of Normal Measurement Data ...
Страница 142: ...Sample Program 7 13 IM 760101 11E 7 7 5 Output of Harmonic Measurement Data ...