LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying 9-axis data from BNO055 through VISA serial communication with Arduino

Hi,

I am new to LabVIEW and I need some help. I am trying to get data from BNO055 in LabVIEW through VISA serial communication with Arduino Uno. I am getting all the data in the Read Buffer (please see the attached VI) but I want to get each axis data in separate output box to make it more organized, usable and presentable. I want the output values to keep updating as I move the sensor as they do in the Read Buffer and Arduino serial monitor. Please guide me how to do this and is there a way to plot this data and get this data in a table? Your help will be highly appreciated.

Best regards,

Fahad Bin Zahid

0 Kudos
Message 1 of 7
(2,571 Views)

Hi Fahid,

 

unfortunately your VI does not contain any meaningful data set to default, so we cannot advise you how to convert the "read data" string!

 

1. Run your VI until you receive some data. Then stop the VI, set all value to default using the Edit menu item "Set to default…". Then save your VI and attach it again…

2. To collect data in a table (aka 2D array of strings) you need to collect the data. Use a shift register to do so…

3. You don't need to wire those constants to VISAConfigureSerialPort as you only use the default values.

4. There should be no wait function in the loop as VISARead will handle the loop timing.

5. Use AutoCleanup from time to time…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,560 Views)

Hi GerdW,

Thank you for your kind response. I have attached the VI as you said, please check it

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

Hi Fahad,

 

see this:

check.png

The large string constant is set to "\-display" mode (as well as some smaller ones)!

The last part from DecimateArray to "appended array" is just for cosmetics, you can implement your own solution here…

 

I recommend do change the data format in the Arduino to something more consistent/easy:

- use single tabs to separate items

- get rid of double space chars, colons, double tab chars

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(2,533 Views)

Dear GerdW,

Thank you very much. That was very useful. Is there anyway to plot this data and record it in a table?

0 Kudos
Message 5 of 7
(2,495 Views)

Hi Fahad,

 

Is there anyway to plot this data and record it in a table?

Yes.

 

Did I mention to use shift registers before?

(This now is a very basic task in LabVIEW. And it is explained in the FREE online resources to help you learn LabVIEW. They are offered (for FREE) in the header of the LabVIEW board, marked by a big "TRAINING".)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,485 Views)

Hi Fahad,

 

I'm trying to use the BNO055 with LabVIEW. Can you share with me the list of registers which I have to read to get the values ?

 

Regards,

Krunal

0 Kudos
Message 7 of 7
(1,935 Views)