Hoyer 0 Posted July 26, 2020 Hi, I would like to write data into a txt file every time a given event occurs, which I would like to investigate later. So I want new data to be written into the same txt file, into a new row without overwriting previous data. How can I do that? Thank you in advance! Share this post Link to post Share on other sites
AzeoTech 0 Posted July 27, 2020 You could use an export set, or if you want real control over the file format, use the low level file functions. For example: private handle = file.open("c:\data\myfile.txt",0,1,1,1) file.write(handle, "Here is some data:" + myChannel[0]) file.close(handle) The Logging part of the user's guide has the description of all the file. functions. Those 0's and 1's in open correspond to: Read, Write, Append, Text, so what I have in the example is not to read, but to write; to append and not overwrite data, and that I'm writing a text file (which means it generates a new line with every call to write()) Share this post Link to post Share on other sites