7-8
IM 760101-11E
List1.Clear
'Read and display the numerical data (It is repeated 10 times in this program)
For cnt = 1 To 10
'Wait for the completion of the data updating
msg = "COMMUNICATE:WAIT 1" + term
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
End If
'Clear the extended event register (Read and trash the response)
msg = "STATUS:EESR?" + term
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry)) 'Receive Query
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
End If
'Read out numerical data
msg = "NUMERIC:NORMAL:VALUE?" + term
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry)) 'Receive Query
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
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 60
length = Len(qry)
comma = InStr(qry, ",")
If (comma = 0) Then comma = InStr(qry, term)
Query(item) = Left(qry, comma - 1)
If item < 10 Then
List1.AddItem " " + CStr(item) + " " + Query(item)
Else
List1.AddItem CStr(item) + " " + 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$(900)
Dummy = DoEvents()
Next cnt
List1.AddItem " All end"
List1.ListIndex = List1.Lis 1
Call ibonl(Dev, 0)
GpibNormal = 0
End Function
----------------------------------------------------------------------------------------
7.4 Output of Normal Measurement Data
Содержание 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 ...