
14-58
IM 760401-01E
Sleep 1000
List1.Clear
'Read and display the harmonics data (It is repeated 10 times in this program)
For cnt = 1 To 10
'Clear the extended event register (Read and trash the response)
msg = "STATUS:EESR?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
GoTo GPIBError
End If
sts = ilrd(Dev, qry, Len(qry)) 'Receive Query
If (sts < 0) Then
GoTo GPIBError
End If
'Wait for the completion of the data updating
msg = "COMMUNICATE:WAIT 1" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
GoTo GPIBError
End If
'Read out the harmonics data
msg = "MEASURE:HARMONICS:VALUE?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
GoTo GPIBError
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
GoTo GPIBError
End If
'Extract items that are separated by commas(,) from the received data
List1.AddItem "Measurement - " + CStr(cnt)
List1.ListIndex = List1.Lis 1
For item = 1 To 53
length = Len(qry)
comma = InStr(qry, ",")
If (comma = 0) Then comma = InStr(qry, term)
Query(item) = Left(qry, comma - 1)
If (item = 1) Then
List1.AddItem "FREQ (V1)" + " " + Query(item)
ElseIf (item = 2) Then
List1.AddItem "A1 THD " + " " + Query(item)
ElseIf (item = 3) Then
List1.AddItem "A1 Total " + " " + Query(item)
ElseIf (item = 4) Then
List1.AddItem "A1 Or.1 " + " " + Query(item)
ElseIf (item < 13) Then
List1.AddItem " " + CStr(item - 3) + " " + Query(item)
Else
List1.AddItem " " + CStr(item - 3) + " " + Query(item)
End If
qry = Mid(qry, comma + 1)
List1.ListIndex = List1.Lis 1
Next item
List1.AddItem ""
List1.ListIndex = List1.Lis 1
qry = Space$(1000)
Dummy = DoEvents()
Next cnt
List1.AddItem " All end"
List1.ListIndex = List1.Lis 1
Call ibonl(Dev, 0)
GpibHarmonics = 0
Exit Function
GPIBError:
Call DisplayGPIBError(sts, msg)
GpibHarmonics = 1
End Function
---------------------------------------------------------------------------------------------------
14.9 Sample Program (Output of Harmonic Measurement Data)
Summary of Contents for WT210
Page 1: ...Digital Power Meter IM 760401 01E 3rd Edition ...
Page 208: ...13 18 IM 760401 01E 13 3 Sample Program Image ...
Page 214: ...13 24 IM 760401 01E 13 5 Sample Program Output of Normal Measurement Data ...
Page 266: ...14 50 IM 760401 01E 14 6 Sample Program Image ...
Page 272: ...14 56 IM 760401 01E 14 8 Sample Program Output of Normal Measurement Data ...