300
S:\HP8924C\USRGUIDE\BOOK\CHAPTERS\ibasic.fb
Chapter 6, IBASIC Controller
PROGram Subsystem
Syntax
PROGram[:SELected]:WAIT?
Example
OUTPUT 714;"PROGram:SELected:WAIT?"
ENTER 714;Dummy
or
OUTPUT 714;"PROG:WAIT?"
ENTER 714;Dummy
Consider the following example where the user wishes to determine, from an
external controller, if the IBASIC program running on the Test Set has finished
executing. The example programs show how this might be accomplished with and
without using the :WAIT? query command.
Example BASIC program without using the :WAIT? query command
10 OUTPUT 714;"PROG:STAT RUN"
20 LOOP
30 OUTPUT 714;"PROG:STAT?"
40 ENTER 714;State$
50 EXIT IF State$="STOP" OR State$="PAUS"
60 END LOOP
70 DISP "IBASIC program not running."
80 END
Example BASIC program using the :WAIT? query command
10 OUTPUT 714;"PROG:STAT RUN"
20 OUTPUT 714;"PROG:WAIT?"
30 ENTER 714;Dummy !Program will hang here until IBASIC program stops
40 DISP "IBASIC program not running."
50 END