Error 201309: Logging Data to TDMS File

Updated Apr 12, 2023

Reported In


  • LabVIEW


  • NI-DAQmx

Operating System

  • Windows

Issue Details

I am using the DAQ Assistant or the DAQmx API to acquire and log data to a TDMS file. I am getting the following error:
Error -201309: Unable to write to disk. Ensure that the file is accessible. If the problem persists, try logging to a different file.

How can I solve the error?


Follow the next steps in order to solve the error:
  • If using an existing TDMS file, verify the file is not set as read-only.
    • Right-click the file.
    • Click on Properties.
    • Go to the General tab.
    • Confirm the Read-only checkmark is clear.
  • Make sure the Windows user have permissions to write to the directory.
    • Right-click the directory.
    • Click on Properties.
    • Go to the Security tab.
    • Check the permissions for your user.
    • The write operation must be allowed.
  • Create a new TDMS file in a different directory (i.e. Desktop).
    • Open DAQ Assistant.
    • Go to the Logging tab.
    • In the File Path, select a new path and file for the TDMS file.
    • Click OK.
    • Run the application and confirm it works.
If the above steps don't resolve the error, and you don't see the error from the start, but rather only after a few minutes of running the acquisition, then it might be worth reviewing the DAQmx code itself as often times it might be the cause of this error if not programmed correctly.

For best practices when using the DAQmx API, you can refer to the LabVIEW shipping examples which can be found by going to: LabVIEW -> Help -> Find Examples... -> Hardware Input and Output -> DAQmx.

If the problem persists, please contact NI Support.