v5.0 / 1 of 23 / 01 sep 99 / gvg
* This chapter provides a quick overview of VEE's capabilities and operation.
* HP VEE is a graphical programming environment that is optimized for
scientific and engineering applications, particularly in test and
measurement. Users write programs by connecting blocks together, much as if
they were creating a flowchart:
VEE includes objects for:
-- and for all the other elements needed to construct a program.
The user can construct user interfaces with display objects such as
thermometers, fill tanks, and "alarm light" indicators; objects to display
bitmaps; input objects such as toggle, rocker, and slide switches; and
easy-to-use pop-up dialog controls.
The user can also build his or her own "UserObjects" from other VEE elements,
convert them into "UserFunctions", and create libraries of such
UserFunctions. Windows DLLs can also be written for VEE for Windows to add
new functions.
VEE can (almost transparently) use a wide variety of data types such as
waveforms and complex numbers. You can easily examine the data "containers"
that VEE transfers the data in to inspect their contents. VEE also includes
debugging tools that allow you to trace the execution and data flow within a
VEE program, examine the data on lines and input pins, and set program
breakpoints. Extensive online help is built into VEE.
VEE includes a "sequencer" that is useful for running sets of tests on an
external device; the sequencer has adequate smarts to allow tests to be run
conditionally on the results of earlier tests, and can generate logging text
output to indicate the results of the tests.
Very importantly, VEE provides several levels of instrument control:
"instrument driver" panels that simulate the front panel of an instrument
allow front-panel access to an instrument and allow simple configuration;
"component drivers" allow performing individual functions in a simple
fashion; and "direct I/O" provides command-level control over an instrument.
VEE provides an interface "bus I/O monitor" to allow users to track and debug
interface transactions.
I/O capabilities include access to a wide variety of HP and National
Instruments HPIB and GPIB cards, GPIO card support, access to the HP LAN-HPIB
gateway, direct VXI backplane support (on HP machines only), and support for
multiple RS-232 ports.
The current 5.01 version of VEE provides excellent support for VXI Plug&Play
drivers; LAN Socket communications; VEE-to-VEE remote procedure calls (as
well a C API to allow VEE to be called from C programs, and the ability to
use Microsoft ActiveX Automation and Controls. (The VEE 4.X version had
a tool that in principle allowed VEE to operate as an ActiveX Control, but
this item did not operate well, and is expected to be replaced by a better
scheme in a future VEE version.)
* VEE cannot create stand-alone executable programs. An end user has to have
a VEE Run-Only version to run VEE programs. As of VEE 4.0, this Run-Only
version was provided with the VEE product, and the end user can duplicate
that Run-Only version and distribute it as needed.
VEE 4.X and above by default runs in a "compiled" mode that provides faster
performance than earlier versions of VEE. The compilation refers to
conversion of VEE objects into an intermediate form, and does not indicate
that VEE can generate stand-alone programs. However, the unlimited license
for the Run-Only version makes that no major issue, since the Run-Only allows
VEE programs to run in a highly transparent fashion.
VEE is perfectly compatible between HP-UX and Windows for the same revision
level of VEE. The only difference is that under HP-UX the lines of a source
file end in LF, while under Windows they end in CR-LF, but this is true in
general for text files moved between the two environments.
Of course, if you have platform-specific objects in the program -- To/From
Named Pipe under HP-UX, To/From DDE on Windows -- they won't work.
However, VEE is not backward-compatible between revisions. Depending on the
revisions you jump from, you will either have slight problems, or you won't
load at all. Fortunately, you can always load programs from older revisions
into later ones, just not the reverse.
* The HP VEE environment appears as follows:
The main menu offers the following facilities:
The Iconic Toolbar allows you to select some of the most useful menu entries
in a swift fashion. You can find out the function of each icon by resting
the mouse cursor on it for a second, and it pops up a handy "tooltip" banner.
Of particular note in this set of menu entries is the "Default Preferences"
tabfolder (in the "File" menu), the "Select Function" dialogue (in the
"Device" menu), and the "Instrument Manager" dialogue (in the "I/O" menu).
The "Default Preferences" tabfolder allows you to set general VEE
configuration preferences:
* You construct VEE programs by selecting objects from the menus and then
wiring them together. VEE objects fall into these categories:
* Each object has an "open view" (in which all its details are accessible by
the programmer) and an "icon view" (in which all the details are hidden and
the object is represented only by a simple icon).
Each object also has an "object menu", accessed by clicking on the little
square ("toaster box") in the upper-left corner of the open view of the
object; it provides a set of functions for configuring the object, some of
which are common to all objects, and some of which are unique to each
particular type of object and support its specific functions. For a baseline
example, consider the object menu for the Formula box:
VEE objects have the general architecture:
The sequence-out pin is activated when the object has completed its function.
The meaning of "completion" follows a somewhat obscure set of rules, however,
and is not always intuitive. VEE "propagation rules" are a devious and not
entirely obvious subject that require practice with the product to obtain a
good grasp of it.
The sequence-in and sequence-out pins allow you to impose synchronization on
the elements of a VEE program. They are quite useful but a skillful VEE
programmer will organize his or her program to follow data flow, and the
sequencing pins should not be overused.
Note that some objects can also have "control" input pins as opposed to
"data" input pins. Control pins cause an immediate action when strobed.
You can change the names of data I/O pins on an object to whatever you like
and (in most cases) constrain the data types they accept.
You obtain objects to build your VEE program from the pulldown menus, or
clone existing objects in your model and modify them appropriately. You set
up the wiring in VEE by performing a click-and-drag operation from output
pins to input pins.
Data is transferred over VEE wiring using "containers", which can be
conceptualized as a little box that stores various types of data.
Traditional programming languages store data in variables; while you can
create global variables and define fixed arrays, in general in VEE you create
data dynamically without worrying about declarations, allowing objects to
generate containers that are then manipulated by other objects which generate
containers in turn. This sounds intimidating, but actually it's usually
pretty simple.
VEE supports a wide range of data types, such as Int32, Real, Complex, Polar
Complex, Waveform, Spectra, Coordinates, and Enumerated. Arrays of all data
types are supported. VEE tends to be extremely flexible in handling
conversions between data types transparently (though this can be a nuisance
on occasion), and many of the math operations are also extremely flexible on
what types of data they support.
Note that containers do not necessarily need to store any data. Empty
("nil") containers are perfectly legal in VEE.
* The VEE control flow objects are, for the most part, similar to those you
would find in other languages. There are a set of If objects, all of the
form "If A == B", "If A != B", and so on, which are really only specialized
cases of the generic If-Then-Else object -- which, unlike the If objects, can
handle more than two inputs and can be configured to handle an indefinite
number of "ElseIf" clauses.
The looping objects allow you set up loops based on a simple count (Count
object), counts with user-specified increment and direction (For Range),
indefinite loops (Until Break), or loop on specified interval (On Cycle).
Note that there is also a Next object to force an iteration of a count and a
Break object to force the next iteration of an Until Break.
The Delay object allows you to force the program to wait for a specified
interval of time.
There are a set of objects that force exit of a program (Stop), thread (Exit
Thread), or UserObject (Exit UserObject). You can also use Raise Error to
force execution of an error.
The propagation control objects are a little different from commands you are
likely to see in other languages and in fact are more similar to devices you
might see in a digital electronic system (or, to an extent, in a toy train
setup). The Junction object is very useful; it allows you to route two or
more inputs onto the same output. The most common use of the Junction is for
setting objects to initial values.
The others are less commonly used (and generally are not necessary): the Do
object forces sequential execution of one path and then another; the Gate
object switches data between its input and output pin on or off depending on
the setting of a control line; and the Sample & Hold stores data when strobed
by an enabling signal.
The Shift Register and Demultiplexer objects are also familiar from digital
electronics: the Shift Register allows you to queue up data items (by
default only two, but you can configure it to handle more), and the
Demultiplexer allows you to route one input to one of several outputs as
selected by a control input.
* VEE allows you to specify constants in the simpler data types (Text,
Integer, Real, Coord, Complex, PComplex, Date/Time) and define record
constants; you can use the Config entry on the object menu for these
constants to set up arrays of constants. These constants can serve double
duty as input devices.
The Allocate Array object can be used to define a large fixed array if one is
required, though it is rarely necessary to allocate arrays. It's generally
easier to create them dynamically using a Collector object. VEE's
architecture encourages such dynamic variable usage. You can also specify an
initial value for the array if necessary.
The Access Array and Access Record objects allow you to read and set elements
in arrays and records. You can also quite easily use a Formula box to read
such elements as well, so you don't always need to use these objects.
There are objects to allow you to build and unbuild composite data -- Coord,
Complex, PComplex, Waveform, Arb Waveform, Spectrum, and Record. Virtual
sources allow you to create waveform data of standard types -- sine, square,
triangle, ramp, pulse, or noise waveforms.
The Declare Variable object and other variable objects allow you to create,
access, or delete global or local variables (if you simply set a variable you
get a global variable).
The Collector object -- one of VEE's most useful tools -- allows you to take
a set of inputs and assemble them into an array; the inputs are assembled
until the Collector's XEQ pin is strobed, and then it outputs an array. For
example, the following program assembles the numbers 0 through 9 into a
ten-element array.
The Concatenator is a simplified version of the Collector, used to create a
one-dimensional array from scalar elements. This can be used to create
arrays from multiple objects, or add elements to existing arrays.
* You can use VEE objects to build functions that can be called (using the
Call Function object) from other elements of the VEE program. You can store
sets of such UserFunctions together and dynamically load and unload them
during the execution of the program.
Building a UserFunction is a simple process (as of VEE 4.0). All you have to
do is select "Device->UserFunction" to get a window that you can then add
functions and pins to:
You can then use the UserFunction's object menu to give it a name -- say,
"Doubler". Then, if you kill the window off, you'll still be able to
retrieve it through the entry for "Doubler" in the Program Explorer.
To make use of a UserFunction, just select "Device->Call". You get a Call
Function object, and its object menu will allow you to select the function
you want (in this case, "Doubler"). You get:
Suppose you have a UserLibrary named "lib1.vee". You can then use the "File"
menu's "Merge Library" (not "Merge", "Merge Library" -- "Merge" adds in a
separate program) to add the UserFunctions to a program you are working on.
You can add as many UserLibraries as you like in this way, as long as you
don't try to add two UserLibraries that contain a function with the same name
(VEE doesn't like that too much).
However, this merges the UserFunctions permanently into your VEE program.
You can only get rid of them by individually deleting them. If you want to
dynamically load UserLibraries, you can use the Import Library object:
* Note that you can make independent panel views with UserFunctions that
allow you to display different user interfaces as you require them. This
capability is discussed in later chapters.
* VEE strongly depends on the Transaction I/O model and it is valuable to
explore this concept in more detail. A transaction object allows you to
perform a list of conversions on data. For a simpler example, consider the
To String object. Bring it up and all you get is:
In this form, all this does is allow you to convert an input value to a text
output. However, you can select a different option by clicking on the WRITE
TEXT field above to get the following dialog:
The number of possible combinations of format options gets very large and
cannot be detailed here. You can add more pins and multiple transactions to
a transaction I/O box, and add text and math operations (or your own
UserFunction operations) to the data field.
Other transaction objects allow READ transactions and some offer EXECUTE
transactions that perform interface-specific actions such as CLEAR. A
particularly important transaction object is the To/From File object set that
allows you to perform transaction I/O with a file.
* The core of VEE's math functionality is the Formula box. All VEE math
functions actually boil down to the Formula box, and it can contain
combinations of the standard VEE math functions (along with references to
variables and UserFunctions). Standard math operations include:
Advanced math functions include:
* Data constants can be used as simple user-input devices, though
error-handling can be tricky if the user provides an incorrect input. Pop-up
dialogs can be used if that is a problem, as one of the following sections
will discuss.
As you should now know by now, VEE offers two elementary button objects, the
Start button -- which allows you to initiate an action -- and the OK button
-- which allows you to hold off an action until it's selected.
VEE also provides a set of Toggles objects. The Toggle objects define
two-position switches, and generate a 1 or 0 depending on the switch setting.
You can not only select from a variety of useful predefined Toggle
appearances -- a simple button or check box (its only appearances in versions
before 3.X), or Paddle, Rocker, or Slide switches in both vertical and
horizontal orientations -- but you can make a custom switch by providing it
with two bitmaps, one for the "on" state and one for the "off".
The various List, or "Selection Control" objects -- whose variety was also
expanded in VEE 3.X -- allows selection from a list and returns the list
selection. The List objects can be configured as a set Radio Buttons, Cyclic
Button, List, Drop-Down List and Pop-Up List, as specified by the object
menus.
The Slider objects allow a user to set either Integer or Real values using a
mouse. Integer and Real Knob objects were added in VEE 3.1, but they are
really just modified versions of the Sliders. The Knobs provide you with a
simulated front-panel knob that you can "twirl" by clicking on the direction
you want the knob to go with your mouse, or by grabbing the hairline
indicator and moving the knob around with a click-and- drag operation.
VEE 3.X introduced pop-up dialog objects that make it simple to get user
input. The elementary Message Box allows you to pop up standard
Windows-style alert dialogs; it is configured with an object with the format:
* VEE has two simple output objects -- the Alphanumeric and Scrolling
Alphanumeric objects -- to allow elementary display of data. A Label object
was added in VEE 3.X. All this does is present a string of text, but when
placed on the VEE panel view it merges into the panel seamlessly, allowing
the text to be "integrated" into the user interface. VEE 3.X also introduced
a Picture object that allows you to display a bitmap file.
VEE also has a nice set of indicator objects. VEE versions before 3.X had a
single indicator object -- the Meter. VEE 3.X added four more indicators:
FillBar, Thermometer, Tank, and ColorAlarm. The FillBar is a simple bar
indicator that can be set to provide different colors for three ranges; the
Thermometer is just a FillBar with a bulb on the bottom, and the Tank is a
fat FillBar. The ColorAlarm simply changes color when the inputs to it
change value.
* VEE includes wide variety of graphical displays: XY Trace, X versus Y
Plot, Strip Chart, Waveform, Spectrum -- in Magnitude Spectrum, Phase
Spectrum, Polar, or Smith formats -- Polar Plot, or Complex Plane. These
objects are simple to use, as long as you provide the proper data to them,
but they have a large number of options and can be tricky to deal with.
* VEE provides many facilities for dealing with instruments. The simplest
I/O tool is the Direct I/O (DIO) object, which performs transaction I/O with
a remote device:
Interface Operations objects are also transaction objects, but they perform
transactions on an interface and support operations specific to a particular
type of interface. Interface and Device Event objects allow a VEE program to
wait for an event (such as an HPIB service request or serial data valid) from
an instrument.
Traditionally, VEE instrument I/O has been strongly oriented toward dealing
with instruments using instrument drivers, in which you have a software front
panel that simulates the front panel of an instrument. For example, the
instrument driver front panel for 3478 DMM would appear as follows:
If you only want to set or read one component, you can use a so-called
"component driver" instead:
Note that you can add "Address", "Timeout", and "Host" pins to DIO objects
(and instrument drivers) to change the instrument address or timeout "on the
fly". If you bring out one or both of these pins on a single ID or DIO
object, it will change the address or timeout for all IDs and objects for
that particular device.
* VXI Plug&Play Drivers actually resemble DIO objects more than they do
Classic Instrument Drivers. Bring one up and you get:
* Given VEE objects there should be some reasonable approach to using them:
[1.1] WHAT IS HP VEE?
[1.2] VEE USER INTERFACE
[1.3] VEE FUNDAMENTALS
[1.4] VEE CONTROL FLOW & DATA OBJECTS
[1.5] USERFUNCTIONS & USERFUNCTION LIBRARIES
[1.6] TRANSACTION I/O
[1.7] VEE MATH FUNCTIONS
[1.8] VEE INPUT, DISPLAY, & OUTPUT OBJECTS
[1.9] VEE DEVICE I/O
[1.10] COMMENTS ON VEE PROGRAMMING
[1.1] WHAT IS HP VEE?
+--------------------------------+
| X vs Y Plot |
+-------+------------------------+
+-------------------->| XData | * |
| | Any | |
+-----------+ | | | |
| For Count | | +-------------+ | | * |
+-----------+--+-->| Accumulator +-->| YData | |
| 255 | +-------------+ | Any | |
+-----+-----+ | | * |
| | | |
| | Auto | * |
+----------------------------->| Scale | * |
| Any | * |
+-------+------------------------+
Once the VEE program is complete, the user can create a "panel view" to hide
the implementation details and provide a simple user interface.
+-------------------------------------------------------------------------+
| +----------------------------------+ |
| | X vs Y Plot | |
| +----------------------------------+ |
| | * | |
| +-----------+ | | |
| | for count | | * | |
| +-----------+ | | |
| | 255 | | * | |
| +-----------+ | | |
| | * | |
| | | |
| | * | |
| | | |
| | * | |
| +----------------------------------+ |
+-------------------------------------------------------------------------+
A proficient VEE programmer can use VEE "objects" to greatly simplify tasks
such as instrument control, building user interfaces, and test sequencing.
[1.2] VEE USER INTERFACE
+-------------------------------------------------------------------------+
| HP VEE [_][ ][x] |
+-------------------------------------------------------------------------+
| File Edit View Debug Flow Device I/O Data Display Window Help |
+-------------------------------------------------------------------------+
| [<iconic toolbar>] |
+-------------+-----------------------------------------------------------+
| <Program | +-------------------------------------------+ |
| Explorer | | * Main | |
| tree> | +-------------------------------------------+ |
| | | | |
| | | | |
| | | | |
| | | <vee program> | |
| | | | |
| | | | |
| | | | |
| | | | |
| | +-------------------------------------------+ |
| | |
| | <workspace> |
| | |
+-------------+-----------------------------------------------------------+
The user interface offers a main menu (with a complementary iconic toolbar),
a workspace where the main VEE program and UserFunctions are created, and a
Program Explorer that provides a file-manager-like "browser" to keep track of
all the elements in the workspace.
+-----------------------------------------------------------+
| Default Preferences |
+-----------+-----------+-----------+-----------+-----------+
| General | Colors | Fonts | Number | Printing |
| +-----------+-----------+-----------+-----------+
| +- Environment ------------------------------+ |
| | [x] Auto Line Routing | |
| | [x] Delete Globals At Prerun | |
| | [ ] Save Default Colors/Fonts with Program | |
| +--------------------------------------------+ |
| |
| +- Debug Animation ------------+ +- Trig Mode ---+ |
| | <*> Data & Execution Flow | | <*> Degrees | |
| | < > Data Flow only | | < > Radians | |
| | < > Execution Flow only | | < > Gradians | |
| | Data Flow Rate: [ 6 ] | | | |
| +------------------------------+ +---------------+ |
+-----------------------------------------------------------+
| [ OK ] [ Save ] [ Reset ] [ Cancel ] [ Help ] |
+-----------------------------------------------------------+
The "Select Function" allows you to access a wide range of math functions:
+--------------------------------------------------------------------+
| Select Function [x]|
+--------------------------------------------------------------------+
| Type Category Name |
| +-------------------------+ +------------------+ +---------------+ |
| | Operators | | <All> | | concat | |
| | Built-in Functions | | Array | | init | |
| | Local User Functions | | Bessel | | product | |
| | Imported User Functions | | Bitwise | | rotate | |
| | Compiled Functions | | Calculus | | sort | |
| | | | Complex Parts | | sum | |
| | | | Data Filtering | | totSize | |
| +-------------------------+ +------------------+ +---------------+ |
| concat(x,y) |
| |
| [ Returns concatenated containers. ] |
| |
+--------------------------------------------------------------------+
| [ OK ] [ Cancel ] [ Help ] |
+--------------------------------------------------------------------+
Instrument configuration tasks are provided through the "Instrument Manager":
+------------------------------------------------------------+
| Instrument Manager [x]|
+------------------------------------------------------------+
| +- Instrument List -----------------+- Configuration ----+ |
| | ^| | |
| | My Configuration | [ Add ] | |
| | | | [ Delete ] | |
| | +- GPIO12 | [ Edit ] | |
| | | | | [ Refresh ] | |
| | | +- GPIO(@12) | | |
| | | +- Get Device -------+ |
| | +- HP-IB7 | | |
| | | | | [ Direct I/O ] | |
| | | +- HP33120(@710) | [Plug&Play Driver] | |
| | | +- HP34401(@722) | [Component Driver] | |
| | | | [ Panel Driver ] | |
| | +- Serial9 v| | |
| +-----------------------------------+--------------------+ |
| [ Save Config ] [ Cancel ] [ Help ] |
+------------------------------------------------------------+
[1.3] VEE FUNDAMENTALS
+-----------------+
| Formula |
+-----------------+----+
| Restore | Bring object to full size.
| Move | Move object.
| Size | Change object size (can use resize border also).
| Minimize | Collapse object to icon.
| Clone | Make a copy of the object.
| Help | Get help on the object.
+----------------------+
| Edit Properties... | Set object properties.
| Edit Description... | Brings up a box to allow adding a comment.
+----------------------+
| Add Terminal | Add control or data terminal.
| Delete Terminal | Delete terminal.
+----------------------+
| Cut | Destroy object.
+----------------------+
Selecting "Edit Properties" gives a tabfolder much like that of the main VEE
"Edit Default Preferences" dialogue, to allow you to set various parameters
for the individual object (which ones varies from object to object but
generally includes fonts, colors, and so on). The menu entries for adding
and deleting pins are particularly important. You can add additional input
pins, output pins, control pins, and error pins.
sequence-in pin
|
+--+--+
data-in pin(s) --->| +---> data out pin(s)
+--+--+
|
sequence-out pin
In general, VEE is a "dataflow" architecture, in that an object "fires"
(generates an output) when all its inputs have been satisfied. The exception
is when the sequence-in pin is used; it will force outputs unconditionally
when strobed.
[1.4] VEE CONTROL FLOW & DATA OBJECTS
+----------------+
| For Count (10) +----->+-----------+
+--------+-------+ | Collector +-->
| +-->+-----------+
| | XEQ
+----------+
This is in general how you create arrays in VEE. A Collector can collect
pretty much any sort of data, including arrays. The Sliding Collector is
similar except that you can specify a particular array size. When that
number of data elements is collected, an array of that size will be output.
[1.5] USERFUNCTIONS & USERFUNCTION LIBRARIES
+-------------------------------------------------------+
| UserFunction1 |
+---+-----------------------------------------------+---+
| | | |
| | +------------+ | |
| | | Formula | | |
| | +------------+ | |
| A +---------------->| 2 * A +--------------->| X |
| | +------------+ | |
| | | |
| | | |
| | | |
+---+-----------------------------------------------+---+
+-----------------------+
| Call Doubler |
+---+---------------+---+
| A | Function Name | X |
| | [ Doubler ] | |
+---+---------------+---+
You can add more in the same fashion. Once you have created a set of
UserFunctions you can then delete any Call Function objects and save the
result to a file as a UserLibrary.
+------------------------------------------+
| Import Library |
+------------------------------------------+
| Library Type [ User Function ] |
| Library Name [ lib1 ] |
| File Name [ LIB1.VEE ] |
+--------------------+---------------------+
|
+-----------+-----------+
| Call Doubler |
+------+ +---+---------------+---+ +-------+
| 2 +-->| A | Function Name | X +-->| 1.414 |
+------+ | | [ Doubler ] | | +-------+
+---+-------+-------+---+
|
+--------------+-------------+
| Delete Library |
+----------------------------+
| Library Name [ lib1 ] |
+----------------------------+
This little program loads the LIB1.VEE UserLibrary, executes a function out
of it, then deletes it when it is done. (The "Library Name" -- "lib1" in
this case -- is an arbitrary handle for the program to cross-reference the
library, you can make it anything you like.) You can load multiple libraries
in the same program and delete each when you please. Again, the libraries
cannot have two functions with the same name.
[1.6] TRANSACTION I/O
+--------------------------------------------------+
| To String |
+---+-------------------------------------+--------+
| |[WRITE TEXT a EOL ]| |
| A | | result +-->
| | | |
+---+-------------------------------------+--------+
+------------------------------------------------------+
| I/O Transaction |
+------------------------------------------------------+
| [ WRITE ] [ TEXT ] [ a ] |
| [ REAL FORMAT ] [ DEFAULT FIELD WIDTH ] |
| [ /- ] [ STANDARD ] [ ALL SIG DIGITS ] [ EOL ON ] |
| |
| |
| [ OK ] [ NOP ] [ Cancel ] |
+------------------------------------------------------+
This dialog box allows you to select a wide range of options. For WRITE TEXT
as shown above, you could select the following formats:
DEFAULT FORMAT
STRING FORMAT
QUOTED STRING FORMAT
INTEGER FORMAT
OCTAL FORMAT
HEX FORMAT
REAL FORMAT
COMPLEX FORMAT
PCOMPLEX FORMAT
TIME STAMP FORMAT
COORD FORMAT
Each format provides a different set of formatting options. For REAL FORMAT,
for example, you can specify a field width (as well as whether the data is
right- or left-justified), the style of sign prefix (" ",/-, +/-, /-), the
numeric style (STANDARD, FIXED, SCI), the numeric precision, and whether the
EOL string is added or not.
[1.7] VEE MATH FUNCTIONS
Elementary arithmetic (add, subtract, multiply, divide, mod, div).
Relational (equals, not equals, and so on).
Logical (AND, OR, NOT, XOR).
Bitwise operations.
Roundoff, fractional or integer part, absolute value and sign operations.
Standard operations on complex numbers.
String operations.
Power functions (roots, reciprocals, logs, exponents).
Trig and hyper trig operations.
Polynomial evaluations.
A particularly useful function is the "triadic" operator, which allows
decision-making within VEE formulas:
( a == 1 ? "YES" : "NO" )
This example returns the value "YES" if the input pin is 1 and returns "NO"
otherwise. You can cascade triadics if you like:
( a == 1 ? "ONE" : ( a == 2 ? "TWO" : "OTHER" ))
Time and date functions are based on a function called "now()", which returns
the current time in seconds since some ancient date. There are other
functions that will convert this time into various time and date formats.
Note that some display objects also will convert this count into a time and
date format.
Array and matrix operations.
Elementary calculus operations, Bessel and Hyper Bessel functions.
Curve fitting (regression) and other data-filtering operations.
Probability, statistics, and frequency-distribution functions.
Signal-processing functions -- FFT, IFFT, convolutions.
There is also a useful set of system-information functions:
errorinfo Get error message information.
getEnv Get environment variable contents.
getHostname Get computer hostname.
help Invoke helpfile with topic.
installDir Determine directory VEE is installed on.
whichOS Determine OS running VEE.
whichPlatform Determine hardware platform VEE is running on.
whichVersion Determine revision of VEE.
Note that most VEE operations can be performed on arrays, which allows you to
greatly optimize computations.
[1.8] VEE INPUT, DISPLAY, & OUTPUT OBJECTS
+---------------------------------------+
| Message Box |
+------------------------------+--------+
| Message [ User Message ] | OK |
| Symbol (i) [ information ] | |
| Buttons [ OK Cancel ] | Cancel |
| Default [ OK ] | |
+------------------------------+--------+
This object allows you to provide a prompt message for the user, a custom
graphics symbol if desired, the button configuration, and the default button.
Other dialogues allow string, integer, or real input, as well as selection
from a list or selecting a file or directory.
[1.9] VEE DEVICE I/O
+----------------------------------+
| 34401 (34401 @ 723) |
+------------------------------+---+
| WRITE TEXT "*IDN?" STR | |
| READ TEXT X STR | X +-->
| | |
+------------------------------+---+
A standard DIO object only communicates with a single remote device. VEE 3.X
introduced a Multidevice DIO object that allows you to communicate with
different remote devices from the same instance of the object.
+--------------------------+
| hp3478(LIVE) |
+--------------------------+
| [Reset] [ Main Panel ] |
| +----------------------+ |
| | ? | |
| +----------------------+ |
| |
| Function [ DCV ] |
| Range [Auto] [ * ] |
| Ndigits [ 4.5 ] |
| Trigger [ Hold ] |
| Auto Zero [ On ] |
| |
+--------------------------+
You can select other panels for the ID through the menu button labeled "Main
Panel" above. You can set this ID to the appropriate functions with a mouse
and the instrument (presuming it is connected) will respond accordingly. If
you execute an ID panel programmatically, it will send all its settings to
the instrument. You can select any of the components on the ID and turn them
into input or output pins as appropriate, allowing you to set ID functions
programmatically.
+---------------------------------------+
| hp3478(LIVE) |
+----------+------------------+---------+
| FUNCTION | | Reading |
| Int16 | | |
+----------+------------------+---------+
However, such instrument drivers have proven to be complicated to use, hard
to maintain and support, and nonstandard. As a result HP moved towards a new
scheme -- Plug&Play (PNP) drivers -- that can be used with different software
applications besides VEE, and is considering a follow-on scheme known as IVI
drivers.
+---------------------------------------------------+
| To/From NewDevice |
+------+-------------------------------------+------|
| | | |
| | | |
| | | |
| | | |
| | | |
+------+-------------------------------------+------+
However, when you select a transaction you get something very different from
the usual transaction-configuration dialogue. Something that more looks like
a "browser" into the VXIp&p library:
+-------------------------------------------------+
| Select A Function Panel |
+-------------------------------------------------+
| [ ] HPE1410 |
| | |
| +-[-] High Level Control |
| | | |
| | +-[+] Measure |
| | +-[ ] Configure Current Settings |
| | +-[f] Read Using Current Settings <-- |
| | |
| +-[-] Low Level Control |
| | | |
| | +-[f] Initiate Measurement |
| | +-[f] Abort Measurement |
| | +-[f] Fetch Data from Instrument |
| | +-[f] Execute Immediate Trigger |
| | +-[ ] Configure |
| | +-[ ] Calibration |
| | |
+-----------------------------------------------+-+
| Places the multimeter in the wait-for-trigger |^|
| state and transfers readings directly to the | |
| output buffer after receiving a trigger. |v|
+-----------------------------------------------+-+
| [ OK ] [ Cancel ] |
+-------------------------------------------------+
This "browser" is hierarchically arranged with "folders" that open up in a
tree fashion until you reach actual functions (designated by "f" above). You
can think of this as much like a file manager, with function groups replacing
directories and functions replacing files.
[1.10] COMMENTS ON VEE PROGRAMMING