others have already answered, but maybe a little more details are better.
You asked on Wed, 5 May 2004 17:10:20 +0200:
Couldn't I put the subvi's in a true case and nothing in the false case within the separate while loops? Control the case using a local (....aaaah, that bad word again) from the state machine.
Maybe it is not best programming style, but would be quick to implement in this existing project....
Paul replied
A queue, occurrence, or semaphore would avoid the bad word.
Well, at first, put a little wait into the false case, just to keep your code responsive. In a UI situation like this a wait for 100..250 ms is usually best.
Second, to avoid problems accessing the global and getting into race conditions, I'd suggest using an occurrence instead. It can be 'read' just once and there's no 'hidden' connection/dependency in your code.
Alternatively you may introduce a booleran control for each of the parrallel running while loops that contain your 'subVI's.
Let this booleans control your cases inside the while loops. Get two locals of each of them, one in the UI loop that sets the respective boolean to tue once it is desired to run the respective SubVI. Use the 2nd local to reset the same boolean once 'its' true case is reached (inside the true case!). This effectively acts like an occurrence - so I'd prefer using an occurrence instead.
Just my € 0.02 Greetings from Germany! -- Uwe Frenz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr. Uwe Frenz Entwicklung getemed Medizin- und Informationtechnik AG Oderstr. 59 D-14513 Teltow
Tel. +49 3328 39 42 0 Fax +49 3328 39 42 99 [EMAIL PROTECTED] WWW.Getemed.de
