Chapter 8 297
Using Agilent VEE Functions
Using Functions
2. Compiled Functions
q To create a compiled function, you work outside of VEE using a
compiled language. You then put the functions into a library, such as
a DLL.
q To link a compiled function to a program, you use the
Import
Library
object, which links the library to VEE at run time. (For a
more detailed discussion, refer to Chapter 11, “Optimizing Agilent
VEE Programs.”).
q To call a compiled function, you use the
Call myFunction object
or write an expression within a VEE object.
3. Remote Functions
q Similar to
UserFunctions, except that they run on a remote host
computer connected on your network.
The Differences Between UserObjects and
UserFunctions
In previous chapters, you have already created and used UserObjects. The
reason that VEE provides both
UserObject and UserFunction is
because the two have different characteristics and can therefore be used for
different purposes. Here are the differences between a
UserObject and a
UserFunction:
A
UserObject (located in Device ⇒ UserObject) is an object you
define that may be used just like any other object in VEE. You program a
UserObject like a subprogram but it graphically remains on the screen. If
you want to use it elsewhere in a program, you must clone it and maintain all
copies. Note that if you clone a
UserObject many times, it makes the
program larger and slower to load. If you add a feature to one
UserObject,
you would need to add the same feature to all the other
UserObjects if you
want them to remain identical.
With a
UserFunction (located in Device ⇒ UserFunction), there is
just one copy of the subroutine in memory, and it is only displayed
graphically in the workspace in its own window if you want it to be.