Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junk Timestamps At End of TDMS Files #18

Closed
keenanjohnson opened this issue Oct 30, 2016 · 2 comments
Closed

Junk Timestamps At End of TDMS Files #18

keenanjohnson opened this issue Oct 30, 2016 · 2 comments
Labels

Comments

@keenanjohnson
Copy link

keenanjohnson commented Oct 30, 2016

Whenever the files close out (either with the shutdown state or the enable tag), the last few timestamps in the file are not accurate.

The data appears to be valid for those samples, but the timestamps have to be manually corrected.

@keenanjohnson keenanjohnson changed the title Junk Data At End of TDMS Files Junk Timestamps At End of TDMS Files Oct 30, 2016
@smithed
Copy link
Member

smithed commented Oct 30, 2016

unless its been changed, this is expected if annoying behavior. This module uses the tdms advanced api to make things as fast as possible, and that API requires a fixed number of writes per channel. So the module buffers data in chunks of that size and then writes to disk. If the module is stopped or paused before the buffer is full, it still must dump that data to disk. if i remember correctly it deliberately sets a junk value for time.

A workaround would be to, on the last dataset, simply close the file in adv mode and reopen in regular tdms mode. I didn't think of it before but this might work just fine. The last write will be slower but its not a huge deal.

@Beazurt Beazurt added the Bug label Nov 16, 2016
@pollockm
Copy link
Contributor

Implemented @smithed 's solution, along with the log rotate request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants