11-13-2008 06:14 PM
I'm trying to send data to Excel (collected from sensors) and am sending it via RS232. I have a wire connecting TX to RX on the cable to test, and would like to know how to get Labview to keep writing a new row to the spreadsheet after a chosen interval. Currently it is stopping after one sample.
This is what I'm using currently. Can anyone help please? Thank you
11-13-2008 10:00 PM
All that you have done is rename and attach a shipping example. Nothing in the example pertains at all to RS232 or acquiring data from sensors. I'm going to assume that you have a top level VI that is calling this one. If that's the case, any sort of problem you are having with RS232, sensors, or Excel is in the top level VI and you should attach that. The example that you attached is not really intended to be used to add data one row at a time. If that is what you want to do, then you would perform the steps up to the for loop labeled 'Add Data' at the very beginning of your program. Then, when you acquire data, do the 'Add Data' to specific cells and when the acquisition is complete, save and close the spreadsheet.
Please note that unless there is some pressing need, it is much simpler to save data to a text file that Excel can import. You just need to use the Write to Spreadsheet File function.