PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS File Created Programmatically Appears Corrupted and Can't Be Opened

Hi everyone,

I am facing an issue with a TDMS file that I am generating dynamically via Python. I am using the nptdms library to read, modify, and write TDMS files in my script.

Here’s the process I’m following. I am working with a Digital Pattern Instrument (PXIe-6571) for testing.

  1. I start with an existing TDMS file containing source waveform data.
  2. I modify specific values within the file.
  3. I then save the modified content into a new TDMS file using TdmsWriter.

However, when I try to open the newly created TDMS file (which I write as a copy of the original file), it seems to be corrupted and can’t be opened using the Digital Pattern Editor (DPE).

When I check both the original and updated TDMS files in Python, the root, group, and channel properties are identical between the two, based on the printed output.

 

I attached the copy of the code and the output.

 

Has anyone encountered a similar issue where a dynamically created TDMS file is not opening in DPE?  I downloaded a TDMS viewer and I can open it with similar contents as the original tdms file.

  • Is there a step I might be missing while dynamically writing the file in my python code?
  • The same properties are observed for both tdms so I am not sure if I should I be updating the properties of the root object, group, or channel explicitly when writing the new TDMS file?
  • Are there specific things I need to check when saving the TDMS to ensure it's valid and compatible with DPE?

Any help would be appreciated. Thanks.

 

Download All
0 Kudos
Message 1 of 1
(122 Views)