
Operating Manual 1302.6163.12 - 03
7.3
R&S ESU
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
Содержание 1129.7246.03
Страница 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 ...