tdmswriteprop writing garbage names

2 views (last 30 days)
Paul
Paul on 3 Apr 2025
Answered: Shaunak on 12 May 2025
I am trying to shorten the channel names of a tdms file so that I can load it in matlab. However, the renaming fails after a few loops with error 6617 (file already contains an object with that name). When I reload the tdms info, I find that the new channel names are just a bunch of garbage characters:
If try to change the name of a renamed channel, I get an 'invalid channel' error:
This appears to be caused by a bug in how the tdmswriteprop function escapes special characters. For some reason, placing a space before the special character breaks it. For example: changing a channel name to "test/test/test" works fine, but "test /test /test" produces garbage characters.
  1 Comment
Nithin
Nithin on 23 Apr 2025
Hi @Paul,
I tried to reproduce this at my end and it works fine for me.
Could you please attach the files you are using or any steps to reproduce this issue?

Sign in to comment.

Answers (1)

Shaunak
Shaunak on 12 May 2025
Hi Paul,
I understand that you are facing some issues while writing property values to a TDMS file using tdmswriteprop in MATLAB.
There is a known issue in MATLAB R2023b and R2024a where writing property values longer than 15 characters to a TDMS file using tdmswriteprop can result in invalid or corrupted characters. This can cause problems when you later try to read or update those properties.
This issue has been discussed in the MATLAB Answers thread below, kindly refer to this for more information:
Hope this helps!

Categories

Find more on Entering Commands in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!