ert - 2018-02-13

I need to trend and record some variables to a CSV file.
Data storing has to be roughly at every 10 seconds.
Trending and recording can be separate or can use common files.

Is that possible with Codesys?
I found that Trace object can save data to CSV when placed inside a project (and not on Visualization). But is it possible to trigger that from code so that the record is automatic?
Or is there any other (better idea) for saving data to CSV files?

My another concern is SD card wear, as the data is going to be stored every 10 seconds on an SD card.
I would like to minimise the possibility of deteriorating the SD card, so any good practices on that would be appreciated.