03-29-2016 03:45 AM
Hello,
I'm developing an application that store data from different channels. Before to start the recording the operator has to do something. I have to control what he is doing, for this reason I want to write a file that has 5 minutes of history.My question is: how can I work directly with the file? I'd like to use the file like a FIFO. Do you have any suggestion?
03-29-2016 05:18 AM
@fabio.int wrote:Hello,
I'm developing an application that store data from different channels. Before to start the recording the operator has to do something. I have to control what he is doing, for this reason I want to write a file that has 5 minutes of history.My question is: how can I work directly with the file? I'd like to use the file like a FIFO. Do you have any suggestion?
Do not do this. It will be slow and a pain to maintain. I recommend using circular buffer in your code instead. Then you can periodically write the content of the buffer to a file as a backup. The simplest way I have found to make a circular buffer is a fixed sized queue with the Lossy Enqueue.
03-29-2016 10:27 AM
Yes, I know... you are right. But for some reasons I have to work directly with the file... I'll find the "TDMS Delete Data" that seems to work like I want.