![Rohde & Schwarz R&S FSP Series Operating Manual Download Page 737](http://html.mh-extra.com/html/rohde-and-schwarz/rands-fsp-series/rands-fsp-series_operating-manual_1477864737.webp)
Operating Manual 1164.4556.12 - 06
7.3
R&S FSP
Remote Control – Programming Examples
Basic Programming Steps for the VISA Interface
7.2.1.1
Initiate Service Request
REM ---- Example of initialization of the SRQ in the case of errors --------
PUBLIC SUB SetupSRQ()
status = viWrite(analyzer, "*CLS", 4, retCnt)
’Reset status reporting system
status = viWrite(analyzer, "*SRE 168", 8, retCnt)
'Permit service request for STAT:OPER,STAT:QUES and ESR registe
status = viWrite(analyzer, "*ESE 60", 7, retCnt)
'Set event enable bit for command, execution, device-dependent
'and query error
status = viWrite(analyzer, "STAT:OPER:ENAB 32767", 20, retCnt)
'Set OPERation enable bit for all events
status = viWrite(analyzer, "STAT:OPER:PTR 32767", 19, retCnt)
'Set appropriate OPERation Ptransition bits
status = viWrite(analyzer, "STAT:QUES:ENAB 32767", 20, retCnt)
'Set questionable enable bits for all events
status = viWrite(analyzer, "STAT:QUES:PTR 32767", 19, retCnt)
'Set appropriate questionable Ptransition bits
END SUB
REM ***********************************************************************
7.2.1.2
Waiting for the Arrival of a Service Request
There are basically two methods of waiting for the arrival of a service request:
Blocking (user inputs not possible)
This method is appropriate if the waiting time until the event to be signalled by an
SRQ is short (shorter than the selected time-out), if no response to user inputs is
required during the waiting time, and if – as the main criterion – the event is abso-
lutely certain to occur.
Reason:
From the time the WaitSRQ() function is called until the occurrence of the expected
event, it does not allow the program to respond to mouse clicks or key entries during
the waiting time. Moreover, it causes program abort if the SRQ event does not occur
within the predefined time-out period.
The method is, therefore, in many cases not suitable for waiting for measurement
results, especially with triggered measurements.
The following function calls are required:
status = viEnableEvent(analyzer, VI_EVENT_SERVICE_REQ, VI_QUEUE, VI_NULL)
status = viWaitOnEvent(analyzer, VI_EVENT_SERVICE_REQ, 10000, etype, eevent)
'Wait for service request
IF (result% = 1) THEN CALL Srq
'If SRQ is recognized => subroutine for evaluation
Summary of Contents for R&S FSP Series
Page 1: ...R S FSP Spectrum Analyzer Operating Manual 1164 4556 12 06 Test Measurement Operating Manual ...
Page 24: ...R S FSP Putting into Operation 1 2 Operating Manual 1164 4556 12 06 ...
Page 72: ...R S FSP Manual Operation 3 2 Operating Manual 1164 4556 12 06 ...
Page 793: ...R S FSP Index Operating Manual 1164 4556 12 06 4 11 ...
Page 794: ...R S FSP 4 12 Operating Manual 1164 4556 12 06 ...
Page 795: ...Operating Manual 1164 4556 12 06 4 13 R S FSP ...
Page 796: ...R S FSP 4 14 Operating Manual 1164 4556 12 06 ...