At 1:38 PM +0100 4/2/04, [EMAIL PROTECTED] wrote:
>Dear Group,
>
>Please can you educate me, my brain's exploding here. I've been given a huge, 
>old-style procedural flow diagram to code up in LabView 7, to create an automated 
>test environment. (Thanks so far to Chris Harden for your help, but I'm still stuck 
>on details.)
>
>See http://www.spherica.demon.co.uk/LabView/basic%20flowchart.gif

Ok, here is a start at handling this as an event driven system.  This can be either a 
simple event structure or look at the producer/consumer template for doing the same 
thing using a queue to pass commands from the user interface to the work loop.

pop up a dialog box to get the file name and test data.  This is just a sub-vi with 
the vi properties set to dialog.  It just loops until an accept button is pressed and 
then passes the filename and test data to the main prog.

initialize

Then big event structure in a while loop with events for (A/B radio button), (C/D/E 
radio button), (F/G radio button) and a stop button.
Start with A/B visible and enabled and the other 2 invisible.

When A/B has value changed, use the new value to select a case to hide (or grey out 
and disable) the C/D/E radio button and unhide the F/G radio button and do calibration 
procedure 2 (or vice versa for the other case) also hide the A/B radio button.

For the F/G radio button event use a case to select a call to process F or G in a 
loop, for each iteration ask to "re-do?" in a dialog box or make other test and decide 
to exit the loop.  Store the file and return to the main event loop.

For the stop button change event case send the new value of the stop button to the 
main while loop to terminate.

-Scott
-- 
-         Dr. Scott Hannahs, Head of User Research Instrumentation         -
-                     http://sthmac.magnet.fsu.edu                     -
-     National High Magnetic Field Laboratory, Florida State University    -
- 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX 644-0534 -

"Programming today is a race between software engineers striving to build bigger and 
better idiot-proof programs, and the universe trying to build bigger and better 
idiots. So far, the universe is winning."
        -- Robert Cringley ("Triumph of the Nerds").


Reply via email to