LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hearing test

Hello everyone,

 

For a school project, I have to make a hearing test in Labview. This is my first time working with Labview so I don't have any experience at all. I've made an hearing test with little beeps in which the amplitude increases until someone hits the 'I hear the sound'- button. When this button is hit, the frequency changes. After this, the amplitude increases again until someone hits the button. This works quiet well, but I've got some little problems. I want to have an option in which the program terminates immediately. I've made this button in my outer While Loop. But if I hit this button, first the inner cycle in which the frequency increases has to be done. How can I stop my whole program with one simple press on a button? Another problem is that the amplitude increases with one step AFTER I hit the 'I hear the sound'- button. This has to be as well immediate, when I hit this button, I don't want to hear a louder beep with same frequency but a beep with another frequency. I hope you understand my questions. When someone can help me, my thanks will be very huge.

 

Yours Sincerely,

 

Maarten Willekers, Amsterdam, The Netherlands

0 Kudos
Message 1 of 4
(3,430 Views)

Hi Peter,

 

you should rethink your program logic…

 

Why not use just one while loop?

while
  play sound

  increment volume

  IF volume > limit THEN
    volume = 0.02
    increment frequency
  ENDIF

until STOP or frequency > limit

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(3,419 Views)

Thanks for your reply,

 

I don't really get it still..:P So I have to make my program in one while loop. But I don't understand how to let the amplitude increase seperately from the frequency.. If I put both of these in one while loop, they both will increase immediately, don't they? Do you think you can make a small VI with the idea you got about it? Thanks very very much.. Deadline is coming near..:'(

 

Best regards

0 Kudos
Message 3 of 4
(3,398 Views)

Hi Peter,

 

did you notice that IF/THEN/ENDIF command? No, you don't increment volume and frequency with the same condition...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(3,370 Views)