12-19-2018 03:28 AM
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
12-19-2018 04:01 AM - edited 12-19-2018 04:03 AM
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…
12-19-2018 07:18 AM
Hi GerdW,
Thank you for your kind response. I have attached the VI as you said, please check it
12-19-2018 07:30 AM - edited 12-19-2018 07:31 AM
Hi Fahad,
see this:
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
12-20-2018 12:40 AM
Dear GerdW,
Thank you very much. That was very useful. Is there anyway to plot this data and record it in a table?
12-20-2018 02:27 AM
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".)
08-20-2020 04:43 AM
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