78 Chapter 2
Agilent VEE Programming Techniques
General Techniques
General Techniques
Inside the Main VEE program, you can create logical groups of objects,
called
UserObjects. A UserObject object (called UserObject
hereafter) is created by placing a logical group of objects in a
UserObject
window. Inside the
UserObject window, you connect inputs and outputs in
the same way as the main program. The
UserObject itself is connected to
other objects in the main program with inputs and outputs, like any other
object.
The idea in developing a
UserObject is to create a unique context that
performs a useful purpose within the main program. Besides conserving
space in the main work area, you can make the program more
understandable by giving it structure.
A VEE program can contain many
UserObjects nested within the Main
program. Each
UserObject has an icon view which resides in the Main
window. To associate the icon views of the
UserObjects in the main
program with their associated
UserObject windows, name UserObjects
in their edit windows, which also names them in their associated icon view.
For example, if you name a
UserObject AddNoise, its icon window in
the Main program and the title bar on the
UserObject will both read
AddNoise. The following exercise teaches you how to create a
UserObject.
Lab 2-1: Creating a UserObject
There are a couple of ways to create a UserObject in a VEE program:
n Select
Device ⇒ UserObject from the menu bar to bring up an empty
UserObject icon in the Main window, and add objects to it. If you
double-click the
UserObject icon, it is displayed in open view, as
shown in Figure 2-1.
n Select objects within a program and then create a
UserObject from
them, by selecting the objects and clicking
Edit ⇒ Create
UserObject
.