Hello,
I am attempting to add header information once to a .csv file that is continuously updated. Following an online example, I am able to add the header information, but I only get one row of data, which I suspect is due to the first "write to file" command not having a true append status. Adding that true append status then adds the header to every line of data. Currently I have added a case statement that I was hoping would check if a timer had reached a certain limit and append the header data if the timer value was below a certain threshold, or skip the header if the timer was exceeded. Despite changing the value of the timer condition, the results in the file indicate that the case statement always evaluates as false. I initially has the timer threshold value as 2 ms, but even with a value of 10 seconds the results are unchanged. I would be very appreciative of any help to solve this issue.
What I have:
\
What I would like:
Because the file is added to constantly, I would like to avoid a solution that involves reading the file constantly and checking if there is data contained within.
Thank you very much for your time.