YOKOGAWA WT1600FC User Manual page 141

Impedance meter communication interface
Table of Contents

Advertisement

Sample2(GPIB) Get Impedance Data
————————————————————————————————————————————
Private Function GpibImpedance() As Integer
Dim msg As String
Dim qry As String
Dim sts As Integer
Dim wait As Integer
Dim item As Integer
Dim comma As Integer
Dim length As Integer
Dim cnt As Integer
term = Chr$(10)
msg = Space$(100)
qry = Space$(1200)
List1.AddItem "Now Initializing. Wait a moment."
Dummy = DoEvents()
sts = InitGpib
If (sts <> 0) Then
End If
'Initialize the settings
msg = "*RST" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Set the measurment condition
'Mode = impedance mode
msg = "IMPEDANCE:STATE ON" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Superpose Output Ratio = 0.3, Hold Action = Normal
msg = "IMPEDANCE:SUPERPOSE:DETAILE:RATIO 0.3;HOLD NORMAL" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Superpose DC Offset = 1.000, Superpose AC Amp = 1.000
msg = "IMPEDANCE:SUPERPOSE:OFFSET 1;AMPLITUDE 1" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Frequency Range = Hz, Frequency Value = 10
msg = "IMPEDANCE:SUPERPOSE:FREQUENCY:RANGE HZ;VALUE 10" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Hold On
msg = "HOLD ON" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Superpose Output Type = AC/DC, Superpose Output = ON
msg = "IMPEDANCE:SUPERPOSE:OUTPUT:TYPE ACDC;STATE ON" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Initialize voltage range
msg = "IMPEDANCE:VOLTAGE:INITIALIZE" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
IM 760151-17E
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibImpedance = 1
Exit Function
7.5 Output of Impedance Measurement Data
'Command buffer
'Query buffer
'terminator
'Initialize GPIB
'Initialize the settings
'Send Command
'Send Command
'Send Command
'Send Command
'Send Command
'Send Command
'Send Command
'Send Command
7
7-11

Advertisement

Table of Contents
loading

Table of Contents