Hi Ruslan,
I have not programmed the SRS785 before, but I took a look at the
Operating Manual and Programming Reference for this device.
Quoted from page 5-122:
DSPS ? {i}
The DSPS? command queries the value of the Display status word. The value is returned as a decimal number from 0 to 65535. The DSPS? i command queries the value (0 or 1) of bit i (0-15). DSPS? clears the entire word while DSPS? i clears just bit i."
Shown below are Bit/Name/Set When for each of the 16 Display Status Word bits.
Quoted from page 5-127
0 / NEWA / New data is available for DisplayA
1 / AVGA / DisplayA linear average has completed
2 / STLA / New settled data is available for DisplayA
3 / LIMA / DisplayA has failed a limit test
4 / SSA / Swept Sine sweep has finished
5 / WFA / Display A 1-shot Waterfall has finished
6 / WFD / Display A Waterfall has finished drawing
7 / unused
8 / NEWB / New data is available for DisplayB
9 / AVGB / DisplayB linear average has completed
10 / STLB / New settled data is available for DisplayB
11 / LIMB / DisplayB has failed a limit test
12 / SSB / Swept Sine sweep has finished
13 / WFB / Display B 1-shot Waterfall has finished
14 / WFB / Display B Waterfall has finished drawing
15 / unused
The Display status bits stay set until read by DSPS?. They are also cleared by the *CLS command. Use DSPE to set bits in the Display status enable register. The AVG, STL, LIM and SS bits are only updated when new data is available for the display (no faster than 8 Hz). Always test for NEWA or NEWB in the status word along with AVG, STL, LIM or SS. The status updates for the two displays may not be exactly synchronous. Always test the DisplayA status bits separately from the DisplayB status bits. For example, to wait for both displays to finish averaging, do NOT test the Display status word for both AVGA and AVGB simultaneously. The AVGA and AVGB bits may not be set at the same time. Test for AVGA and AVGB separately and wait until both have occurred.
According to the manual, you should "test the DisplayA status bits separately from the DisplayB status bits...and wait until both have occurred." If I understand correctly, I would look at bits 0 and/or 8 individually, with
DSPS? 0 and
DSPS? 8 and wait until they come back true. You may have to look at other bits depending on the last operation you sent to the SRS785. For example, if you told the analyzer to do a linear average, you should wait on bits 1 and/or 9 to go true. I hope this helps.