R&S ESU
Remote Control – Programming Examples
Basic Programming Steps for the VISA Interface
7.6
Operating Manual 1302.6163.12 - 03
7.2.1.4
Service Request Routine
A service request is processed in the service request routine.
REM ------------ Service request routine ----------------------------------
Public SUB Srq()
ON ERROR GOTO noDevice
'No user existing
Call viReadSTB(analyzer, STB%)
'Serial poll, read status byte
IF STB% > 0 THEN
'This instrument has bits set in the STB
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
REM ***********************************************************************
Reading out the status event registers, the output buffer and the error/event queue
is effected in subroutines.
7.2.1.5
Evaluation of SCPI Status Registers
REM ------ Subroutine for evaluating Questionable Status Register ---------
Public SUB Questionablestatus()
Ques$ = SPACE$(20)
'Preallocate blanks to text variable
status = viWrite(analyzer, "STATus:QUEStionable:EVENt?", 26, retCnt)
status = viRead(analyzer, Ques$, 20, retCnt)
PRINT "Questionable Status: "; Ques$
END SUB
REM ***********************************************************************
REM ------ Subroutine for evaluating Operation Status Register ------------
Public SUB Operationstatus()
Oper$ = SPACE$(20)
'Preallocate blanks to text variable
status = viWrite(analyzer, "STATus:OPERation:EVENt?", 23, retCnt)
status = viRead(analyzer, Oper$, 20, retCnt)
PRINT "Operation Status: "; Oper$
END SUB
REM ***********************************************************************
Содержание ESU Series
Страница 1: ...R S ESU EMI Test Receiver Operating Manual 1302 6163 12 03 Test Measurement Operating Manual...
Страница 25: ......
Страница 27: ...R S ESU Putting into Operation 1 2 Operating Manual 1302 6163 12 03...
Страница 29: ...R S ESU Getting Started 2 2 Operating Manual 1302 6163 12 03...
Страница 31: ...R S ESU Manual Operation 3 2 Operating Manual 1302 6163 12 03...
Страница 349: ...R S ESU Instrument Functions Basic Settings 4 318 Operating Manual 1302 6163 12 03...
Страница 405: ...R S ESU Instrument Functions User Port 4 374 Operating Manual 1302 6163 12 03...
Страница 439: ...R S ESU Remote Control Basics Status Reporting System 5 34 Operating Manual 1302 6163 12 03...
Страница 821: ...R S ESU Remote Control Programming Examples More Complex Programming Examples 7 32 Operating Manual 1302 6163 12 03...
Страница 841: ...R S ESU Error Messages Device Specific Messages 9 10 Operating Manual 1302 6163 12 03...
Страница 854: ...Operating Manual 1302 6163 12 03 10 13 R S ESU...
Страница 855: ...R S ESU 10 14 Operating Manual 1302 6163 12 03...