416 Chapter 11
Optimizing Agilent VEE Programs
Overview of Compiled Functions
Guidelines in Using Compiled Functions
When you use compiled functions in a VEE program, follow these
guidelines:
n Call and configure a
Compiled Function just as you would call a
UserFunction. You can either select the desired function using
Select Function from the Call object menu, or you can type in the
name. In either case, provided VEE recognizes the function, the input
and output terminals of the
Call Function object are configured
automatically. The necessary information is supplied by the definition
file. (VEE will recognize it if the library has already been imported.)
n Reconfigure the
Call input and output terminals by selecting
Configure Pinout in the object menu. For either method, VEE
configures the
Call object with the input terminals required by the
function, and with a
Ret Value output terminal for the return value of
the function. In addition, there will be an output terminal corresponding
to each input that is passed by reference.
n Call the
Compiled Function by name from an expression in a
Formula object or from other expressions evaluated at run time. For
example, you could call a
Compiled Function by including its name
in an expression in a
To File transaction.
Note Only the Compiled Function’s return value (Ret Value in the Call
object) can be obtained from within an expression. If you want to obtain
other parameters returned from the function, you will have to use the
Call
object.
n Delete a library of
Compiled Functions by using the Delete
Library
object in the Device menu. Using the Import Library,
Call, and Delete Library objects, you can shorten the program load
time and conserve memory by importing and deleting them when the
program has finished calling them.