LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Play audio automatically after 2 minutes

Solved!
Go to solution

Hello all,
I have to continue on a code made by someone else.

The application must work like this:
When the user clicks on start the timer starts, and when he clicks on stop the timer stops.
And when the timer exceeds 2 minutes the Open, test, save buttons become enabled and the timer restarts (and after 2 minutes this time the audio plays automatically and that's when I get stuck).
I can't read the audio when the timer restarts after 2 minutes.
 
Can you help me please. I've been trying for days but I can't get it to work.
Thanks in advance
0 Kudos
Message 1 of 7
(1,361 Views)

Please  dear all,

Can you help me?

0 Kudos
Message 2 of 7
(1,321 Views)
Solution
Accepted by topic author Lena19

Most of the forum users here contribute their input voluntarily. Don't expect a swift response.

 

Anyway, I managed to come out with a simple demo for your use case.

Two things to point out:

1. The START and STOP text should be reversed when using the event structure. The button displays START at False value so that the START or TRUE event is generated.

2. The play waveform should be done at a separate while loop so that the code does not have to wait until the end of the music.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 3 of 7
(1,311 Views)

Hello ZYOng,

I thank you for your answer
And yes you are right sorry I will be careful next time.
 
I will adapt your demo to mine and test it
thank you very much
0 Kudos
Message 4 of 7
(1,304 Views)

Hello everyone,

I really need help, I've been stuck for a week now so I've come to ask you for help.
 
My application should do this:
When I click on Start: the timer starts counting.
When I click on Stop: the timer is paused.
 
When I click on Start after 5 minutes, the other buttons become enabled. ( so far so good).
What remains to be done;
When the user clicks on Start and the timer counts down to 5 minutes, I want the timer to restart at zero and count down to 5 and then it should play the first audio.
And the second audio starts when after 20 minutes. 
The reste of the state machine I can do it
 
Can you please help me
Thanks
0 Kudos
Message 5 of 7
(1,202 Views)

Hi Anne,

 


@Anne_12 wrote:
What remains to be done;
When the user clicks on Start and the timer counts down to 5 minutes, I want the timer to restart at zero and count down to 5 and then it should play the first audio.
And the second audio starts when after 20 minutes. 
The reste of the state machine I can do it

So you want to play the first audio after 10 mins (count down to 5, then restart timer and count down to 5 again)?

And you want to play the 2nd audio after 10 mins?

 

All you need is a "global" timer that only counts up. When hitting the 10 mins limit you play audio1, when hitting the 20 mins limit you play audio2...

 

Btw. did you discuss this topic with your co-student Lena?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(1,190 Views)
Hello GerdW?
Thanks for your answer.
Lena, yes, we are in the same practical group.
 
But we're struggling to keep up with the project.
 
Please can you show us for the countdown please
 
 
 
 
 
0 Kudos
Message 7 of 7
(1,169 Views)