Learning the Basics

Controlling Program Timing

trace information is needed, a TS command must be executed after these commands are executed. In all cases, executing TS invokes at least one entire sweep. However, TS invokes more than one sweep when certain commands are active, such as video averaging (VAVG) or marker tracking (MKTRACK).

Program timing can also be controlled with the RQS, DONE, and WAIT commands. The RQS command interrupts the computer operation when the analyzer has attained a prede￿ned state. The DONE command allows the program to hold o￿ the execution of subsequent commands until the OSA returns a \1" in response to the query. The WAIT command suspends program operation for a speci￿ed time. TS, RQS, and DONE are used often to synchronize data acquisition or the analyzer state with other events. The WAIT command, on the other hand, is used to improve human interface with the program. The program examples in this manual use WAIT to control the duration of displayed messages, or use WAIT to delay program execution to give you time to observe events on the display.

1-20