10-06-2008 09:38 PM
Hi...
1) In my program i used the write to spreadsheet.vi in order to save data every 5 sec in a .cvs file. My question is, can .csv file become overflow?how many data that can be stored in the file?I have to let my program, running for a long period. So can I use this .csv file? What will happen if I keep on save the data in .csv file ?Is there any better method that can be use?
2)How to start SQL 2005 xpress in Labview?
Thanks
10-07-2008 07:02 AM
There is a limit to the file size that Windows can support. 32 bits can only access up to 4Gb.
As for a .cvs file, it is no different than any other file type. All files are really binary.
If you notice performance issues, it may be the way the code deals with writing to the file. If you simply append new data to an existing file, then doing so every 5 sec should not be an issue.
R
10-07-2008 08:23 AM
I write a line of data to a text file every second. To avoid the files getting too large I keep track of how many lines I've written and when it reaches a given size (1000 lines in my case) I close the file and open another one. The files have the same name with a numerical increment at the end, ie
SaveData1.txt
SaveData2.txt
SaveData3...
This way I can be sure that the file size is not an issue.
Dave
10-08-2008
02:06 AM
- last edited on
04-06-2025
06:50 PM
by
Content Cleaner
Hi Gdah,
I believe the method suggested by JoeLabView and DavidU is the correct method. However, please be reminded that write to spreadsheet.vi is a high level File I/O, which performs Open-Write-Close operation sequencially, do not use this subVI inside any Loops or else you will experience slow processing time and the data you are writing might overwritten each iteration.
Regarding your 2nd question, if you want to connect between LabVIEW and SQL database, you would need NI LabVIEW Database Connectivity toolkits (https://www.ni.com/en/shop/labview/select-edition.html).
Let me know if you have further enquiries.
Sincerely,
Krisna Wisnu
Applications Engineer
NI ASEAN
SR:66756
10-08-2008 07:38 AM
10-08-2008 09:05 PM
Hi All,
I think I have mistaken understood the first question. DFGray is right. I am sorry for the confusion made. Thanks DFGray! I will take note on that
Sincerely,
Krisna Wisnu
12-01-2008 07:36 PM
Hi All,
I am trying to write data that I am sampling with a 4-channel DAQ, and I want to write the data from all the channels during each sample to the excel file, continuously appending. I'm trying to do this, however, the values are being over-written and all I get in the excel file is the values from the last sample. I am using the Write-To-Spreadsheet function outside of the while loop, I am sure this is a simple thing but I am just not getting it. Can you offer some feedback as to what I'm doing wrong and point me to the right direction for doing this? Thank you very much.
12-01-2008 08:54 PM
You probably should have started a new message thread for this.
The reason you get data from only the last sample is that you have a normal tunnel for the 2-D array that exits the loop. That means only the last iteration's data exits the loop. You probably want to use an autoindexing tunnel. However that would turn the 2-D array into a 3-D array which you don't want. The problem starts with using the express VI's which hide the real data behind the mysterious structure of the dynamic data type. The express vi's convert that to 1-D arrays even though your are sampling only 1 sample at a time. You may want to index out the only element present in that 1-D array to get the single data point for each channel. Then build an array into a 1-D array of your 4 channels, then auto-index the tunnel to get a 2-D array.