LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LEDの点滅と音の同期について

この作成したLED点滅に合わせて音をつけたいのですがアドバイスお願いいたします。

0 Kudos
Message 1 of 9
(463 Views)

Hi poteto,

 


@poteto wrote:

I would like to add a sound to the blinking LED I created. Any advice would be appreciated?


Use the Sound functions…

 

Suggestion:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(452 Views)

Thank you!

What should I do when the sound is intermittent?

0 Kudos
Message 3 of 9
(412 Views)

Hi poteto,

 


@poteto wrote:

What should I do when the sound is intermittent?


How can it be "intermittent" when you play the same sound every time?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(407 Views)

I want to make the LED light up and the sound play quickly, but when it's too fast, the sound cuts out. I'm looking for solutions to fix this.

0 Kudos
Message 5 of 9
(403 Views)

Hi poteto,

 


@poteto wrote:

I want to make the LED light up and the sound play quickly, but when it's too fast, the sound cuts out. I'm looking for solutions to fix this.


I see two options:

  • don't switch the LED so often/fast
  • set the time for playing the beep sound correctly (aka "as long as your beep sounds needs to play")

In my example I play a simple tone (A, 440Hz) for 50ms. You can adjust both constants as needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(399 Views)

I'm aiming for smooth operation when sound and LED vary based on acquired data. For instance, assuming sounds play about ten times at 250 milliseconds.

0 Kudos
Message 7 of 9
(394 Views)

Hi poteto,

 


@poteto wrote:

I'm aiming for smooth operation when sound and LED vary based on acquired data.


Define "smooth operation"…

 


@poteto wrote:

For instance, assuming sounds play about ten times at 250 milliseconds.


Should the sound play 10× for 25ms to result in 250ms or should the sound play 10× for 250ms?

Should there be a pause/delay between each sound?

 

Anyway: when your goal is to reach that 250ms interval then you should set a different wait time in my example loop.

As the Beep function also waits for the sound to be played it should be located in a different loop (producer-consumer scheme!?) so it doesn't block your DAQ loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(387 Views)

Got it. I want each sound to play 10 times for 250 milliseconds each, without needing a pause between each sound.

I don't have any example loop displayed right now.

0 Kudos
Message 9 of 9
(379 Views)