|
|||||||||||||
It has come up a few times from customers, and I wanted to gauge interest and solicit ideas on how this should work.
Currently, with the built-in TDMS logging support, if you want to change to a new file in the middle of logging, you need to stop the task and start again. For some use cases, this isn't practical (for example, http://forums.ni.com/t5/LabVIEW/Why-the-TDMS-file-
The question is: How would you like to specify the "new file" behavior and what are your use cases?
For instance, a couple ideas to get the ball rolling:
Thank you for your input!
Andy McRorie
NI R&D
It has come up a few times from customers, and I wanted to gauge interest and solicit ideas on how this should work.
Currently, with the built-in TDMS logging support, if you want to change to a new file in the middle of logging, you need to stop the task and start again. For some use cases, this isn't practical (for example, http://forums.ni.com/t5/LabVIEW/Why-the-TDMS-file-
The question is: How would you like to specify the "new file" behavior and what are your use cases?
What I'm currently thinking (because it seems the most flexible to different criteria and situations) is to simply allow you to set the file path property while the task is running (on DAQmx Read property node). The only downside I can think of with this approach is that you wouldn't know exactly when we change to the new file. We could guarantee within (for example) 1 second, but you wouldn't be able to specify the exact size.
Would this be a good solution for you? Can you think of a better way to specify this behavior?
I managed to get this exact thing to work by having the filepath appended with a number corresponding to the number of iterations completed by the data acquisition while loop (and the file writing while loop) divided by 100. By taking this divided number and rounding it down (toward negative infinity) and appending that number to the end of the filepath (set the filepath as a string, use concatenate strings to add the rounded number, then use a string > filepath conversion module) I was able to make it automatically parse the data into multiple files which are much more reasonably sized than some of the files I was collecting before doing this.
One thing to keep in mind however, the program doesn't seem to close the session with any of the files it writes to until you have stopped the loop from functioning, I'm sure there is a way to code around this but I haven't taken the time to do so because usually when I finish collecting data I can simply stop the program and head out to analyze what I collected in matlab.
Let me know if you have any questions about this method, or any suggestions for improvements.
Jesse
I can see the following attributes to control when a new file is automatically started:
1 - Change file after 'n' samples - I just got done writing an app to split large TDMS files and dump to multiple worksheets in Excel workbook. This is a way to avoid the 65K limit in older versions of Excel.
2 - Change file after time interval - Would be fantastic if I could tell it to start a new file every 'x' hours. Just what I need for long term life testing.
3 - Change file after max size - Often desirable to optimize size of TDMS files.
If it's one or the other, I vote for #2, make the path changable at runtime. I'll pick flexibility every time. Easy to use options are useless if they don't do what I need. All the "user friendly" solutions are just different events that trigger a name change. How about instead of pre-defining what events will trigger a name change you give me the tools to create the solution that fits my needs?
Maybe I want to create a new date stamped file at midnight every night. Maybe I want to store my wind speed data according to the month on the chinese calendar. Who knows? IMO a good api makes the common things easy and the uncommon things possible. The user friendly solutions proposed certainly make the common things easy, but they completely ignore the uncommon requirements.
I like either.
In a recent test program, I ended up having files upwards of 12 GB. Sometimes, although rarely, the files were up to 32GB That makes it really hard to upload to / download from an ftp server. If there were soem clean mechanism to switch files in mid-stream, it would really make things quite a bit easier to hadle the data from this kind of test.
Kudos. I would like a function like this. But I don't want it necessarily tied to streaming from DAQmx ... for example:
My custom-built LV application reads data from a serial RS232 connection. It processes the data and writes to a TDMS file. The files get big because we are logging continuously, 24 hours a day. Of course, I could close the file and open a new TDMS every time the current file reaches 1 GB or something. But it would be great if LV did this automatically.
BUT, more importantly, is how we read the data. I would LOVE it if I specify that I want to open the FIRST file and LabVIEW would automatically recognize that this is part of a "spanned" dataset ... eg that is spans over multiple TDMS files and would autocmaitcally jump to the next file when required. Essentially look at the multiple files as one large file.
This feature has been implemented. What we ended up with is essentially both #1 and #2, so hopefully your use case will be solved. See this post here for more details: http://forums.ni.com/t5/Multifunction-DAQ/DAQmx-Lo
You must be a registered user to add a comment here. If you've already registered, please log in. If you haven't registered yet, please register and log in.
Post New Idea to submit a product idea. Be sure to submit a separate post for each idea.
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page