From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

Why TDMS Open is failing on second attempt?



I have created the following VI (part of a bigger block diagram) to create and/or overwrite TDMS files. the diagram I have attached is for the latter case.

When I first run the VI, select a file that I wish to overwrite, its executed correctly. 

once 'new' file is created and closed, if I then re-attempt to overwrite the file again I am getting ERR(5) even though prior to replacing the file, I have an OK from the TDMS close block!


Anyone able to suggest why this is the case and how to resolve it please?




0 Kudos
Message 1 of 2

Hi sherzaad,


@sherzaad wrote:

Anyone able to suggest why this is the case and how to resolve it please?

Why: you send a "FileClose" request to the TDMS file handler and it will start the closing procedure for that file. This may include flushing remaining buffers to the TDMS file and creating an additional index file - which will take some time. When you immediatly try to open/replace the file again it is still being processed - and so you get an "error 5"…


How: wait for some time before accessing the file again. Either use a fixed wait time or try to open the file until there is no error anymore…

Best regards,

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2