k2teknik - 2019-06-13

I am just started to use Codesys v3 on Raspberry pi, and now I got stranded on using DLOG_STORE_FILE_CSV.

My code looks like:

PROGRAM POU_main
VAR
   b_EnableStoreCSV: BOOL; 
   b_SetRTC: BOOL; 
   fb_StoreCSV: OSCAT_NETWORK.DLOG_STORE_FILE_CSV; 
   st_DLogData: OSCAT_NETWORK.DLOG_DATA; 
   Log_test: OSCAT_NETWORK.DLOG_STRING; 
   Log_counter: OSCAT_NETWORK.DLOG_DINT; 
   t_DateTime: DT;
   counter: DINT; 
   dtu_getdt: RTCLK.GetDateAndTime;
   i_count1: DINT;
END_VAR 
b_EnableStoreCSV:= TRUE;
dtu_getdt();
IF i_count1 > 5 THEN
   dtu_getdt.xExecute := TRUE;
   IF dtu_getdt.xDone THEN
      // ohne Fehler abgeschlossen
      t_DateTime := dtu_getdt.dtDateAndTime;
      dtu_getdt.xExecute := FALSE;
      i_count1 :=0;
   END_IF
   IF dtu_getdt.xError THEN
      ; // Fehlerbehandlung
      i_count1 :=0;
      dtu_getdt.xExecute := FALSE;
   END_IF
END_IF
i_count1 := i_count1+1;
   
counter:= counter + 1; 
Log_counter (VALUE:= counter, 
   COLUMN:= 'Counter', 
   DELTA:=, 
   X:= st_DLogData); 
              
Log_test (STR:= 'test', 
   COLUMN:= 'result', 
   X:= st_DLogData); 
fb_StoreCSV (ENABLE:= b_EnableStoreCSV, 
         TRIG_M:= TRUE, 
         TRIG_T:= 5, 
         FILENAME:= '/home/pi/testfile.csv', 
         DTI:= t_DateTime, 
         SEP:= 59, // ASCII delimiter 
         ERROR_C:=, 
         ERROR_T:=,
         X:= st_DLogData); 

The code is triggeres every 200 ms in the task configuration, and it do run, but no files is saved anywhere.
When the code is running I can see that triggering is taking place, so is "add data", but my time stamp in DTI is strange, it shows UTC time and not my local time, can this be my problem?
I had try to change this time stamp to reflect the local time zone, but no luck to do so, but there must be a way?
It looks like that DTI is needed to be that correct time, but why? If it is sensitive to the right time stamping it must know the right time already, so why should I supply it with a precision time stamp?