12-07-2012 04:38 PM
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
12-09-2012 03:25 PM
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.
12-09-2012 10:15 PM
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.
12-10-2012 07:39 AM
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
12-10-2012 08:26 AM
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).
hope it helps
antoine
12-10-2012 11:06 AM
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.
12-10-2012 10:00 PM
You should attache your .vi file. It makes life simpler. Also, could you post your Arduino code?