LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Init problem (bad sync packet)

Hi

Im brand new to Labview and I have run into some serious problems(at least for me they are!) using the LIFA with Arduino Uno. Im trying to use the SPI connection, but the problems occur already at the seriel connection init. I get no errors trying to run the Init.vi, but when I use "Highlight Execution", it turns out that the execution "hangs" at the init. I tracked it down to a case structure where it keeps looping into the Default case with the text "Bad Sync Packet". I tried to run the Close.vi to make sure the connection is closed, and then the Init.vi, but it still doesnt work. Im not sure what information one would need to help me with my problems, so if I have left something out let me know!

Im using Win 7 32bit.

Regards

Jens

0 Kudos
Message 1 of 7
(4,839 Views)

Does the Arduion show up in the device manager on COM3 correctly?  Were you able to successfully upload the firmware to the Arduino?

0 Kudos
Message 2 of 7
(3,758 Views)

Yes, it does show up.

I downloaded the LIFA toolkit from http://sine.ni.com/nips/cds/view/p/lang/da/nid/209835, and uploaded the LIFA.base successfully.

Earlier this weekend I ran the simple Labview example "Arduino Analog Read Pin.vi" and it worked - I got some readings in. But now, for some reason, this also doesnt work. It also stops at the Init.vi. Should I maybe find a way to reset the Arduino to its factory settings?

0 Kudos
Message 3 of 7
(3,758 Views)

I just realized that Im probably NOT able to upload the LIFA.base to successfully to the Arduino. It says:

avrdude: stk500_getsync(): not in sync: resp=0x30

avrdude done.  Thank you.

0 Kudos
Message 4 of 7
(3,758 Views)

It tried another board, and it works like a charm

Probably a broken board.

0 Kudos
Message 5 of 7
(3,758 Views)

 Hi, 

I am using Arduino Mega 2560. I am facing a problem in communicating with the device. I tried with few of the examples and also on my own programs. I have checked all my input interfacing parameters like baud rate, COM port, Board type, and bytes are set correctly. I tried to debug the problem and established that the VISA resource was iterating inside the while loop with "Bad Sync Packet" condition in the Init VI. I have also checked with the timeout conditions. I discovered that the Sync condition between the Board and LabVIEW was not established. The images of the looping condition are attached. I believe that the program could communicate to the board if this problem was solved. It will be really great if anyone of you suggests a solution for this problem. Thanks a lot in advance. 

Download All
0 Kudos
Message 6 of 7
(3,421 Views)

 Hi, 

I am using Arduino Mega 2560. I am facing a problem in communicating with the device. I tried with few of the examples and also on my own programs. I have checked all my input interfacing parameters like baud rate, COM port, Board type, and bytes are set correctly. I tried to debug the problem and established that the VISA resource was iterating inside the while loop with "Bad Sync Packet" condition in the Init VI. I have also checked with the timeout conditions. I discovered that the Sync condition between the Board and LabVIEW was not established. The images of the looping condition are attached. I believe that the program could communicate to the board if this problem was solved. It will be really great if anyone of you suggests a solution for this problem. Thanks a lot in advance. 

Download All
0 Kudos
Message 7 of 7
(3,421 Views)