11-24-2013 09:55 AM
Hello, i designer an electric car drived by pic18f458 and comunicate with LabVIEW via bluetoth. I have same problems with comunication port, in hyperterminal works verry good every time i connect and i disconnect the conection, but in Labview wotks only the first time, after i disconnect does'nt work again. I need to restart de computer. I have windows 7 and LabVIEW 2013 and visa 5.4. this is my VI file. Thank you for you're help!
11-25-2013 10:41 AM
I would recommend using VISA clear before VISA stop. Generally, if a program runs once and then won't run again, it is because you are leaving the hardware in a uncleared state. Let me know if this helps!
11-26-2013 01:03 PM
Hello, thanks for answer, but with no luck, again when a turn the computer on and I conect first time with Labview on the car via bluetoth work's, after 2-3 minutes the conection is down( Labview don't send the comand), if I stop and reconect again, doesn't work. i use bluetoth HC-S05 module. In hyper terminal work verry good every time so the problem is in Labview, stiil wait for a solution. Can you take a look on my VI to see if is a problem? thank you
11-26-2013 01:15 PM
Your while loop will never naturally stop since you have a false wired to the stop terminal. You should wire a Stop botton to that terminal so you can properly stop your loop. If you are aborting the program while it is in the while loop, you never run the clear and stop VISA commands and are not closing out your references properly.
Have you tried to run the program in highlight execution to see at which point the communication is hung up?
11-26-2013 01:34 PM - edited 11-26-2013 02:00 PM
I attach a button to stop while loop, the problem persist, can you modify the Vi work? only the write part without read from serial. I don't see in highlights mode where is problem. i get now an another error when i ask for data something about:"An input parameter was not recognezed or something like this @" problem still persist. Exist another way to read from serial? thanks
Later edit: in highlights mode i see this error:
11-26-2013 01:48 PM
The VISA Serial commands are the best way to configure serial communication in LabVIEW.
Unfortunately, we do not write code for customers at NI but I'd be happy to help you troubleshoot your own code. Can you post a screenshot of the error you are seeing? Which VI is this error occuring at (you can see this in highlight execution mode)?
11-26-2013 02:00 PM - edited 11-26-2013 02:07 PM
in highlights mode i see this error: from the last VI that i uploud here.
11-26-2013 03:12 PM
The following KnowledgeBase article describes what is happening in your program:
You probably cannot run it since the reference was not closed out in a previous run. Please let me know if you are still running into issues after following the troubleshooting steps in the above article.
11-26-2013 03:30 PM
I read you're link and I still get the error... so I wait another sugestion
11-26-2013 04:22 PM - edited 11-26-2013 04:22 PM
if i disable the port bluetooth from my computer-proprietes-manage devices, the program work about 2-3 run's, after about 5 minute the conection is down. i test the bluetoth port with an aplicaton in Labview(Serial port loop) and work good, so the problem is in my VI, but I am a beginner and i don't know where is the problem. when conection is lost, LAbview doesn't respond at my comand to stop running the VI file(after about 10-15 seconds he stop the VI).