
7-8
IM 760151-17E
Call DisplayGPIBError(sts, msg)
GpibPower = 1
Exit Function
End If
List1.Clear
‘Read and display the numeric 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)
GpibPower = 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)
GpibPower = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry)) ‘Receive Query
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibPower = 1
Exit Function
End If
‘Read out numeric data
msg = “NUMERIC:NORMAL:VALUE?” + term
sts = ilwrt(Dev, msg, Len(msg)) ‘Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibPower = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry)) ‘Receive Query
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibPower = 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)
GpibPower = 0
End Function
————————————————————————————————————————————
7.4 Output of Power Measurement Data