Setting Measurement Parameters Or Querying The Settings (For Gp-Ib) - YOKOGAWA TA720 User Manual

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

Advertisement

6.4 Setting Measurement Parameters or Querying the Settings (for GP-IB)

6.4 Setting Measurement Parameters or Querying the Settings (for GP-IB)
Sample1(GPIB)
————————————————————————————————————————————————————————————————————————————————————————
Private Function SetParameter() As Integer
End Function
————————————————————————————————————————————————————————————————————————————————————————
6-6
Dim msg As String
Dim qry As String
Dim sts As Integer
msg = Space$(100)
qry = Space$(100)
sts = InitGpib
If (sts <> 0) Then
SetParameter = 1
Exit Function
End If
msg = "*RST" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg = ":COMMUNICATE:HEADER ON" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg = ":COMM:VERBOSE ON" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg = ":MEASURE:MODE HHISTOGRAM" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg = ":MEASURE:MODE?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
Query(0) = Left$(qry, ibcntl - 1)
msg = ":MEASURE:FUNCTION PERIOD,A" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg = ":MEASURE:FUNCTION?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
Query(1) = Left$(qry, ibcntl - 1)
Call ibonl(Dev, 0)
SetParameter = 0
'Command buffer
'Query buffer
'Initialize GPIB
'Initialize Setting Parameter
'Send Command
'Header = ON
'Send Command
'Verbose = ON
'Send Command
'Mode = HardHistogram
'Send Command
'Get Mode
'Send Command
'Receive Query
'Function = Period, Ch = A
'Send Command
'Get Function
'Send Command
'Receive Query
IM 704510-17E

Advertisement

Table of Contents
loading

Table of Contents