Remote Commands
R&S
®
FSVA3000/ R&S
®
FSV3000
1204
User Manual 1178.8520.02 ─ 01
'If SRQ is recognized => subroutine for evaluation
Srq()
End If
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
Catch exp As InvalidCastException
Console.WriteLine("Resource selected must be a message-based session")
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
' Close session
mbSession.Dispose()
' Wait for end
Console.WriteLine("Press any key to end")
Console.ReadKey()
End Sub
14.15.2.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 --------------------
Programming Examples