LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating csv files with labview

I am using labview 8.6 to log data from an anemometer connected via COM1 serial port communication.  The anemometer sends data when queried with 'MA!' where 'A' is the polling character.  It returns the polling character along with an ascii text serial string.  ie in ASCII     'A     0.0    0.0    343.5    7.2     0.0'.

 

I am very new to Labview.  How do I take this  string, disgard the first letter, and log the numbers to an excel file with a header?  I have used the Instrument I/O Assistant to query and parse the input from the anemomter into the letter and then the numerical string input.  I was trying to make it run to see if the I/O assistant could successfully pull numbers from the sensor but it times out.

 

Eventially I'd like to make a loop where it will continuously log data, but I was just trying to figure my problems out one at a time.

 

If there are any VI's that do similar things, please point me to them even just to see how they work.  I need tips!  I have never 'data-flow programmed' before.

Download All
0 Kudos
Message 1 of 5
(3,615 Views)

Hi Bradenrooke, welcome to LabVIEW "data flow" programming world! You will found it fun and time saving with your developments in LabVIEW. To parse the string you can try the "Scan From String" function under Function\Programming\String. You can write a csv file using the "Write To Spreadsheet File.vi" under Function\Programming\File IO.  You may need to experiment with such functions to to what you needed, but eventually you will love using LabVIEW for coding as it is truly getting better and better to help engineers like us. Have fun!

 

 

0 Kudos
Message 2 of 5
(3,601 Views)

here is an example of write to spreadsheet.vi

 

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 5
(3,596 Views)
Harold's VI is very good in your case for appending data to file continueously in a loop.  In case later you need to write an array to a file, the following VI may be of help as it will work for different type of arrays and data format.
0 Kudos
Message 4 of 5
(3,592 Views)
Thanks for the help guys.  I'll take a look at those VI's and keep tinkering away.
0 Kudos
Message 5 of 5
(3,583 Views)