EasyManua.ls Logo

Rohde & Schwarz FSVA - 4.3.1.2 Waiting for the Arrival of a Service Request

Rohde & Schwarz FSVA
1106 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 Control
R&S
®
FSVA/FSV
1012Operating Manual 1176.7510.02 ─ 09
Console.ReadKey()
End Sub
4.3.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 signaled by an SRQ
is short (shorter than the selected timeout), if no response to user inputs is required
during the waiting time, and if – as the main criterion – the event is absolutely certain to
occur.
Reason:
From the time the viWaitOnEvent() function is called until the occurrence of the expec-
ted event, it does not allow the program to respond to mouse clicks or key entries dur-
ing the waiting time. Moreover, it returns an error if the SRQ event does not occur
within the predefined timeout period.
The method is, therefore, in many cases not suitable for waiting for measurement
results, especially when using triggered measurements.
The following function calls are required:
Status = viWaitOnEvent(analyzer, VI_EVENT_SERVICE_REQ, SRQWaitTimeout, VI_NULL,
VI_NULL)
'Wait for service request user
'inputs are not possible during
'the waiting time!
IF (status = VI_SUCCESS) THEN CALL Srq
'If SRQ is recognized =>
'subroutine for evaluation
'--------- Sweep in first Spectrum Tab and query marker --------------------
Dim Status = mbSession.WaitOnEvent( _
MessageBasedSessionEventType.ServiceRequest, SRQWaitTimeout)
'Wait for service request user inputs are not possible
'during the waiting time!
If (Status.EventType() = MessageBasedSessionEventType.ServiceRequest) Then
'If SRQ is recognized => subroutine for evaluation
Srq()
End If
Non-blocking (user inputs possible):
This method is recommended if the waiting time until the event to be signaled by an
SRQ is long (longer than the selected timeout), and user inputs should be possible dur-
ing the waiting time, or if the event is not certain to occur. This method is, therefore, the
preferable choice for waiting for the end of measurements, i.e. the output of results,
especially in the case of triggered measurements.
Remote Control – Programming Examples

Table of Contents

Related product manuals