Instrument Basic Graphics Commands; Hard Copies; Print; Initial Settings - Agilent Technologies 4396B Gpib Programming Manual

Network/spectrum/impedance analyzer
Hide thumbs Also See for 4396B:
Table of Contents

Advertisement

Each point on the graphics screen is addressable using a coordinate address as shown in
Figure 7-1. The bottom left corner is the origin (0,0) and the top right corner is the maximum
horizontal and vertical end points (393,299). The MOVE and DRAW statement parameters are
speci ed using these coordinate values. Because the aspect ratio of a graphics screen is 1, you
need not adjust the aspect ratio when drawing gures.

Instrument BASIC Graphics Commands

The analyzer's Instrument BASIC has three graphics commands; MOVE, DRAW, and GCLEAR.
Moves the pen from its current position to the speci ed coordinates.
Draws a line from the current pen position to the speci ed coordinates.
Clears the graphics screen, moves the pen from its current position to the
origin (0,0), and selects pen 1.
The total times of executing the
Note
if the pen position is not changed.

Hard Copies

Graphics hard copies can be obtained with the printing function.

PRINT

under
prints a display image on a printer. See \Copy Menu" in Chapter 8 of the
NNNNNNNNNNNNNNNNN
Copy
4
5
Function Reference.

Initial settings

When power is turned ON, the default settings are as follows:
MOVE 0,0

Example of Graphics Programming

This section describes an example of a simple program for drawing lines on the graphics screen.
Drawing a Straight Line
The following Instrument BASIC program will draw a line from coordinate (50,200) to
coordinate (300,200) on the display.
Drawing a Circle
Trying to express all graphical images using only straight lines is tedious, slow, and dicult.
This example describes a subprogram you can use to draw a circle. It can draw a circle by
passing the center coordinates and the radius as arguments to the following subroutine. This
subroutine can be used as a base for drawing arcs, setting di erent values for Theta, etc.
7-2 Program I/O
and
commands is up to 1933, even

Advertisement

Table of Contents
loading

Table of Contents