AnsweredAssumed Answered

S21 data is read out before sweep is complete.

Question asked by tjzeta on Jan 8, 2009
Latest reply on Jan 8, 2009 by Dr_joel
I am trying to fetch an S21 measurement off an E5071B through a socket connection.  In my loop, I configure the analyzer to perform a slow sweep, and then follow up with a data fetch.  I have set up for single shot mode, but the problem is when I read the data, the sweep is not complete.

I don't want to just force a SLEEP function.  I have tried various things with no luck.  I would like to be able to read back a status message telling me the sweep is done before I read the data.  When in the CONT OFF mode, it does not accept a TRIG.

# Here is a snippet of the setup code... each string is concatenated. 
   ":CALC1:PAR1:SEL;" .
    ":DISP:WIND1:SPL D1;" .
    ":SENS1:BAND 1e3;" .
    ":CALC1:FORM MLOG;" .
    ":CALC1:PAR1:DEF S21;" .
    ":INIT1:CONT OFF;*WAI;*OPC?;" .
# The "*OPC?" so I hit it with another trigger...

# This also returns immediately, but sweep not done. I am forced to put a sleep here
    sleep N.

# Now read the data.