EasyManua.ls Logo

R&S FSW Series - Page 1383

R&S FSW Series
1450 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Remote Commands
R&S
®
FSW
1383User Manual 1173.9411.02 ─ 43
SRQFOUND% = 1
IF (STB% AND 16) > 0 THEN CALL Outputqueue
IF (STB% AND 4) > 0 THEN CALL ErrorQueueHandler
IF (STB% AND 8) > 0 THEN CALL Questionablestatus
IF (STB% AND 128) > 0 THEN CALL Operationstatus
IF (STB% AND 32) > 0 THEN CALL Esrread
END IF
noDevice:
END SUB 'End of SRQ routine
REM ***********************************************************************
REM ---------- Subroutine for evaluation Service Request Routine ----------
Public Sub Srq()
Try
Dim mySTB As Short = mbSession.ReadStatusByte()
'Serial poll, read status byte
Console.WriteLine("Reading Service Request Routine:" + mySTB.ToString())
If mySTB > 0 Then 'This instrument has bits set in the STB
If (mySTB And 16) > 0 Then Call Outputqueue()
If (mySTB And 4) > 0 Then Call ErrorQueueHandler()
If (mySTB And 8) > 0 Then Call Questionablestatus()
If (mySTB And 128) > 0 Then Call Operationstatus()
If (mySTB And 32) > 0 Then Call Esrread()
End If
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
End Sub 'End of SRQ routine
Reading out the status event registers, the output buffer and the error/event queue is
effected in subroutines.
14.15.2.5 Reading Out the Output Buffer
REM -------- Subroutine for the individual STB bits -----------------------
Public SUB Outputqueue() 'Reading the output buffer
result$ = SPACE$(100) 'Make space for response
CALL InstrRead(analyzer, result$)
Debug.Print "Contents of Output Queue:"; result$
END SUB
REM ***********************************************************************
REM -------- Subroutine for the output queue -----------------------
Public Sub Outputqueue() 'Reading the output buffer
Try
Dim result As String = mbSession.ReadString()
Console.WriteLine("Contents of Output Queue:" + result)
Catch exp As Exception
Console.WriteLine(exp.Message)
Programming Examples

Table of Contents

Related product manuals