LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicating event case doesn't produce same result

I tried the atatched code in which I have the event case Play File, I can play press the play button on my front end to play the sound file and also perform a trace using the slider. Then I duplicated the same event and linked it to the Level I oush button to reflect the same one. But when I try  to click the button I can hear the sound but no changes on the slider. I don't know why the duplicate event case is not working??Any help????
 
P.S: If trying please fix the path to reflect proper sound
0 Kudos
Message 1 of 7
(2,829 Views)
Try to attach your program again. It did not make it. 😉
0 Kudos
Message 2 of 7
(2,829 Views)
If you have two event cases, when one is running, it will most likely block the second.  This can of course lead to the position where one case is blocking the other, and the program will hang.

You can use a single event case with multiple cases which then trigger seperate parallel loops to do whatever processing (playing sounds) is required.  It's generally a good idea to have as little code as possible in an event case so that the system is allowed to get back to event hadling as soon as possible.

Do a search for "consumer producer" and you'll most likely find some good ideas..

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 7
(2,821 Views)
Sorry about that I hope this makes it through
0 Kudos
Message 4 of 7
(2,816 Views)
Catchxan,

Can't open it, sorry, I'm stuck in a 6.1 Wormhole....

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 5 of 7
(2,808 Views)
Hi catchxan,
I tried to execute your vi and, as far as I can catch, it is working properly. There is nothing duplicated in your event structure: every event handler is different.
When I press Level I, I can hear the sound and move the slider manually to change the value of the running chart plot; that's all.
What is supposed to go wrong?

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 7
(2,804 Views)

I am missing the "built screen" subVI, so I cannot run.

Looking at the code, it is not quite clear under what conditions the while loop inside the "level I" event finishes. If this loop keeps running, the event structure is of course blocked form servicing any other events. Think dataflow! 🙂

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