www.allice.de
®
R&S
UPP
Bedienhandbuch 1411.1055.31 ─ 09
Private Sub ReadESR():
Call ibwrt(UPV, "*ESR?")
Call ibrd(UPV, Response)
EventList.AddItem "ESR register is: " + Left(Response, ibcntl - 1)
DoEvents
End Sub
'SRQ subroutine in case RQS was set
Private Sub GPIB_Notify(ByVal LocalUPV As Long, ByVal LocalIbsta As Long, ByVal LocalIberr As Long,
ByVal LocalIbcntl As Long, RearmMask As Long)
Call ibrsp(UPV, Info):
EventList.AddItem "SRQ " + " was fired after " + Trim(Str(Timer - StartT)) + " s"
EventList.AddItem "STB register is: " + Trim(Str(Info))
Call ReadESR
ibloc UPV
ibonl UPV, 0
End Sub
Private Sub Test_Click():
Call ibdev(0, 20, 0, T3s, 1, 0, UPV)
Call ibconfig(0, IbcAUTOPOLL, 1)
Call ibconfig(0, IbcEndBitIsNormal, 1
Call ibconfig(0, IbcEOScmp, 0)
Call ibconfig(0, IbcEOSrd, 1)
Call ibconfig(0, IbcEOSchar, 10)
Call ibclr(UPV)
Call ibwrt(UPV, "*IDN?")
Call ibrd(UPV, Response)
EventList.AddItem Left(Response, ibcntl - 1)
DoEvents
Call ibwrt(UPV, "*CLS")
Call ibwrt(UPV, "*ESE 1")
Call ibwrt(UPV, "*SRE 32")
Call ReadESR
Allice Messtechnik GmbH
Fernsteuerung – Grundlagen
Status Reporting System
'subroutine for readout of ESR
'ask for ESR data
'read ESR data
'do a serial poll and read STB
'switch UPV to local
'switch interface offline
'main program
'attach instrument
'enable auto serial polling
'set END bit on EOS match during read
''7 bit EOS char
'terminate read by EOS char
'EOS character LF as terminator
'device clear
'ask for instrument identity
'read query result
'display query result as message box
'reset registers
'enable operation complete bit to set ESB
'ESB bit generates SRQ
'reading clears ESR register
694