07-01-2009 11:59 PM
hello NI,
i am doing data logging using TDMS file, i want to monitor the file size while i start logging. could you test and reply me? that will be the better solutions to me.
07-02-2009 12:15 AM
There's a "Get File Size" function on the "Advanced File Functions" palette, that should be all you need.
You can also calculate the file size from the number of channels and their "NI_ChannelLength" properties, but that is more work and less accurate.
Herbert
07-02-2009 12:34 AM
i done by coding as per you said... can you check this code..
please, read my mail before reply, i asked this question several time.
07-02-2009 12:53 AM
Not sure what mail you're referring to. Code looks ok.
Herbert
07-02-2009 01:01 AM
07-02-2009 02:21 AM
This is a bug in TDMS in LabVIEW 8.6.1. Sorry I didn't see it right away - I was running your VI in a LabVIEW version that hasn't been released yet. The bug will be fixed in the upcoming LabVIEW release. As a workaround, you can approximate the file size by either:
Sorry for the inconvenience.
Herbert
07-02-2009 03:04 AM
oh God,
actually i am doing datalogging of 16 channels from strain inputs, that will be 1000samples/second, even i can logg the data of 30mins, actually i must monitor the filesize if its exceed some certain limits, i can create newfile then start logging ,for this only i am using TDMS file format, i almost experience that only TDMS file format for very suffecient and userfriendly, also retrivel time too large, for that i can open even 30mb file also....
do you have any other idea then suggest me...?
07-02-2009 04:44 AM
16 channels * 1000 samples * 8 bytes = ~128kB/s = ~7.68 MB/min = ~230 MB/30min
You can easily write a TDMS file with 230MB, so no need to split it up. However, if you do want to spread your data throughout multiple files, you can simply count how many seconds worth of data you have already written and multiply that with 128000 to get your file size in bytes. While I agree that using the Get File Size function would be even better, this seems like a reasonable workaround to me. Unless I'm overlooking something.
When you say reading speed is slow, are you reading the whole file at once? In that case,you might get performance problems just because of the amount of memory LabVIEW uses. It might be better to read the file in smaller chunks. You can use the offset and count terminals on TDMS Read for that.
Opening the file in the TDMS File Viewer might give you an idea of what reading speed on a portion of the file is.
Balaji DP wrote:
oh God,
[...]
Call me Herbert