取消
显示结果 
搜索替代 
您的意思是: 

Problem with task realisation

I have to create an application which for 3 different ranges of sound frequency (which user can adjust on screen) turns on one of three alarms:

1. text warning on user interface

2. blinking of LED indicator

3. sound signal warning.

I have realised a part of the code, but I am not sure if my algorythm is good.

Here is my code: Sound Frequency Detector.vi

0 项奖励
1 条消息(共 8 条)
3,413 次查看

Hi Miki!

 

Could you upload the VI as an attachment? I do not have a 4shared account, and others will also be able to access it easier and faster.

 

Thanks!

 

Andrew Valko

NI Hungary

Andrew Valko
National Instruments Hungary
0 项奖励
2 条消息(共 8 条)
3,370 次查看

Thank you for response! I am new to forum, so I didn't know how to attach a file. Here it is now.

 

0 项奖励
3 条消息(共 8 条)
3,359 次查看

Dear Miki!

 

Allow me to give you a few recommendations:

 

1. If you only have two cases, it might be easier to use the Select node from the comparison menu.

2. If you use case structures, make sure you have wired soomething to all the cases. It can be an empty/default value, if nothing else.

3. There is a Blinking property for LED indicators.

4. It's probably easier to use the Play Waveform Express VI or the Beep VI for sound.

5. If you want this code to run continuously, it's better to have a loop than using the continuous run button.

 

Hope this helps.

 

Regards:

Andrew Valko

NI Hungary

Andrew Valko
National Instruments Hungary
0 项奖励
4 条消息(共 8 条)
3,348 次查看

Thank you fo recommendations! I made it work, though not all the things I need, but it's not bad for the beginning. I just didn't succeed to make it with while loop. It doesn't read frequency for some reason then.

 

Best regards,

Milos Mladenovic

0 项奖励
5 条消息(共 8 条)
3,344 次查看

Dear Milos!

 

Make sure your indicators are also inside the loop, otherwise they will not be updated in every iteration. Since I do not see what's inside the subVI that acquires the frequency information, I'm not sure why it isn't working. For frequency measurements in general, please check out our example storage.

 

Regards:

 

Andrew Valko

NI Hungary

Andrew Valko
National Instruments Hungary
0 项奖励
6 条消息(共 8 条)
3,340 次查看

Here is my working code without subVI. It's not complete. I have troubles when I record a voice over the microphone, it stops after one second, but it should be stopped by user itself. Secondary, I am not sure how to connect that blinking part to the indicator. Sorry for too much questions, I am a newbie.

0 项奖励
7 条消息(共 8 条)
3,330 次查看

I've made a program, it works completely! Now I just need to make opening/creating and reading/writing. The problem is that I cannot write frequency (which is data type), because string type should be written. There are only number/string converters. Do someone knows some solution?

0 项奖励
8 条消息(共 8 条)
3,317 次查看