296 Chapter 8
Using Agilent VEE Functions
Using Functions
Using Functions
Like many programming languages, VEE uses functions to create
subprograms that perform specific tasks. The lab exercises in this chapter
describe how to create, call, and edit VEE user-defined functions. You will
also learn how to create libraries of functions, which can be merged into
programs in the development phase or imported at runtime.
Defining an Agilent VEE Function
There are three types of user-defined functions in VEE. The overview of
each type of function is as follows:
1.
UserFunctions
q To create a
UserFunction, you select Device ⇒
UserFunction
, or click Edit ⇒ Create UserFunction with
several objects selected.
q To call a
UserFunction from different places in a program, you use
the
Call myFunction (Device ⇒ Call) object or use an expression
within an object (from
Formula, for example). You can also generate
call objects in the Main program from the
UserFunction, using the
UserFunction object menu and selecting choices such as
Generate ⇒ Call.
q To edit a
UserFunction, you click on Edit ⇒ Edit
UserFunction...
and select the appropriate UserFunction from
the list box presented.
q To transfer
UserFunctions from one program to another, you
merge the
UserFunctions during program development or import
them at runtime (
Device ⇒ Import Library).