Language Reference

DWINDOW

Example Draw Y = X2 on the analyzer display.

180

CLEAR 723

Initialize analyzer .

190

OUTPUT 723;"IP;"

 

200

OUTPUT 723;"CLRDSP;"

Clear graphics from memory .

210

OUTPUT 723;"TRDSP TRA,OFF;"

Turn o￿ trace A.

220

OUTPUT 723;"OR 600,550;"

Set origin to (600,550) in current scale

 

 

units. (CLRDSP sets units of X and Y axis

 

 

from 0 to 1000.)

230 OUTPUT 723;"DWINDOW 400,400,-10,10,0,100;"

De￿ne a graphics window that is square and has sides 400 units long, in units determined by CLRDSP above . The window itself contains its own scale . The minimum and maximum value for its X axis are 010 and 10. The minimum and maximum values for its Y axis are 0 and 100.

240

OUTPUT

723;"PU;PA

010,0;"

Outline the window .

250

OUTPUT

723;"PD;PA

010,100,10,100,10,0, 010,0;"

260

OUTPUT

723;"VARDEF

XXIS, 010;"

 

Assign 010 to a user-de￿ned variable .

270

OUTPUT

723;"VARDEF

YAXIS,0;"

 

Assign 0 to a user-de￿ned variable.

280

OUTPUT

723;"PU;PA

010,100;PD;";

 

Place the pen at (010,100) in window

 

 

 

 

 

 

units.

290

OUTPUT

723;"REPEAT;";

 

Begin repeat loop.

300

OUTPUT

723;"ADD

XXIS,XXIS,1;";

 

Add 1 to XXIS.

310

OUTPUT

723;"MPY

YAXIS,XXIS,XXIS;";

Set YAXIS equal to (XXIS ).

320

OUTPUT

723;"PA

XXIS,YAXIS;";

 

Draw square function point-by-point.

330

OUTPUT

723;"UNTIL

XXIS,EQ,10;"

 

End repeat loop when XXIS equals 10.

340

OUTPUT

723;"PU;PA

02,80;"

 

Place pen at (02,80) in window units.

350

OUTPUT 723;"DWINDOW OFF;"

 

Turn o￿ the window. Window param-

 

 

 

 

 

 

eters are retained in memory. The fol-

 

 

 

 

 

 

lowing TEXT command does not oper-

 

 

 

 

 

 

ate when the window is on.

360

OUTPUT 723;"TEXT$Y=X"

 

Write text at current pen position.

370

OUTPUT 723;CHR$(130);"$;"

 

 

Description The DWINDOW command creates a new coordinate system that repositions, magni￿es or reduces graphics on the analyzer display. This new coordinate

system is called a graphics window. DSPLY, GRID or TEXT cannot be executed after DWINDOW ON . DWINDOW de￿nes the size and scale of the graphics window. The size of the window is determined by X Length and Y Length, which are speci￿ed in the current scale units. (Scale units are 0 to 1000 for both X and Y unless speci￿ed otherwise with the SCALE command.) The scale of the coordinate system within the window is determined by X Minimum, X Maximum, Y Minimum, and Y Maximum.

7-129