LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA+ARDUINO UNO + BMP 085( BAROMETRIC PRESSURE SENSOR) ..

Hello All,

I am given an arduinon uno with BMP 085 (Barometric Pressure sensor) to measure the temperature and pressure. I was able to wire the arduino with sensor and code with c. It runs fine on arduino driver and gives the output. But I am also asked to display my result through waveform chart on LBVIEW. I am new to labview and not being able to create VI to communicate my arduino device with it and display the result. I would really be so thankful to any help provided on this topic or if someone could attach a VI that could make my job easier. I need to display temperature and pressure

Message 1 of 7
(6,941 Views)

Well, there are two ways to do this.  You can port the whole project over to use LIFA or you can simply output serial data from Arduino (your original code) and read it via LabVIEW (basically just a serial monitor like that which comes with the Arduino IDE).  The latter option means that you would not be able to send any commands to the Arduino.

0 Kudos
Message 2 of 7
(4,547 Views)

Thanks for the reply. I did use serial read and write and was able to read in data.  I coded my c on arduino in a way that it outputs data as:

24,123

23,134

27,124

and so on

where the first value is temperature and second one is pressure.

Now the problem i get is to parse these two data and plot into graph as temperature and pressure. Also I am asked to record the data in a excel file.

I could parse them and put it into a 1D aaray but wasnt able to separate them as two different values and plot in graph as well as in excel,  Also, do i need to place a loop so that the my program read data from arduino continuosly without replacing the previous one which it does currently.  I was looking to store all data ina single file.

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

Hello Yyad,

Put your LV code here for the serial read part (LV 2009 if possible), then I can try to help you for the parsing and  excel storage part...

Do you need to write in the .xls file on the fly for each value, or only when the record is finished?

Yes using while loop is very likely to be necessary...

Good luck

antoine

0 Kudos
Message 4 of 7
(4,547 Views)

Attached an example.

The upper part of the VI creates continuously a string similar to the one you get from your serial read  :

24,123

23,134

27,124

......

The lower part parse this string, convert to integer and display the values in 2 charts (pressure & temp).

Diad parse.jpg

hope it helps

antoine

0 Kudos
Message 5 of 7
(4,547 Views)

Here is my VI . Yes, I am asked to put the data in a excel file after record is finished.  I would be so thankful if you helo me to out that VI in loop and plot on two different graph along with write in xml file or text file.  csci 497.pngcsci-497.png

0 Kudos
Message 6 of 7
(4,547 Views)

You should attache your .vi file.  It makes life simpler.  Also, could you post your Arduino code? 

0 Kudos
Message 7 of 7
(4,547 Views)