YOKOGAWA WT1600FC User Manual page 138

Impedance meter communication interface
Table of Contents

Advertisement

7.4 Output of Power Measurement Data
End Function
————————————————————————————————————————————
7-8
Call DisplayGPIBError(sts, msg)
GpibPower = 1
Exit Function
End If
List1.Clear
'Read and display the numeric data
For cnt = 1 To 10
'Wait for the completion of the data updating
msg = "COMMUNICATE:WAIT 1" + term
sts = ilwrt(Dev, msg, Len(msg))
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))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibPower = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
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))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibPower = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
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.ListIndex + 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) + "
Else
List1.AddItem CStr(item) + "
End If
qry = Mid(qry, comma + 1)
List1.ListIndex = List1.ListIndex + 1
Next item
List1.AddItem ""
List1.ListIndex = List1.ListIndex + 1
qry = Space$(900)
Dummy = DoEvents()
Next cnt
List1.AddItem "
All end"
List1.ListIndex = List1.ListIndex + 1
Call ibonl(Dev, 0)
GpibPower = 0
(It is repeated 10 times in this program)
'Send Command
'Send Command
'Receive Query
'Send Command
'Receive Query
" + Query(item)
" + Query(item)
IM 760151-17E

Advertisement

Table of Contents
loading

Table of Contents