8-46
IM 704420-01E
msg =
"
:SAMPLE:GATE:MODE EVENT
"
+ term 'Gate = Event(100000)
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg =
"
:SAMPle:GATE:MODE?
"
+ term 'Get Gate Mode
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
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)
msg =
"
:SAMPLE:ARMING:SOURCE AUTO
"
+ term 'Arming = Auto
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg =
"
:SAMPLE:ARMING:SOURCE?
"
+ term 'Get Arming
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
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(2) = Left$(qry, ibcntl - 1)
msg =
"
:SAMPLE:INHIBIT:STATE OFF
"
+ term 'Inhibit = Off
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
If (sts < 0) Then
Call DisplayGPIBError(sts, msg)
SetParameter = 1
Exit Function
End If
msg =
"
:SAMPLE:INHIBIT:STATE?
"
+ term 'Get Inhibit
sts = ilwrt(Dev, msg, Len(msg)) 'Send Command
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(3) = Left$(qry, ibcntl - 1)
8.9 Sample Program