YOKOGAWA WT1600FC User Manual page 146

Impedance meter communication interface
Table of Contents

Advertisement

7.6 Output of Waveform Data (ASCII Format)
End Function
————————————————————————————————————————————
7-16
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
Next wait
'Set conditions for reading the waveform
'ASCII format, Trace = U1
msg = "WAVEFORM:TRACE U1;FORMAT ASCII" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
'Read and display the waveform data
pntl = 1002
num = 0
For i = 0 To pntl Step 10
'Read in the waveform data 10 data points at a time
msg = "WAVEFORM:START" + Str(i) + ";END" + Str(i + 9) + ";SEND?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GpibWaveAscii = 1
Exit Function
End If
k = 1
'Extract items that are separated by commas(,) from the received data
For j = 0 To 9
comma = InStr(k, qry, ",")
If (comma = 0) Then comma = InStr(k, qry, term)
num = num + 1
Query(num) = Mid(qry, k, (comma - k))
If (num < 10) Then
List1.AddItem "
ElseIf (num < 100) Then
List1.AddItem "
ElseIf (num < 1000) Then
List1.AddItem " " + CStr(num) + "
Else
List1.AddItem CStr(num) + "
End If
k = comma + 1
List1.ListIndex = List1.ListIndex + 1
If (num >= pntl) Then Exit For
Next j
qry = Space$(200)
Dummy = DoEvents()
Next i
Call ibonl(Dev, 0)
GpibWaveAscii = 0
'Send Command
'Send Command
'Receive Query
" + CStr(num) + "
" + Query(num)
" + CStr(num) + "
" + Query(num)
" + Query(num)
" + Query(num)
IM 760151-17E

Advertisement

Table of Contents
loading

Table of Contents