YOKOGAWA WT1600FC User Manual page 142

Impedance meter communication interface
Table of Contents

Advertisement

7.5 Output of Impedance Measurement Data
7-12
'Preset pattern1, Number of data = 3, Number of data of array function = 1
msg = "NUMERIC:IMPEDANCE:PRESET 1;NUMBER 3;ARRAY 1" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
End If
'Set the transition filter used to detect the completion of the data updating
msg = "STATUS:FILTER1 FALL" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 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)
GpibImpedance = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
End If
List1.Clear
'Read and display the numeric data
For cnt = 1 To 5
msg = "*TRG" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
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
Call DisplayGPIBError(sts, msg)
GpibImpedance = 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)
GpibImpedance = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
End If
'Read out numeric data
msg = "NUMERIC:IMPEDANCE:VALUE?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibImpedance = 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 3
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 : " + Query(item)
'Send Command
'Falling edge of bit0(UPD)
'Send Command
'Send Command
'Receive Query
(It is repeated 5 times in this program)
'Single trigger
'Send Command
'Send Command
'Send Command
'Receive Query
'Send Command
'Receive Query
IM 760151-17E

Advertisement

Table of Contents
loading

Table of Contents