LabVIEW Embedded

Showing results for 
Search instead for 
Did you mean: 

Error -68018

Go to solution

Hello Everyone,


I've been developing an application in a CompactRIO System.

This application logs to a TDMS File every couple of hours some measurement information.

As my application went to field, it started logging an error in TDMS write properties function, but I found nothing about this error anywhere in forums or internet.

The problem was solved by renaming the file, and let the application create a new file from scratch.

So, instead of handling this particular error inside the application and doing this workaroud. I would like to know the cause of the error. Could anyone tell me what this error is?


Error -68018 - TDMS Set Properties
0 Kudos
Message 1 of 7
Accepted by felipefoz

Hey Felipe,


I'm not sure if you have done that, but you can get full error descriptions by going on Help>>Explain Error... menu on LabVIEW and entering the error code.


Taking a look at the error description below, I would say that there is something on your system (a primary but hidden problem) causing the data not to be completely written to file (visible error, resulted by a major unexpected behavior).


Explain Error Window.png


My guess is that it can be somehow related to how you are writing data to TDMS file.


Since you are writing data to file with a long period of time between writes, I would recommended that you call the TDMS Flush after each write operation to make sure your data does not reside in a buffer but in disk.


Give it a try and see if flushing data to disk may help you better.





Felipe Flores
Application Engineer
National Instruments Brazil

Message 2 of 7

Thank you Felipe for the quick reply.


I was aware of this function but as I have not used for a while it didn't come up right away (rookie mistake).

Analyzing better the error description and the situation, I can probably guess that this error happened due to a power loss during some write routine, which may be very unusual because the interval between the logging are very high.

However, I might write some handling code for this specific error, so it can rename the current file and let the system create a new one.

The Flush Function would not be adequate for this situation, as I prefer closing the file because of the long intervals in order to prevent situations like this and avoid file reading errors.

Once again, thank you for the reply.




0 Kudos
Message 3 of 7

Great Felipe,

I know that might be projects constraints that are under the hood to me that can make it inviable, but  - just for the record - another solution to guarantee system availability of your system during power loss would be using a "battery" as a secondary power supply (cRIO is designed to work with a spare one).

I hope you be successful in your appliaction.

Best Regards!

Felipe Flores
Application Engineer
National Instruments Brazil

0 Kudos
Message 4 of 7



I have the same problem happening sometimes after Windows crashes for some unknown reason.

If the data is still readable, do you know what it would take to recover the data from the file?


Thank you!

0 Kudos
Message 5 of 7


In my experience, the data is still readable. So you could try to read the data and write again in a new file. Have you tried it out yet?


0 Kudos
Message 6 of 7


Yes I did, and it works. I was wondering if there was a ready-to-go solution, but this one will do.


0 Kudos
Message 7 of 7