11-25-2014 06:11 AM
Hello!
I try to make bluetooth connect window like "Add Bluetooth Device Wizard" in MS WINDOWS. I start from this:
It works well, i can see my devices, and devices disappear when i switch them off. searching time (or update time) 6 sec. in Add Bluetooth Device Wizard it is 10 sec. But i can't stop the search in this 6 sec, it just freezing for this time. In "Add Bluetooth Device Wizard" i can press on chosen device and it stop searching or i can press cancel button. Thank you, i'm new in LabVIEW.
P.S i don't know why but it makes only one search without flat sequence structure.
Solved! Go to Solution.
11-26-2014 08:31 AM
Hi timbak,
Actually what is wrong in your program is the sequence structure. This structure cannot be stopped until the code within is completely executed. So when you push the stop-button, first the code in the sequence is executed and then the loop is stopped.
Your code also doesn't make only one search but it displays only the last one because the indicator "device list" is in the loop. If you want to see the results of all iterations, it would be better if you used an auto-indexed tunnel and connect it with a 2-dimentional array of clusters where all the devices for every search are displayed, or you can simply use the Bluetooth discover function without a while loop (which I think is better).
There is a good example in LabVIEW that you can use. go to help >> find examples und in the NI Example finder you can either search the word "Bluetooth" or navigate to "Networking >> Bluetooth" and you will find the project "Simple Bluetooth.lvproj"
I hope this helps.
Best Regards
Maha