7-4 HP IBASIC Supplement
Graphics and Display Techniques
Using the Display Partitions
Allocating Display Partitions
To request a display partition from the analyzer for use by an IBASIC
program, send the instrument the corresponding SCPI mnemonic.
DISP:PROG UPPer Allocates upper partition
DISP:PROG LOWer Allocates lower partition
DISP:PROG FULL Allocates full-screen partition
For example, to print a message to the upper partition area, you might
use a program segment like this:
30 ASSIGN @Hp8711 TO 800
40 OUTPUT @Hp8711;”DISP:PROG UPPer”
50 CLEAR SCREEN
60 PRINT “This is the upper partition”
To be sure that you are not writing to a partition that has not yet been
assigned, you should include a WAIT statement or, preferably, add a SCPI
query command followed by an ENTER statement to synchronize the
program with the instrument. The previous example might then look
like this:
30 ASSIGN @Hp8711 TO 800
40 OUTPUT @Hp8711;”DISP:PROGUPPer”
42 OUTPUT @Hp8711;”DISP:PROG?”
44 ENTER @Hp8711;Screen$
46 IF Screen$<>”UPP” THEN GOTO 42
50 CLEAR SCREEN
60 PRINT “This is the upper partition”
The mnemonic DISP:PROG? (line 42 above) requests the instrument to
send the current partition status. The ENTER statement on the next line
reads that status, assigns the value to the variable Screen$, and
continues.