User`s guide

Agilent VEE Programming Techniques Chapter 2
VEE User’s Guide 115
Practice Programs
The practice programs in this section illustrate more VEE
features.
2-6: Generate a Random Number
1 Document the program:
a Select DisplayNote Pad and place it at the top center
of the work area. Click on the editing area to get a
cursor and remove any template that might be there.
Then enter:
This program, Random, generates a real number
between 0 and 1, then displays the results.
2 Select Device Function & Object Browser. Select Ty pe
Built-in function, CategoryAll, and Functions random.
Click Create Formula. Place the object in the work area and
click to place the object.
3 Click DataConstantInt32 and place it to the left of
random. Open the Int32 object menu, click Clone, and put
this below the other Int32 object. Double- click the 0 to get
a cursor, then enter 1. Connect the constant object with 0
to the low input pin of random, and connect the constant
1 to the high input pin.
4 Select DisplayAlphaNumeric and place it to the right of
the random object. Open the object menus and select Help
to understand the objects better.
5 Connect the random object output pin to the
AlphaNumeric input pin. A data line appears, connecting
the two objects.
NOTE
As you move the mouse pointer with the line attached near the target pin,
a box highlights the pin. Then you click again to complete the connection.