FAQs from Rohde & Schwarz

Waiting for Completed Sweep to Read out Trace Data

Question

How do I know when a sweep is completed? After completion of the sweep, I want to read out the trace via the GPIB.

Answer

We suggest that you use the Operation Complete bit.

The example below shows how the completion of a sweep with a sweep time of 15 seconds is detected

and Trace 1 is read out.

FSP: *RST

FSP: SYSTEM:DISPLAY:UPDATE ON

FSP: INIT:CONT OFF

FSP: SWE:TIME 15

FSP: *CLS

REM The *OPC command initiates the Operation Complete bit

FSP: INIT;*OPC

REM The next line will be repeated until the Operation Complete bit is set

WHILE FSP: *ESR? <> 1

REM The next line reads out the trace data of Window1/Trace1

FSP: TRAC1? TRACE1