Querying The Measured Data Of A-To-B Time Interval Measurement (For Gp-Ib) - YOKOGAWA TA720 User Manual

Time interval analyzer communication interface
Hide thumbs Also See for TA720:
Table of Contents

Advertisement

6.7 Querying the Measured Data of A-to-B Time Interval Measurement (for GP-IB)

6.7 Querying the Measured Data of A-to-B Time Interval Measurement (for GP-IB)
Sample4(GPIB)
————————————————————————————————————————————————————————————————————————————————————————
Private Function GetBinaryData() As Integer
6-14
Dim msg As String
Dim qry As String
Dim sts As Integer
Dim idata(1000) As Integer
Dim num As Integer
Dim data_h As Long
Dim data_l As Long
Dim data As Variant
Dim eos As Integer
Dim i As Integer
msg = Space$(100)
qry = Space$(1000)
sts = InitGpib
If (sts <> 0) Then
GetBinaryData = 1
Exit Function
End If
msg = "*RST" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = ":MEASURE:MODE TSTAMP" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = ":MEASURE:FUNCTION TI,AB" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = ":SAMPLE:GATE:MODE EVENT;EVENTSIZE 100" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = "STATUS:FILTER1 RISE" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = "STATUS:EESR?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = "SSTART" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = "COMMUNICATE:WAIT 1" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetBinaryData = 1
Exit Function
End If
msg = "MEMORY:DATASELECT MEASUREDATA" + term
sts = ilwrt(Dev, msg, Len(msg))
'Command buffer
'Query buffer
'Data buffer(Binary)
'EOS
'Initialize GPIB
'Initialize Setting Parameter
'Send Command
'Mode = Time Stamp
'Send Command
'Function = Time Interval, Ch = A,B
'Send Command
'Gate = Event; EventSize 100
'Send Command
'Filter1 Rise(Data Available)
'Send Command
'Clear Extended Event Register
'Send Command
'Receive Query
'Single Measure Start
'Send Command
'Wait until data available
'Send Command
IM 704510-17E

Advertisement

Table of Contents
loading

Table of Contents