LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW + bluetooth

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!

0 Kudos
Message 1 of 14
(3,579 Views)

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!

Applications Engineer
National Instruments
0 Kudos
Message 2 of 14
(3,528 Views)

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

0 Kudos
Message 3 of 14
(3,510 Views)

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?

Applications Engineer
National Instruments
0 Kudos
Message 4 of 14
(3,502 Views)

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:

Image

0 Kudos
Message 5 of 14
(3,498 Views)

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)?

Applications Engineer
National Instruments
0 Kudos
Message 6 of 14
(3,491 Views)

in  highlights mode i see  this error: from the last VI that i uploud here.

Image

Message 7 of 14
(3,487 Views)

The following KnowledgeBase article describes what is happening in your program:

 

http://digital.ni.com/public.nsf/websearch/6807113B057FDE4C86256B41008212ED?opendocument&Submitted&&...

 

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.

Applications Engineer
National Instruments
0 Kudos
Message 8 of 14
(3,457 Views)

I read   you're link  and I still  get the  error... so I wait another   sugestion

0 Kudos
Message 9 of 14
(3,449 Views)

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).

0 Kudos
Message 10 of 14
(3,415 Views)