Querying The Measured Statistical Values Of Period Measurement (For Gp-Ib) - YOKOGAWA TA720 User Manual

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

Advertisement

6.5 Querying the Measured Statistical Values of Period Measurement (for GP-IB)

6.5 Querying the Measured Statistical Values of Period Measurement (for GP-IB)
Sample2(GPIB)
————————————————————————————————————————————————————————————————————————————————————————
Private Function GetStatistics1() As Integer
6-8
Get Statistics
Dim msg As String
Dim qry As String
Dim sts As Integer
Dim winlabel(10) As String
Dim i As Integer
Dim temp As String
msg = Space$(100)
qry = Space$(100)
sts = InitGpib
If (sts <> 0) Then
GetStatistics1 = 1
Exit Function
End If
msg = "*RST" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
msg = ":MEAS:MODE TST" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
msg = ":MEAS:FUNC PWID,A" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
msg = ":SAMP:GATE:MODE EVEN;EVEN 100000" + term 'Gate = Event; EventSize 100000
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
msg = ":THIS:MODE MULT" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
msg = ":THIS:MULT:SIZE 10;TVAL 37ns" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
winlabel(0) = "3": winlabel(1) = "4":
winlabel(3) = "6": winlabel(4) = "7":
winlabel(6) = "9": winlabel(7) = "10": winlabel(8) = "11"
winlabel(9) = "14"
For i = 1 To 10
msg = ":THIS:MULT:WIND" + LTrim(Str(i)) + ":LAB " + winlabel(i - 1) + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
Next i
msg = ":THIS:MULT:UPD" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
msg = "CALC:PAR:AVER ON;SDEV ON" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
GetStatistics1 = 1
Exit Function
End If
'Command buffer
'Query buffer
'Widow Label
'Initialize GPIB
'Initialize Setting Parameter
'Send Command
'Mode = TimeStamp
'Send Command
'Function = PulseWidth Ch = A
'Send Command
'Send Command
'WindowMode = MULTI WINDOW
'Send Command
'WINDOW SIZE 10; T=37ns
'Send Command
'Set Window Label
winlabel(2) = "5"
winlabel(5) = "8"
'Send Command
'UPDATE Window Scale
'Send Command
'Calc/Stat On
'Send Command
IM 704510-17E

Advertisement

Table of Contents
loading

Table of Contents