LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Bluetooth connecting LabVIEW

Is there any one who succeed connecting Arduino & LabVIEW with Bluetooth?

I have followed the document listed in http://digital.ni.com/public.nsf/allkb/D86D6E2927F9C37A8625788E0077E86B?OpenDocument ,and succeeded with the serial monitor,a bluetooth connection, and a simplle sketch on arduino as follows:

void setup()
{
  Serial.begin(115200);
}
void loop()
{
  Serial.println("Hello World!");
  delay(1000);
}

But, when I tried to use LIFA Firmware and LabVIEW, there is an Error -1073807360 occurred. It seems that the problem is the VISA CLR function in Init.vi. When I delete the VI, another Error 5003 occurred.

Can anyone help me?

Thanks!

Download All
0 Kudos
Message 1 of 8
(7,452 Views)

arduino4.JPG

void setup()
{
  Serial.begin(115200);
}
void loop()
{
  Serial.println("Hello World!");
  delay(1000);
}

It works using bluetooth connection with the sketch and block diagram above.

But It doesn't work with the LIFA firmware and the block diagram below. I don't know why.

arduino.JPG

0 Kudos
Message 2 of 8
(4,534 Views)

Hi, can anyone please help me out?

0 Kudos
Message 3 of 8
(4,534 Views)

Can you confirm that the VISA Clear function generates the error?  Try temporarily removeing that VI from the Init VI to see if that resolves the problem (it shouldn't be necissary and is there 'just in case').

Let us know if that helps.

-Sam K

Message 4 of 8
(4,534 Views)

Sam K,

Thanks for your suggestion. I did do that. When the VISA Clear function removed from the Init VI , the VISA configure Seria Port VI works , but there is another error occered as shown in the picture below.

arduino3.JPG

I've tried a simple VI testing the communication between Arduion & LabVIEW. It works with USB cable but not with Bluetooth. I'm sure that the bluetooth model can connect with LabVIEW because the following test woks with bluetooth.

VI:

arduino4.JPG

the sketch on arduino:

void setup()
{
  Serial.begin(115200);
}
void loop()
{
  Serial.println("Hello World!");
  delay(1000);
}

0 Kudos
Message 5 of 8
(4,534 Views)

Hi, Sam K,

I have made some modifications to the Init.vi function with the tips of the document http://digital.ni.com/public.nsf/allkb/67C56BFD27FD0BA8862578A2002CC10E

and finally it woks with the bluetooth.

Init_VI.JPG

VISA CLEAR VI deleted and Set I/O Buffer Size VI added with the "mask" parameter "I/O Receive and Transmit Buffer".

It seems that all the thing goes right but I don't konw why. Is it a bug of LIFA?

Lesta

0 Kudos
Message 6 of 8
(4,534 Views)

Hey, if they can get across Labview through serial port via USB cable can also communicate mediente Bluetooth, a detail would check the COM port assigned to the Bluetooth is not always the same as that assigned to the arduino, the following code works and it worked without problems https://decibel.ni.com/content/thread/16912?tstart=0

0 Kudos
Message 7 of 8
(4,534 Views)

Thank you Tom,

If the serial port via USB cable works , the serial port via Bluetooth should work too. But it doesn't actually. I'm sure I make the right COM.

However, it finally works as I have mentioned above, though I don't know why.

Message 8 of 8
(4,534 Views)