User`s guide

Using Agilent VEE Functions Chapter 9
VEE User’s Guide 333
To call a compiled function, you use the Call myFunction
object or write an expression within a VEE object.
3 Remote Functions
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. Otherwise, it is stored to be called from the Call
object or any other expression field. Changes to a UserFunction
will be inherited by all instances in the program that call that
UserFunction. You can also create libraries of UserFunctions
for more code re- use.
Lab 9-1: UserFunction Operations
This exercise describes how to create a UserFunction named
ArrayStats, which will accept an array, calculate its maximum
value, minimum value, mean, and standard deviation, and put
the results on its output pins.