09-27-2012 02:47 PM - edited 09-27-2012 02:50 PM
Hi,
I am using the NI -Veristand - Start and Stop Data Logging Sessions to initiate and conclude data saving on a RT target.
I noticed that the actual data transfer from RT target to PC is done once the logging has stopped following the call to Stop Data Logging.
Is there a way to control, or at least check when the data transfer is complete ?
I want to read, and possibly dump into another repository the content of the newly created tdms file. For a large file, the transfer may take a few seconds, and presumably my application would have opened the file before it knew the transfer was complete with all the data...
I could check the file size of course and see if it keeps changing... but there should be a better way to do this.
Thx.
L
PS: another post on the topic is here, that touches on using UDP for data saving... But it is more for streaming, which is different that what's done in this post's topic.
Solved! Go to Solution.
09-27-2012 11:46 PM
The API you are referring to streams the data from the targets to be logged directly on the host. The only log files generated are always on the host. Furthermore, after the Stop Logging command completes, you are guaranteed that the log file has been closed and no more data will get logged to it.
09-28-2012 08:55 PM
Ok, great thanks Jarrod.
I must have been fooled then, as I took care to look at the TDMS file size, and it would only show a size different from zero right after the API Stop command is sent. I would acquire for maybe 10-15 sec, with a lot of data just to check... But maybe it is a Windows quirk..
L.
10-01-2012 08:13 AM
It is probably the result of internal buffering that takes place as part of the logging operation. When we close the file, we flush any remaining buffered data to disk.