I am very new for using real time and fpga. I got a strange problem that I couldn't find any solution on the internet. Basically, I want to save all data in tdms file on real time. If I run the program with the same name as the previous time, it won't have error shows up in the program. However, when I copy it to the pc and open it with excel, it will sometimes have end of file error(4) dispay in the test file and sometimes won't. Error or not, the saving data seems like to be the old data that I save it the first time. I use create and replace, so I don't understand what the problem is. Anyone has any idea? I got the program in the attachment, and it is written is lv2019. Thank you in advance.