From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I say this is a bug ?

Hello,
         For details please see enclosed.
0 Kudos
Message 1 of 7
(2,908 Views)

It's not a bug. The event structure registers for the events when you run the VI. The event is set by default to lock the FP until the event completes, so at the moment LV recognizes the event it locks the FP and the clicks on the other stop button won't be processed until the event case completes.

You could ask whether LV should lock the FP when the event occurs or only when it actually starts running the event case, but I assume there is a good reason for how it works now. I understand this is just an example, but in general, you should not place UI handling code in different sections of your code (and definitely not in places which affect each other as the different frames of a sequence structure). If you do have problems for some reason, you can set the event not to lock the FP when you define it.


___________________
Try to take over the world!
Message 2 of 7
(2,887 Views)
Thanks tst, How to set the event not to lock the FP ?
0 Kudos
Message 3 of 7
(2,808 Views)
See image below.
 
However, as tst already hinted, you should rethink your program flow. It is not a good idea to hide event structures in nooks and crannies of the code where they cannot get serviced when needed. 🙂
 
 
 

Message Edited by altenbach on 06-07-2006 09:31 PM

0 Kudos
Message 4 of 7
(2,802 Views)
Thanks, geat !
 
As you said "you should rethink your program flow. It is not a good idea to hide event structures in nooks and crannies of the code where they cannot get serviced when needed"
if I have to use Sequence struture and the other structure needs event case, what the program component be well ? must set  the event case at the first occur status(field) ?
0 Kudos
Message 5 of 7
(2,796 Views)


@Gilbert-Lin wrote:
if I have to use Sequence struture and the other structure needs event case, what the program component be well ? must set  the event case at the first occur status(field) ?

A typical mistake of beginners is overuse of sequence structures. They are rarely needed! (some seasoned LabVIEW programmers consider stacked sequences evil). I haven't used a stacked sequence in years. In the rare cases where dataflow need some guidance, a single-frame flat sequence structure will often do the trick. 🙂

Have a look at e.g. a state machine architecture. 🙂

What kind of program do you have in mind?

Message Edited by altenbach on 06-07-2006 11:22 PM

0 Kudos
Message 6 of 7
(2,789 Views)

altentach, thanks your help !

-________________________________________

What kind of program do you have in mind?

__________________________________________

en, a word can't tell details, let me have a good think, take your words "rethink" the program would be better. .Smiley Happy

0 Kudos
Message 7 of 7
(2,781 Views)