send q VRf-Sequencer vrf ww proart@tin.it
from: Greg Goebel / HP-MXD
gvg@lvld.hp.com / 970-679-3030 / FAX 970-679-5971
website: ftp://fcext3.external.hp.com/dist/mxd/index.html
to: VRf/Marco Barbieri
date: Wednesday, 27 August 1997 1137 MDT
> From: "Marco Barbieri" <proart@tin.it>
> To: <vee-ug-reg@lvld.hp.com>
> Subject: VRf - questions on sequencer
> Date: Mon, 25 Aug 1997 06:02:59 +0200
>
> Hi all,
>
> since I am a newcomer in Vee world (I come from LabView and LabWindows CVI)
> I have same silly questions on VEE 4.0.
>
> Example.
> I am using a sequencer object with 10 test.
> After the third I understand that the piece under test is non good and have
> to be discarded.
>
> How can I stop the sequncer from continuing with the remaining tests and
> start from the begining with a new piece?
Easy, just bail out if the test results fail:
[ IF FAIL ] [ THEN RETURN ]
> There is a way to write manually the log for the test that I didn't execute
> so I do not have a hole in the final log?
Not reasonably ... you could manipulate the resulting log record, but it
would be an ugly, nasty job. What you would likely want to do is generate an
output file with the text from the log records and then write a program
("awk" would do it well enough, but BASIC could be used as well) to massage
the information. Doing it in VEE would be way too much trouble.
> Thanks to anyone that can help me.
>
> Marco Barbieri
> Proart Srl
> Italy
from: Greg Goebel / HP-MXD
gvg@lvld.hp.com / 970-679-3030 / FAX 970-679-5971
website: ftp://fcext3.external.hp.com/dist/mxd/index.html
to: VRf/Marco Barbieri
date: Wednesday, 27 August 1997 1137 MDT
> From: "Marco Barbieri" <proart@tin.it>
> To: <vee-ug-reg@lvld.hp.com>
> Subject: VRf - questions on sequencer
> Date: Mon, 25 Aug 1997 06:02:59 +0200
>
> Hi all,
>
> since I am a newcomer in Vee world (I come from LabView and LabWindows CVI)
> I have same silly questions on VEE 4.0.
>
> Example.
> I am using a sequencer object with 10 test.
> After the third I understand that the piece under test is non good and have
> to be discarded.
>
> How can I stop the sequncer from continuing with the remaining tests and
> start from the begining with a new piece?
Easy, just bail out if the test results fail:
[ IF FAIL ] [ THEN RETURN ]
> There is a way to write manually the log for the test that I didn't execute
> so I do not have a hole in the final log?
Not reasonably ... you could manipulate the resulting log record, but it
would be an ugly, nasty job. What you would likely want to do is generate an
output file with the text from the log records and then write a program
("awk" would do it well enough, but BASIC could be used as well) to massage
the information. Doing it in VEE would be way too much trouble.
> Thanks to anyone that can help me.
>
> Marco Barbieri
> Proart Srl
> Italy
from: Greg Goebel / HP-MXD
gvg@lvld.hp.com / 970-679-3030 / FAX 970-679-5971
to: Mat Bahari
date: Thursday, 06 June 1996 1442 MDT
To the general VRf audience: I had a correspondence a week or two ago in
which I said you could not change the title on a certain object. In fact you
can, you can bring out a control pin on the object to do so. Sorry about
that.
> To whom concern or have answers to the following,
>
> I have been using and experimenting with this VEE software and
> what I have found about the logging output on the sequencer
> object is not as immediate or ontime as expected , and this impair
> the intention of using such output for monitoring purposes.
All objects only generate outputs when they complete operation -- rather
like a subprogram or function in a normal language, you won't get anything
out of them until they complete execution.
> For monitoring results , I would like to see an almost immediate
> results after execution of a particular test in the sequence is done.
> What actually happen is logging output will only available at completion
> of all tests in the sequencer.
Correct, but we had many complaints about this and came up with the ability
to create pop-up panels that could be updated as the test proceeds. See
notes below.
> Normally for monitoring immediate results for tests in the sequencer,
> tabulation format is necesary for readability, but logging do
> only provide record out and to provide tabulation on screen will
> need extra programming.
>
> Similarly for the spec in the sequencer, it would be nice if
> the test spec can be summarised in a file/files, also spec can be inputed from
> files(File driven).
No plans or prospect of that -- there hasn't been a demand.
> --
>
> Best regards,
> ===========================================================================
> BAHARI (MAT BAHARI ) Internet mail : bahari@comm.mot.com
> Motorola Penang 604-6432511 (ext 4571) X400 Acount : CMB011
> Malaysia.
> ===========================================================================
[7.6] USING SHOWPANEL() & HIDEPANEL() / NONMODAL DIALOGS
* VEE 3.X introduced four functions to control the appearance and
disappearance of a UserFunction pop-up panel:
showPanel( UFname )
showPanel( UFname, x, y )
showPanel( UFname, x, y, width, height )
hidePanel( UFname )
(UserFunctions are described in detail in later chapters.) These functions
allow displays to be created "dynamically" instead of having to rely on a
fixed VEE user interface.
The game programs that are shipped with VEE 3.X illustrate some of the
interesting things that can be done with dynamic displays, but are rather
complicated to explain here. As a simpler example, consider the use of these
functions to build a "nonmodal" popup.
The Dialog boxes introduced in VEE 3.X have proven popular, but some people
are upset that they are strictly "modal" -- that is, when the program pops
one up, everything stops running until the user makes it go away or it times
out. Some people need to be able to display a pop-up while the program is
doing something (to tell the user to wait, for instance) and the standard
dialogs can't do that.
You can do this with "showPanel()" and "hidePanel()', however. To show how
this is done, I created a User Function named "PopUp" that consisted solely of
a Label object containing the text "Please Wait ... " in nice big black
letters, glued to the Panel View of the User Function. Then I wrote the
following program:
+-------+
| Start |
+---+---+
|
+-----------+----------+
| showPanel( "PopUp" ) |
+-----------+----------+ +---------------+
| | AlphaNumeric |
+-----------+----------+ +---------------+
| For Count [ 5 0 -1 ] +---->| |
+-----------+----------+ +-------+-------+
| |
+-----------+----------+ +-----+-----+
| hidePanel( "PopUp" ) | | Delay (1) |
+----------------------+ +-----------+
I put the Start button and the AlphaNumeric display on the Panel View; when
I hit Start, the popup came up and told me to "Please Wait ... " while the
count went down to 0, and then obediently vanished.
Note how you can provide optional parameters to "showPanel()" to specify
the placement (and size) of the pop-up; it comes up centered if they are not
specified.
* A few additional functions to support popups were added in VEE 3.2:
% lockPosition( <User_Function_name> );
This function locks a specified User Function in a specified place on the
display so a user cannot move it around with a mouse.
% unlockPosition( <User_Function_name> );
Allows users to move the panel again.
% panelPosition( <User_Function_name> );
Returns the X and Y pixel coordinates of the upper left corner of a panel
(disregarding title and border area), with the 0,0 reference location at
the upper left corner of the display.
% panelSize( <User_Function_name> );
Returns the width and height of the panel in pixels.
[%%]
[7.7] USING "SHOWPANEL()" & "HIDEPANEL()" FOR NONMODAL INPUT
* A customer had an additional requirement for a nonmodal dialog box that
could accept inputs; this was a somewhat more complicated requirement. To get
input from a nonmodal dialog, you have to do the following things:
% Create a UserFunction that only consists of input objects that do not wait
for input -- such as Constants, Enums, Toggles, and so on (OK buttons wait
for input so they're out, and none of the input objects should have Wait
for Input set). Put the input objects on the Panel View and have output
pins that provide their values.
% In the actual program, you can call this UserFunction any time you like to
see what the inputs are; it executes instantly and then returns the values.
Basically you are "strobing" or "polling" the UserFunction for inputs. In
between polls, you can do other things.
% The trick is, as long as you don't set "Show Panel On Execute" on the
UserFunction, you won't actually see it's panel ... until you do a
"showPanel()", and then it pops up, and remains up, whilst you strobe it as
often as you like. It's only active during a strobe, but you can still see
it.
% This implies that each time you strobe the UserFunction, you have to test
its return values; if the user presses a button to exit, you get that as a
return value, test it with an If/Then/Else, and then do a "hidePanel()".
If this is as clear as mud, consider an example: a VEE program that is
continually updating a clock, but allows you to pop up a dialog to input a
name; pressing OK on the dialog allows the name to be displayed, pressing
Cancel just continues with the program.
The guts of the UserFunction are idiot-simple (as noted above, they *have*
to be), consisting of a Text Constant and two Toggle (*not* OK) buttons:
+----------------------------------------------------------+
| UserFunction: PopUpTest |
+--+----------------------------------------------+--------+
| | | |
| | +--------------------+ | |
| | | What Is Your Name? | | |
| | +--------------------+ | |
| | | +----------->| Name |
| | +--------------------+ | |
| | | |
| | | |
| | +--------------+-------------------------->| OK |
| | | +--------+ | +--------+ | |
| | +->| OK +--+ +->| Cancel +--+ | |
| | +--------+ | +--------+ | | |
| | +--------------+------>| Cancel |
| | | |
+--+----------------------------------------------+--------+
Note how the Toggles are wired back to their Reset pins; this ensures that
they are reset after being toggled by the user. Also remember that you should
not set "Wait for Input" on the Text Constant.
I named the UserFunction "PopUpTest". I set up the Panel View like this:
+-------------------------------------------+
| |
| +--------------------+ |
| | What Is Your Name? | |
| +--------------------+ |
| | | |
| +--------------------+ |
| |
| +--------+ +--------+ |
| | OK | | Cancel | |
| +--------+ +--------+ |
| |
+-------------------------------------------+
The demo program itself is as follows:
+-------+
| Start |
+---+---+
|
+---+---+
| Until |
| Break +--+----------------------------------------+
+-------+ | |
| +---+---+
+--------+ +---------------+ | Quit +-----+
| | | AlphaNumeric | +-------+ |
| +---+---+ +---------------+ +---+---+
| | now() +--->| 11:49:54 | | STOP |
| +-------+ +-------+-------+ +-------+
| |
| +---+---+
+--------+ | Next |
| | +-------+
| +-----+-----+
| | Run Test +-------------------+
| +-----------+ |
| +------------+-----------+
| | showPanel("PopUpTest") |
| +------------+-----------+
| |
| +---+---+
| | Next |
+--------+ +-------+ +-------------+
| | |
+-----------+----------+ | +--------+-------+
| Call Function | | | AlphaNumeric |
+-------------+--------+ | +----------------+
| | Name +------------------------|--->| Wile E. Coyote |
|[ PopUpTest ]| OK +-----+ | +----------------+
| | Cancel +--+ | |
+-------------+--------+ | | |
| | |
+------------------+ | |
| +------------------+ |
| | |
| | +------------------------------+ |
| | | If/Then/Else | |
| | +--------+-----------+---------+ | +-----+
| +-->| OK |[OK==1 ]| Then +--+->| JCT +--+
+----->| Cancel |[Cancel==1]| Else If +---->| | |
| | Else | Else | +-----+ |
+--------+------+----+---------+ |
| |
+---+---+ +------------+-----------+
| Next | | hidePanel("PopUpTest") |
+-------+ +------------------------+
This program is in the form of a typical "parallel branch" VEE program, in
which one branch updates a clock (using "now()" and an AlphaNumeric set to
TimeStamp mode), the next allows you to display the UserFunction with
"showPanel()", the third tests the panel for inputs, and the fourth (in the
upper right corner) allows you to quit.
It is the third branch that is of real interest. It strobes the UserFunction
and returns the current state of its inputs; the "OK" and "Cancel" Toggles are
tested by an If/Then/Else object to see if either are 1 (meaning the user has
toggled them). If "OK" is set to 1, the "Then" output strobes the
AlphaNumeric to display the current "Name" string; if either are set, the
UserFunction is hidden with "hidePanel()".
Variations can be constructed on this theme as long as the basic rules are
followed: you just have to strobe the UserFunction on a regular basis and it
*cannot* contain any objects that might cause it to hang.
[<>]