Error 4 After Multiple Calls to TDMS Write Function

Updated Aug 30, 2023

Reported In


  • CompactRIO Controller


  • LabVIEW

Operating System

  • Windows

Issue Details

I am using the TDMS Write Function multiple times in my application. The first time I write to my TDMS file, it works fine. However, after other calls, the TDMS Write Function gives the following error: 

Error 4 occurred at TDMS Write...

Possible reason(s):
LabVIEW: (Hex 0x4) End of file encountered. 

How do I prevent this from happening? 


To fix this issue, try the following: 
  1. Wipe the drive of all of the previous logged data. 
  2. Restart your application and proceed to log your files. 
  3. Make sure to monitor the memory usage on your Real-Time target.  If the available memory on your controller is exceeded, this error will occur.