HELP
An object that sets the data value of a
global variable.

USE
Use the Set Global object to set the data
container (type, shape, and values) of a
global variable (by name).  This global
variable can then be used by name in other
parts of the HP VEE model.

Global variables created (with Set Global)
in one context of a model can be used as data
in another context of that model.  For
example, a Set Global in the root context of
a model could create a global variable, which
could then be used as data by including a Get
Global in a UserObject.  This is especially
useful when the model contains several nested
layers of UserObjects.

Global variables that are set with Set
Global may also be used by name in the
expression fields of the following devices:
Formula, If/Then/Else, Get Values, Get Field,
Set Field, From DataSet and all devices using
expressions in transactions, including To
File, From File, Direct I/O, From Stdin,
To/From Named Pipes, and Sequencer.  Refer to
"Using Global Variables in Expressions" in
chapter 3 of the HP VEE Reference manual for 
further information.

LOCATION
Data ==> Globals ==> Set Global

OPEN VIEW PARAMETERS
The open view displays a field for the name
of the global variable.  The name is not case
sensitive (either lower-case or upper-case
letters may be used).  Thus globalA is the
same variable as GLOBALa.  The name field may
be added as a control input.

NOTES
To avoid unexpected results, your model must
ensure that a global variable is set with Set
Global before a Get Global object (or an
object that includes the global variable name
in an expression) executes.  Generally, the
best way to ensure this is to connect the
sequence output pin of the Set Global object
to the sequence input pin of the Get Global
object, or other object that uses the global
variable.  However, there are cases when the
sequence input pin need not be connected.
For further information about this, refer to
"Using Global Variables" in chapter 3 of
Using HP VEE.

All global variables are deleted at the
beginning of every Run, Start, or
auto-execution.  Global variables are always
deleted by either File ==> New or File ==>
Open.  Global variable values are not saved
with the model.

Global variables are truly global since
they are not defined at a UserObject level.
A global variable that is defined in one
context of a model can be used in any other
context within the model.  For example, you
can define a global variable with a Set
Global object in the root context of the
model, and then include a Get Global to get
that global variable in a UserObject.
However, you will need to avoid name
conflicts throughout the model:

* If two or more Set Global objects attempt
to set the same global variable (with the
same name), the current value will be
overwritten as each Set Global executes.
This may result in unexpected behavior.

* If there is a local input variable with the
same name as a global variable, the local
variable will take precedence.

For further information, refer to "Using
Global Variables in UserObjects" in chapter 6
of Using HP VEE, and to "Using Global
Variables in Expressions" in chapter 3 of
HP VEE Reference manual.

SEE ALSO
Get Global, and View Globals.
