HELP
An object that executes a series of sequence
transactions, each of which may call a User
Function, Compiled Function, or Remote
Function.

USE
Use the Sequencer to control the order of
calling of a series of UserFunctions,
Compiled Functions, Remote Functions or any
other HP VEE function by specifying a series
of sequence transactions.  Typically, the
Sequencer is used to perform a series of
tests.

The Sequencer contains a list of sequence
transactions.  Each of these transactions
evaluates an HP VEE expression, which may
contain a call to a UserFunction, Compiled
Function, or Remote Function.  After
evaluating the HP VEE expression, a
transaction compares the value returned by
that expression against a test specification.
Depending on whether the test passes or
fails, the transaction then evaluates
different expressions and selects the next
transaction to be executed.  Transactions may
optionally log their results to the Log
output pin, or to a UserFunction, Compiled
Function, or Remote Function specified in the
Logging Config dialog box.

The Return output pin of the Sequencer can
be used for returning a result when the
sequence has completed.  By default the
Return output pin has a value of zero, but a
transaction with a Next Operation of Then
Return will set the Return output pin to the
specified value.

The Log output pin of the sequencer
contains a record that contains one logging
record for each transaction that has logging
enabled.  See "Logging Config" below for more
information.

LOCATION
Device ==> Sequencer

OPEN VIEW PARAMETERS
The open view shows the list of transactions
to be executed.

DIALOG INFORMATION
You can change the parameters for an
individual transaction.  Just double-click on
a transaction to display the Sequence
Transaction dialog box for that transaction.
The available parameters are as follows:
* Sequence Mode:

* TEST - Executes the specified expression
and tests the result against a specification.
(If the expression calls a User Function, a
compiled function or Remote Function, the
result on the top-most output pin of the
corresponding UserObject is used.)

* EXEC - Executes the specified expression
without performing a pass/fail test against a
specification.  Logging is never performed on
EXEC transactions.

* Transaction Name - Unique name of this
transaction.  Must be a valid HP VEE variable
name (must begin with a letter, but may
include letters and numbers).  This name can
be referenced by expressions in this or other
transactions, and will contain the logging
record for the most recent execution of this
transaction.
* Enable Condition Type:

* ENABLED - Sequencer unconditionally
executes this transaction.

* DISABLED - Sequencer never executes this
transaction.

* ENABLED IF:  - Sequencer executes this
transaction only if the given expression is
non-zero.

* DISABLED IF:  - Sequencer does not execute
this transaction if the given expression is
non-zero.

* SPEC NOMINAL:  - Nominal (expected) value
of the test result.  This value is not used
in calculating RANGE or LIMIT specification
tests, but may be included in the logging
record.

* Spec Type - All specification tests are
done in the same manner as the Comparator
object.  Thus, the test result may be a
waveform, and the test limit(s) may be
another waveform or an array of type Coord.
The spec test will automatically perform the
necessary interpolation to determine if each
data point is in or out of specification.
Also, all tests use an "almost equal"
algorithm that checks equality or inequality
to at least six significant digits.  See the
Comparator object description for more
information.  Options include:

* RANGE:  - Specifies a lower and upper limit
and the comparison operators that apply.

* LIMIT:  - Specifies a single limit and the
comparison operator that applies.  May be
used to test for an upper or lower limit, or
for an exact match.  The limit value will be
logged in the HighLimit record field.

* TOLERANCE:  - Specifies a plus and minus
tolerance from the Nominal value.  A
tolerance of zero is permitted.  HighLimit
and LowLimit logging record fields contain
the specification range after the tolerance
has been applied to the Nominal value.

* %TOLERANCE:  - Specifies a plus and minus
percent tolerance of and from the Nominal
value.  A tolerance of zero is permitted.
HighLimit and LowLimit logging record fields
contain the specification range after the
tolerance has been applied to the Nominal
value.

* FUNCTION - An HP VEE expression that
specifies the test.  The expression may just
be a call to a User Function, Compiled
Function, or Remote Function.  Or it may be a
larger expression of input pin names, User
Functions, Compiled Functions, Remote
Functions, and test records from previous
transactions in this Sequencer.  If this is a
test transaction, the single result from this
field will be tested against the
specification.  The result of a User Function
or Remote Function call is the value of the
top-most output pin of the corresponding
UserObject, or nil if no output pins are
present.
* Logging Mode:

* LOGGING ENABLED - Add a field for this
transaction to the Log record output pin (if
present).  If a "Log Each Transaction To:"
procedure has been specified in Logging
Config in the object menu, that logging
procedure will be called immediately after
this transaction is completed.

* LOGGING DISABLED - A log record will not be
generated for this transaction, and the "Log
Each Transaction To:"  procedure will not be
called.  (See "Logging Config" under "Object
Menu" below for options and more
information.)
* Pass Operation:

* IF PASS - If the spec test passes (test
value within limits), the specified "then"
action will be performed.

* IF PASS CALL:  - If the spec test passes
(test value within limits), the specified HP
VEE expression -- which may include a call to
a User Function, Compiled Function, or Remote
Function -- will be evaluated and the
specified "then" action will be performed.
* Fail Operation:

* IF FAIL - If the spec test fails (test
value outside of limits), the specified
"then" action will be performed.

* IF FAIL CALL:  - If the spec test fails
(test value outside of limits), the specified
HP VEE expression -- which may include a call
to a User Function, Compiled Function, or
Remote Function -- will be evaluated and the
specified "then" action will be performed.
* Next Operation:  (Applies to EXEC
transactions, or to either "Pass" or "Fail"
operations in TEST transactions.)

* THEN CONTINUE - Goes to the next
transaction in the Sequencer list.  (This is
the default operation.)

* THEN RETURN - Quits executing transactions
in this Sequencer and places the value of the
specified expression on the Return output pin
of the Sequencer.  The Sequencer object will
then fire its output pins and execution flow
within the model will continue normally.

* THEN GOTO - Goes to the transaction in this
Sequencer with the specified transaction
name.

* THEN REPEAT - Executes this transaction
again, repeating up to the specified number
of times.  If the Pass/Fail condition still
exists after the maximum number of repeats,
continues to the next transaction.

* THEN ERROR - Stops execution of the
Sequencer by generating an error condition
with the given error number.  An error can be
trapped with an Error output pin on this
Sequencer, or on any enclosing UserObject.

* THEN EVALUATE - Evaluates the given
expression -- which may call a User Function,
Compiled Function, or Remote Function -- and
uses the string result to determine the next
operation.  Valid string results from the
expression are:
CONTINUE RETURN <expr> GOTO <name> REPEAT
<expr> ERROR <expr>
Where <expr> is any valid HP VEE expression
and <name> is the name of a transaction in
this Sequencer.  This operation can be useful
when a User Function, possibly with user
interaction, needs to determine what action
the Sequencer should perform next.

* DESCRIPTION - "Comment" field for this
transaction.  Text entered into this field
will be shown at the end of the transaction's
abbreviated text in the Sequencer open view.

OBJECT MENU

* Step Trans - Causes the currently
highlighted transaction to be executed, using
the last data sent to the input pins.  The IF
PASS or IF FAIL expressions are executed as
usual, and the next transaction specified by
these rules will be highlighted.  (Note that
[Ctrl-X] is a shortcut for Step Trans when
the cursor is over the Sequencer.)

* Logging Config - Selects which fields will
be generated in the logging record for each
transaction.  (The Log output pin contains a
record of records &emdash; one logging record
for each transaction with logging enabled.
In each transaction logging record the
selected fields, specified below, may be
present.)  The names (without spaces) are the
field names of the logging record.  The
choices are:

* Name - A unique string that identifies this
transaction (not the procedure name).

* Result - The value returned from the
evaluation of the test procedure.

* Nominal - The nominal test value.

* High Limit - The upper limit used in the
specification test.  Actual limit values, not
offsets are given for Tolerance and
%Tolerance specifications.

* Low Limit - Lower limit used in
specification test.  Actual limit values, not
offsets, are given for Tolerance and
%Tolerance specifications.

* Pass - An Int32 with value "1" for "Pass",
"0" for "Fail".

* Time Stamp - A Real value containing day,
date, and time of completion of the test.
(Refer to the Time Stamp object for more
information.)

* Description - A Text value containing the
description "comment" field in the
Transaction.

Under Logging Config you can also choose
the type of logging:

* Log to Output Pin Only - A logging record
will be present in the record on the Log
output pin for each transaction that has
Logging Enabled.  If a transaction is
executed more than once during one execution
of the Sequencer, only the last logging
record for that transaction will be present
in the record on the Log output pin.  If a
transaction has not been executed during an
execution of the Sequencer, the logging
record for that transaction will contain "0"
(Real) values for each field except the Name
and Description fields, which contain null
strings.

* Log Each Transaction To:  - Specify a User
Function, Compiled Function, or Remote
Function expression that will be called after
each transaction that has Logging Enabled.
To pass the logging record for the current
transaction to the User Function, Compiled
Function, or Remote Function, use the
reserved variable name "ThisTest".  The Log
output pin will continue to operate in the
same manner as for the "Log to Output Pin
Only" mode.

* Add Trans - Adds a transaction to the end
of the list.

* Insert Trans - Inserts a transaction before
the currently highlighted transaction.

* Cut Trans - Cuts (deletes) the currently
highlighted transaction, but saves it in the
transaction "cut-and-paste" buffer.

* Copy Trans - Copies the currently
highlighted transaction to the transaction
"cut-and-paste" buffer.

* Paste Trans - Pastes a transaction,
previously "cut" or "copied" to the buffer,
in the position before the currently
highlighted transaction.

NOTES
You can add an Exec Trans control input pin.
The Exec Trans control input executes only
the transaction(s) with the specified name(s)
in the order given by a Text scalar or 1D
array on the control input.  The highlight
bar will be moved to the transaction
currently being executed.  The If Pass or If
Fail expressions will be evaluated as usual,
but the result of the Then field will have no
effect on the next transaction to be
executed.

All field expressions (such as ENABLED IF,
FUNCTION, or spec limits) may contain input
pin names, UserFunction calls, Compiled
Function calls, Remote Function calls, HP VEE
math functions, or record names of previously
run transactions.  In test transactions with
LOGGING ENABLED, the reserved variable,
thisTest will contain a record of the logging
fields that have been calculated.  For
example, to use the test value from
transaction test4, which had logging enabled,
use the name test4.result in any expression.
Or to use the current test name in any
expression, use thisTest.name.  Or, an
Enabled If expression might be random()<0.25
to cause the test to be executed only 25
percent of the time.

SHORT CUTS
To quickly insert a transaction, place the
cursor on a transaction.  Press [CTRL-O] to
insert a transaction over the transaction
where you placed the cursor.

To quickly delete ("kill") a transaction,
place the cursor on that transaction and
press [CTRL-K].

To paste a transaction from the "kill"
buffer press [CTRL-Y].

To quickly move to the next or previous
transaction, press [CTRL-N] or [CTRL-P]
respectively.

[CTRL-X] is a short cut for Step Trans
when the cursor is over the Sequencer.

SEE ALSO
Call Function, Comparator, Raise Error,
Record, Time Stamp, Unbuild Record, and
UserObject.
